to Hyper-V and back again

Hello everyone!

I have been trialling out Microsoft’s own attempt at the virtualization game with Hyper-V for around 6 months now on a dell 3010SFF tower under my bed. It’s an ideal location for it as it’s next to my core 1GB/S switch and there is plenty of power sockets about too.

 

The Hyper-V setup is as follows:

Core I5 2500K @ 3.2GHz

16GB RAM

500GB Sata HDD

Standard dell cooler / PSU

on-board Gbe NIC and one PCI GBE NIC

The networking is configured so the PCI NIC is used in my DMZ and the On-board NIC went straight onto my internal network.

 

I installed Server 2012R2 on the host machine. Nothing special on the options. Once it was installed I configured it to use the name A11-VHOST-1 and made it part of my ainsey11.local Active Directory Domain. Set the IP address to 10.1.1.5 on the internal NIC and then also configured my DMZ interface to one of my routed external IP’s. Checked the internet connectivity on both NICS and then ran windows updates. Once that was all done it was time to get configuring.

I created two Virtual Switches, one called A11-VHOST-1-LAN and A11-VHOST-1-DMZ just to keep in line with my naming conventions. When creating these I set the LAN interface to External and bridged with the right interface. I also repeated for the DMZ.

My next step was to help me out with resource allocation. Windows always keeps 1GB of RAM for itself to keep running, but I changed this to 512MB to give me a bit more memory overhead.

If you want to know how there is a good article here

Quick reboot to apply the changes.

Now I can get started building my VM’s!

this is where I ran into my first couple of problems, Hyper-V does not have a clone function for cloning VM’s. It also doesn’t have a template function for customized image deployments. I gave up hunting for a feature that doesn’t exist and started to create a VM manually. I installed Server 2012 R2 in the guest VM, with 2GB ram, NIC on the LAN and a 40GB disk. Once this was installed I ran updates (standard procedure really) and configured it as a secondary domain controller in my domain with DNS and DHCP running. My first DC also has this and I then set up failover DHCP scopes for my ipv4 network. I tried to do the same for my V6 network however it seems that Microsoft have not implemented the ability to do so yet. I’ll just use stateless configuration for now.

I carried on to build several more servers on it, some of which were linux. the main one was my NTP server that is part of the NTP pool project and lies in the DMZ.  It seems that Hyper-V doesn’t have the best Linux virtualization capabilities. Dynamic RAM doesn’t work in the OS and veeam struggles with the backup speeds on linux guests when doing indexing.

I kept this configuration for 6 months, and it ran well but I found it really unstable under high load. Even after i changed the host ram reservation to 2GB. I suspect it would be related to the HDD in the dell but nothing was particularly disk intensive. However to eliminate that I configured it to use my NAS as shared storage (gets around 130mb/s) and the Guests seemed to be better but not great. There are too many variables to work out the issue.

Recently I added another VMware host into the Data shed. Instead of adding it to my current VMware infrastructure (powered off at the moment) I set up ESXI and vSphere, it ran like a dream for an 8 year old HP DL380 G5. I have been running this alongside the Dell in my bedroom for a few weeks and I am going to replace the dell’s OS with ESXI too. Now for the fun part.

I want to do this with minimal downtime, not because it’s important on my network. More of a practice for a production environment if I get the opportunity to perform one.

My plan is to….

  1. move the VM’s off VHOST-1 and onto VHOST-2 (server in the data shed)
  2. Add more HDD’s into VHOST-1 (1*ssd and 2*1tb HDD’s)
  3. Install ESXI onto the VHOST-1 and perform basic configuration
  4. Add VHOST-1 into my vCenter server
  5. Migrate Vm’s back from VHOST-2 onto VHOST-1

To get hold of the VHDX files from the Hyper-v server I have used a 3rd party software called Star Wind. This pulls the files off the hyper-v host and converts them into the VMDK files that VMware can interpret. However there is a slight issue that causes the vm not to boot once imported into the VMware server once the vm has been converted.

This issue hasn’t been hi-lighted on any of the support pages for the converter software so I have raised it with them (not heard anything back yet).

When the converted changes the files it keeps the hyper-v hardware configuration. This causes some issues with the VMware host because the VM cannot boot with the Hyper-V SCSI controller settings. To fix this you have to use the Vcenter server standalone tool to re-configure the virtual machine so the server can boot the vm cleanly. I would have used this tool all along but it will not work with server 2012 R2 hyper-V instances.

This all went fine for me on my small scale network but I have thought of some problems that you may run into when migrating a guest domain controller and any other server that has data changing on it. When you export the disk an move it over via converting there is no way to make sure that the new VM has synced all changes. For example, if someone creates a file on the existing server after I convert it then that file will not be on the new VM.  You could use robocopy to check to a file server but it wouldn’t be a great way of doing things.

This would be an even bigger issue when migrating domain controllers. If a new RID is allocated from the RID master or another change is made in AD (password resets etc) then the changes will not be on the converted server and potentially cause issues. This would be a massive risk in a production environment and it would be better to create a new domain controller, migrate the fsmo roles (if old one held any) then demote the original. This would mean all changes are replicated and there is no downtime.

Microsoft say if you have a server 2012 Functional Level then the Domain controllers are snapshot aware so if (for example) a new RID block is allocated to a DC then you revert it to a checkpoint / snapshot the DC holding the RID master FSMO role will then re-allocate that block of RID’s to the domain controller. I’m not sure how this works if the server that you revert is the RID master but finding that out is for another day. I would also like to know if you would have to seize the FSMO roles back from a DC if you migrate the role from another server then revert from snapshot on the destination server after it has been moved…… if anyone has tried this please leave a note in the comments 🙂

 

Happy Tinkering

 

– Ainsey11

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *