Fun with Hyper-V


So, this week I had an interesting encounter with Hyper-V. As many of you may know, Hyper-V is Microsoft’s version of Linux’s KVM; both are OS level hypervisors. However, I had not interacted with Hyper-V before this week. The situation I was faced with was trying to convert a VM that is on an ESXI server (my homelab) to run on the Hyper-V version on Server 2012 R2. After a bit of digging, I found StarWind V2V Converter, which appears to do what I am looking for. There was an additional complication, however. Windows 10 doesn’t run the configuration format that Windows Server 2012 R2 uses, and there doesn’t appear to be an easy way to create a vm with configuration version 5.0 (the version used by server 2012 R2) on Windows 10, even if you use powershell. Consequently, I had to download the Windows 8.1 ISO from Microsoft’s website, and install it on the ESXI server at the house.

Even though downloading installation media appears to be free now, you still need a product key to make it past Windows Setup when installing the operating system, at least you do for Windows 8.1. There is a way around that, which involves pressing shift+f10 to open command prompt to manually partition the disk and apply the image using the dism utility. I sadly lacked a Windows 8.1 product key, so I had to use the manual method to install Windows 8.1 on the VM.

After installing the operating system, the next reasonable step was to go into Windows Features and install Hyper-V, right? Sadly, Windows 8.1 apparently doesn’t like any form of nested virtualization; checking the options in the CPU section of the VM settings would still wouldn’t allow me to check the hypervisor checkbox in Windows Features.

To give me hints on how to solve this problem, I examined a couple of vmx files that belong to virtual machines I used for experimenting with malware, and found the option hypervisor.cpuid.v0 = "FALSE" present in the vmx files. Pasteing the line in the vmx file belonging to the Windows 8.1 vm solved the problem for me, and I was able to install Hyper-v on the vm.

With Hyper-v installed, I was able to convert the vm with no issues, which then allowed me to export and use an archiving utility like 7-zip to compress it. I then shipped over the compressed vm to be imported in the server 2012 r2 environment.


Leave a Reply

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