I believe in Hyper-V!

Windows 10Category Archives

How to create Hyper-V virtual machine on Windows 10 to be compatible with WS2012 R2 [Version 5.0 – Backward Compatibility]

Hi there,

In this blog post I’d like to explain how to create Hyper-V virtual machine on Windows 10 to be compatible with Windows Server 2012 R2!
In the last couple of months my users are using Windows 10 on the local machines, (desktops and laptops) and sometime they need to move virtual machines created on the Windows 10 to Hyper-V hosts which have been using Windows Server 2012 R2 as OS.
When you create virtual machine on Windows 10, Configuration Version is 7.0 and you cannot change that or during virtual machine creation choose configuration version.
From the other side, virtual machine configuration version on Windows Server 2012 R2 is 5.0 and we cannot import virtual machine created on Windows 10 to Windows Server 2012 R2 because of differences on configuration version.

VMConfVer
So, what we can do in that case?
The first; if we have virtual machine with configuration version 7.0, we can copy .VHDX on Hyper-V host with WS2012 R2, create new virtual machine and add copied virtual disk. But, we lost virtual machine configuration and checkpoints.
The second; we can create virtual machine on Windows 10 through PowerShell, where can choose virtual machine configuration version.
Here is an example, and full script you can download .ps1.
1

Enjoy virtualization Winking smile

Cheers

Romeo

Hyper-V nested virtualization made my life easier [Datacenter on my laptop]–Part I

Hi there,

I’d like to show you how I have been creating the small datacenter on my laptop. Thanks to Hyper-V nested virtualization, now I can run Hyper-V Cluster inside my laptop and can try all new features and the most important, I can troubleshoot without to affecting production environment.
I have three SSDs, 32GB of ram, i7 CPU and Windows 10 build 10586 installed.
image
image

The scenario is as follows:
1. Hyper-V hosts runs on Windows Server 2016 TP4
2. Set Hyper-V hosts in a separate network segment.
3. Install virtual machine with Remote Access role [Internet access for the VMs] I’ll write about this configuration in my next post…
2. Install of Hyper-V Cluster with four nodes. [for Storage Spaces Direct]
3. Create an Active Directory domain for the future lab

Setup environment on the laptop

After Hyper-V role installed I set virtual network adapters. On the pictures below you can see two of virtual networks, two External networks and one Internal network.
Druga

External network will use for internet access and internal network will use for the lab environment only, but still, virtual machines from the internal network will be able to go on the internet because of router between external and internal network. In the next blog post I’ll write about how to setup Remote Access role in Windows Server 2016 TP4

Create virtual machines and enable Nested virtualization

As you can see I created five virtual machines, one called Router and four Hyper-V nodes
Router virtual machine has a 2GB of ram (dynamic memory), 1CPU and small dynamically expanding virtual disk, but the Hyper-V nodes have 4-6GB of ram, 4CPUs and 100GB of virtual disk. Why I mentioned Hyper-V hardware resources? Because this is very important!
To enable Nested Virtualization in Hyper-V, Microsoft created a script you can use or you can do it manually following this steps:

  • Disable Dynamic Memory on every Virtual Machine on which you want run nested virtualization
  • Enable MAC Address Spoofing
  • Set minimum of 4GB RAM per virtual machine
  • Enable Virtualization Extensions on the vCPU

To set the Virtualization Extension for the vCPU use PowerShell command:
Set-VMProcessor -VMName “Hyper-V host name” -ExposeVirtualizationExtensions $true

image

Hyper-V nested virtualization has some limitations!
More about Hyper-V nested virtualization you can read on Thomas Maurer blog.

imageCetvrta

Now we are ready to install Hyper-V role on the Virtual Machines in the environment. You can install Hyper-V role through GUI or PowerShell, your choice. If you like GUI go to Server Manager –> Add Roles and Features and follow the wizard. If you prefer PowerShell, open PowerShell in elevated mode and run:

Install-WindowsFeature –Name Hyper-V -ComputerName <computer_name> -IncludeManagementTools -Restart

After server restart we have Hyper-V role installed and we are almost ready to go. I recommend setting default location for Virtual Machines configuration files and VHDXs as well. In this case I’ll put VMs in C:\\Hyper-V folder, than will setup virtual network.

67

I did the same on every virtual Hyper-V host in my environment!

Now we are initially prepared. The next step is “Router” installation. That will be virtual machine with Remote Access role installed as I mentioned above.

Until next post stay tuned Smile

Cheers,

Romeo

Windows 10 Insider Preview–Build 10565 and Hyper-V virtual network adapters

Hi to all,

Few days ago I decided to update OS on my laptop to Windows 10 Enterprise Insider Preview Evaluation copy, Build 10565 from the previous version. To be clear, I have installed Hyper-V role, few of virtual machines and two of external virtual adapters as can you see on the picture below.

image

After installation finished and laptop restarted, virtual network adapters was broken and unusable.

Issues:
Cannot use virtual network adapters anymore, cannot delete virtual network adapters and cannot do anything with virtual network adapter, but still… Winking smile

How to resolve:
Uninstall Hyper-V role, install again, create new virtual switches and go ahead.

Advice:
Friend of mine Tomica asked me; Romeo, why you didn’t uninstall Hyper-V role before update? Smile
So, uninstall Hyper-V role before of Build 10565 installation and you will not have any problem.

Cheers!

Romeo