Ok first thing, I’m certainly not an infrastructure guy but being a developer these days does mean you need to find your way around Windows Server 2008 R2. Having recently trashed my world that is my laptop I faced the arduous task of rebuilding things. Thankfully I managed to recover the data from my previous laptop which included by Hyper-V server images. I ran into a few hurdles while reconfiguring things so thought I’d write them down here to hopefully save someone else the time I wasted figuring these things out.
Hyper-V Issue 1
My new laptop has a Intel Core i7 which is fantastic, after I stopped oogling the task manager processer screen
Figure 1 : OOOOH CPUs
I ran into my first problem trying to start up any Hyper-V Guest images. When you try and start the virtual machines it fails with the following error…
An error occurred while attempting to start the selected virtual machine(s).
<virtual machine name> could not initialize
<virtual machine name> could not initialize. (Virtual machine ID <virtual machine GUID>)
Ok so there is a lot of posts out there relating to this error all bar one were complete red hearings for me but thankfully I found the knowledge base article from Microsoft explaining the problem. (http://support.microsoft.com/kb/2517374) But basically if your processor has the AVX feature – Advanced Vector Extensions whatever they are! This causes the problem. Microsoft did release a hotfix but thankfully this has been properly fixed in SP1 for 2008 R2 (I was going to upgrade to SP1 but I wanted my hyper-v stuff configured first – so lesson there is upgrade all the patches first!)
1. Enable desktop experience to make your life in windows 2008 a little more windows 7’esk.
2. After enabling the desktop experience load the ‘Themes’ service, also changing this service to start automatically. Then you can have some nice Bing theme to look at when you should be coding
3. Switch of ‘Enhanced IE’ security in server management as the web browser protections in place will drive you completely nuts and you waist a heap of time mucking about with internet security setting in IE and it has nothing to do with these!
Open Server Manager and look for the ‘Configure IE EC
4. IF you want to use wireless you enable this also from ‘Add Features’ within service manage just look for Wireless LAN services. And don’t waist time thinking you haven’t installed the correct wireless drivers
Hyper-V Issue 2
Ok so if your not using System Center Virtual Server Manager software and just the regular Hyper-V console you have an issue copying your VMs over from on Host server to the new Host server. The correct procedure is run the Hyper-V ‘Export’ feature on the source server, then run the ‘Import’ feature on the destination server. Fantastic but what if your source server dies and you are recovering from disk?
I started off by creating a new virtual server using the ‘New Server’ wizard then instead of creating a new virtual disc just pointed this to the source VHD file of the originating virtual server. This works fine unless you had some snapshots, which will simply get ignored.
Until I discovered that snapshots are essentially just differencing disk ie Source Disk + Snapshot Disk1 + Snapshot Disk 2 = your current server.
So the process is to you use the ‘Edit Disk’ option in hyper-v. Follow the wizard prompts and locate the most recent snapshot .AVHD file (If you have a number of snapshots then just look at the file modified date and pick the most recent one)
then select ‘Merge’ from Actions and select ‘Merge to Parent’
Wait a bit, perhaps drink some wine. Once this is completed just repeat until all your snapshots are merged into the parent .VHD file. (Note: If you have a number of snapshots and your not sure whats the most recent then just use the ‘Inspect Disk…’ option and this will show which each disk is parented to.
Then finally create a new virtual server and point this to the existing .VHD file.
Then, after you spend another day installing all the random applications that you forgot you needed on your dev machine and your done. Now you can get on with some SharePoint and Silverlight dev.
Hope this saves you some time. My final tip is don’t drink wine next to your laptop!