{"id":27,"date":"2022-02-20T00:11:08","date_gmt":"2022-02-20T06:11:08","guid":{"rendered":"https:\/\/blog.carlos1001.com\/?p=27"},"modified":"2022-02-20T00:11:08","modified_gmt":"2022-02-20T06:11:08","slug":"fun-with-hyper-v","status":"publish","type":"post","link":"https:\/\/blog.carlos1001.com\/?p=27","title":{"rendered":"Fun with Hyper-V"},"content":{"rendered":"\n<p>So, this week I had an interesting encounter with Hyper-V. As many of you may know, Hyper-V is Microsoft&#8217;s version of Linux&#8217;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&#8217;t run the configuration format that Windows Server 2012 R2 uses, and there doesn&#8217;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&#8217;s website, and install it on the ESXI server at the house.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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&#8217;t like any form of nested virtualization; checking the options in the CPU section of the VM settings would still wouldn&#8217;t allow me to check the hypervisor checkbox in Windows Features.<\/p>\n\n\n\n<p>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 <code>hypervisor.cpuid.v0 = \"FALSE\"<\/code> 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.<\/p>\n\n\n\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, this week I had an interesting encounter with Hyper-V. As many of you may know, Hyper-V is Microsoft&#8217;s version of Linux&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6,5,7],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-esxi","tag-hyper-v","tag-vm"],"_links":{"self":[{"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":3,"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions\/30"}],"wp:attachment":[{"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.carlos1001.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}