Hyper-V Test Lab Continued

I set up a few templates over the last few evenings, Windows 2008, Vista and Windows 2003.  I sysprepped them today and exported the VM’s.  I’ve noticed some funnies in the exports – the confix.xml retains the path to the VHD of the original machine.  This cause some problems when I copied the exports and re-imported them as new machines.

My lab machine has only so much disk and I’ve way more testing that I need to do.  I decided to use the VHD’s of my sysprepped templates as parents for differencing disks.  These differencing disks are what my VM’s use.  The idea is that the child disk stores on the differences between the VM that I run and the parent disk of the template.

I deployed them like this:

  • I created a template VM, sysprepped it and saved exported it.
  • I put the exported VHD somewhere safe.
  • I created a new VM but did not create a disk in the wizard.
  • I returned to the settings of the VM started creating a new disk.
  • The new differencing VHD was stored in the Virtual Hard Disks folder of the new VM.  It’s parent was the VHD of the exported template.
  • The new VM is powered up and runs the mini-setup wizard, i.e. I name the machine.

Simple and diskspace economic.  I can deploy more VM’s and they core OS is stored only once.  It’s perfect for a lab.  Obviously it’s going to be slower if running plenty of VM’s off the parent.  You wouldn’t do this for production but it’s fine for a lab.

HP NC373i Multifunction Driver, Hyper-V and VLAN Tagging

It’s critical that I be able to set up separate and secured VLAN’s in Hyper-V.  To do this you set up an External Virtual Switch with VLAN tagging enabled.

I’m using a HP DL380 G5 with the following configuration:

  • Windows Server 2008 x64
  • HP PSP 8.0
  • 2 * NIC’s: HP NC373i Multifunction Gigabit Server Adapter (V4.1.3.0)
  • Hyper-V RC1

The first NIC is set up for the parent partition (that OS you install first and manages Hyper-V locally).  It is attached to a normal Cisco switch port.  The second NIC will be used for the virtual switch.  It’s connected to a Cisco switch that’s configured to trunk a set of VLAN’s that the VM’s will run on.

I set up the VM’s and tried to set up the External Virtual Switch with VLAN tagging.  Problem – It failed with this error:

"Error Applying New Virtual Network Changes

Cannot enable virtual LAN (VLAN) identification. The virtual network switch is connected to a physical network adapter that does not support VLAN identification."

No matter what I did I couldn’t resolve this: driver updates (N/A), reinstalling the NIC, uninstalling HP software, etc.  I fired up a post on the Minasi forum and a server whiz called Willem Kasdorp sorted me out.  MS had documented a workaround which my hour of googling failed to turn up.  The cause of the problem was the NIC driver.  The solution was to open the properties of the parent partition’s NIC#2, configure the driver and set the VLAN ID to "1".  Now I could create my virtual switch and everything worked perfectly.

Credit: Willem Kasdorp.

EDIT:

While having this problem I opened a call with MS via my IT Pro Momentum account.  I got a quick response and they confirmed this solution.  Setting the VLAN ID of the physical card to a "non zero value" resolves the issue.

Hyper-V and VLAN’s

Following up on my recent posts on Hyper-V, I thought I’d write up a quick post on setting up multiple VLAN’s in Hyper-V.  In my research I found these posts:

They pretty much say everything that’s needed so you don’t need any whitepapers from me – I’m sure you’re glad to hear!

The concept is that you create a trunk on any physical switch ports that are connected to your VM’s.  You then publish the required VLAN’s to that trunk (forgive me – I’m not a Cisco guy; I just ask a local expert for what I want and he does a great job in doing it).  You can then VLAN tag either your virtual network in Hyper-V (if everything on that network, i.e. on that physical NIC, should be in the VLAN) or you assign VLAN tags to the VM’s.

This is quite secure.  You’re pretty much doing what you do in VMware ESX.  The machines with different VLAN tags cannot talk directly to each other without going through either a router or a firewall that connect the VLAN’s.  The VM’s can co-exist on a VLAN with physical hosts.

The thing you’ve got to watch out for is that the NIC associated with the virtual switch must support VLAN’s and accept packets with VLAN tags.

Credit: Virtual PC Guy.

BTW: I highly recommend that blog because it’s full of great information and sample VBS/Powershell scripts.

Just Deployed Hyper-V

I just deployed RC1 of Hyper-V for the first time.  Damn, it was easy.  Install the OS, download the Hyper-V RC1 update and install it, add the Hyper-V role and you’re all ready to create VM’s.  You need one NIC per virtual switch and at least one NIC for the parent partition.

One annoyance is that you cannot have  ontrol over the mouse if you RDP into the Hyper-V console until you’ve installed the integration services.  This is possible on Windows Server 2008 and Windows Server 2003 with SP2 – ah … you have to install the OS and then the SP before you can use your mouse.

The solutions are to use the Remote Hyper-V admin tool for Vista or aparently to RDP in from W2008.  Eek.  What if your Hyper-V servers are remotely located?  I don’t want to use an MMC over a WAN link.  That sucks!  RDP is the solution of choice. 

Still … I like Hyper-V so far.