Daniel's posterous

Witchcraft

I've recently gotten my hands on a new PC that has the Intel-VT instruction set enabled.

What's the first thing I do? 

Install OS X Lion. On VMWare ESXi.

Screen_shot_2012-04-18_at_15
Time will tell how it behaves as it's going to replace my current mixed (and not very nice( environment (Windows Server 2K8 running iTunes serving to an apple TV and Debian (a broken Squeeze install) running Twonky serving to my PS3. Now theres going to be one machine doing it all.

Epic.

802.1q VLAN Tagging/VTP with Windows Hyper-V R2

I came across this potentially useful piece of information whilst trying to get a new guest VM to speak to it's default gateway. 

It was set to use a VLAN on a shared interface on the firewall (VLAN 1,2&3), this was a new VLAN and was configured in the same manner as the other two functioning VLANs. The whole way through both switches (allowing VLAN trunking, configuring the allowed VLANs on the switch ports affected etc.) but it was not working, it couldn't ping it's gateway, nor could the gateway ping it.

The problem was that the Hyper-V Host was not  trunking all VLANs, only specified ones. I don't know if this is an out of the box setting, but I don't recall changing it, or adding the other VLANs to it. 

To rectify this, open up the Host properties in SCVMM or in Hyper-V Manager, then  navigate to the Network tab.

Screen_shot_2012-04-18_at_11

Click on the affected connection (LAN1 in this case) then select Edit.(You should see that the VLAN is set to Trunk already) If this isn't the case, you may need to allow trunking on the next screen as well.

Screen_shot_2012-04-18_at_11

Now you can either add the VLAN manually, or select the Trunk All VLAN ids. This will then populate the list below with all VLANs 1-4095. The checkbox will disappear the next time you open this but the list remains populated.

If you are managing a lot of VLANs (100's) or if you're only in charge of the Virtualisation technology, I might suggest allowing all, if you have a close coupling with the network team (or you *are* the network team) then allowing only specified VLANs may be a better, safer solution.

Exchange 2010 and iPhone with ActiveSync

You need to make sure that the following is set up when attempting to use an iPhone with iOS > 4 with Exchange > 2010 SP1.

1. In the Hub Transport section under Organization Configuration, ensure that both the "Name" and "Accepted Domain" do not contain any spaces. I recommend using the accepted domain as the name.  This does not matter if it is an Authoritative, Internal or External Relay. You can use the GUI to do this, i.e. right click on the domain with spaces and select properties. Or use the Exchange cmdlet

Set-AcceptedDomain –Identity <value> -Name “ValidSMTPDomainName” 

2. You need to reenable inheritance of permissions from parent if you are adding privileged accounts, i.e. member of Domain Admins. 
To do this, open up Active Directory Users and Computers, then click on View, and then click on Advanced Features. 
Right click on the affected user, then select "Properties". Go to the "Security" tab and click "Advanced". Then enable "Include inheritable permissions from this object's parent" Click Apply and OK.

Barracuda Health Monitoring with Nagios

Ive written a few plugins that check the health of a Barracuda SPF appliance. They're in (bad) perl but seem to do the job pretty well

The first, to check the RPM of the CPU and System Fans has been accepted into the NagiosExchange site and is listed as:

http://exchange.nagios.org/directory/Plugins/Hardware/Others/check_barracuda_fans/details 

The others, which check the 3 mail queues, and the CPU temperature have been submitted but not yet approved.
I'll update here when they are released.

Changing default editor to vim

Run the command below: 

sudo update-alternatives --config editor

Then select vim.basic or vim.tiny from the menu presented

Copy SSH Key to Server in one command

Use this technique to copy the SSH key and add it to the authorized_keys file in one command

ssh-copy-id -i .ssh/id_dsa.pub username@remotehost

Pop in your password and you're done.

Sage Payroll 2011 Won't Start

Today I encountered a problem with Sage Payroll 2011 v17.00.029, when started, the program would display the splash screen and successfully run the first run wizard (asking for Company name, Address and Tax District to be used when creating defaults etc.)

Once this completed, the application appeared to close (which I assumed was normal). On next startup, it asked me to select the company I had created and login (using the default MANAGER account and no password), selecting this and the correct date for processing using the date picker, then clicking OK, the application then crashed out.

The solution to this was to change the region that the system was running under, I had accidentally set it to US using the unattended installation disc I created, setting this to UK and rebooting solved this problem and allowed the application to run successfully.

This can be diagnosed quite easily by inspecting the date format in the date picker textbox, i.e. today it should read 21/03/2011 but instead was reading 03/21/2011. I think this might be a design flaw in the Sage application as the date picker successfully calculated the week-end number (50 in this case) but was unable to execute the program. I believe that Sage have no intention to fix this as it would require a lot of effort for little reward so be careful if you are using a non-EU cloud service for your Infrastructure as a Service or if you have multiple geographic locations.

Unprotect PDF Documents

install GhostScript then run this command to unprotect PDF

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -c .setpdfwrite -f INPUT.pdf

Linux Guest VMs on Windows Server 2008 R2 Hyper-V Failover Cluster

If you are deploying any Linux VMs on a Windows Server 2008 R2 Hyper-V Failover Cluster (and I assume a Hyper-V R2 failover cluster) there is a problem I have  identified with them and their networking. I have replicated this on Debian Lenny and Red Hat so far.

If in your failover cluster, you have the node hosting the VMs fail, when they failover to another node in your cluster, you will lose networking on them. I believe that this is caused by the MAC address changing when they move over to the other node. Networking is not actually "lost" but the ethernet interface will have incremented, so eth0 will become eth1 assuming that you do not have an eth1 already, in this case I haven't tested what happens yet. To solve this (on debian) you need to edit /etc/network/interfaces and change any references to the broken interface to be set to the new interface, identifiable by running ifconfig -a
Then execute ifup eth<new>, where <new> is the new number you found from ifconfig -a and set in /etc/network/interfaces.

I believe this problem is preventable by setting the MAC address(es) to be static in either SCVMM or in Hyper-V manager. If you are using Failover Clustering and especially if you are using Cluster Shared Volumes, I *strongly* recommend that you use SCVMM or the version of SCVMM found in System Centre Essentials 2010 Plus. It makes managing them a lot easier than using Failover Cluster Manager, and a lot safer than using Hyper-V Manager.

I am carrying out further tests on this configuration to see if only static MAC addressing is required or if MAC spoofing is also needed. Multiple interfaces will also be tested.

Hope this helps someone 

Voice - Missing, Reward offered

So this morning I've woken up and discovered that I've lost my voice. I have no idea what caused this as I didn't do anything differently nor am I feeling any more unwell (I've had a bit of a cold but I don't think that would do it)


It's quite a peculiar situation for me, when I'm talking to someone I can hear my proper (or at least my perception of it via bone conduction) voice in my head but what comes out is a complete whisper, I can raise my voice but it either feels like I'm shouting through treacle or leaves me exhausted.

So, if anyone phones me today I think I might just lay on some heavy breathing and make them think that they've gotten a wrong number.

Posted July 28, 2010