Hyper-V Enable Nested Virtualisation

Enable Nested Virtualisation KB ID 0001888

Problem

If you want to enable virtualisation in a VM that is running inside Hyper-V (itself a hypervisor). Then you need to expose the virtualisation elements of the physical hosts processor to the nested VM.

In the case of Intel VMs that’s VTx and EPT. (For Intel based CPUs). Under VMware you would simply enable “Expose hardware assisted virtualisation to the guest OS” But in Hyper-V you do not get that option.

Solution: Enable Nested Virtualisation

Well in truth you do get that option, you’ve just got to run a bit of PowerShell on the host. Note THE VM MUST BE POWERED OFF FIRST!

[box]

Set-VMProcessor -VMName {Name-of-VM} -ExposeVirtualizationExtensions $true

[/box]

Nice and easy

Related Articles, References, Credits, or External Links

VMware Workstation – Error – ” Virtualized Intel VT-x/EPT is disabled”

Cluster: Not Reachable On UDP Port 3433

KB ID 0001621

Problem

Seen on a Microsoft Hyper-V failover cluster (Server 2019);

Network Interfaces {Node-Name} {Interface-Name} and {Node-Name} {Interface-Name} are on the same cluster network, yet address {IP-Address} is not reachable from {IP-Address} using UDP port 3433

Solution

I’ve seen this error before, and usually you just need to disable the firewall or open UDP port 3433 and then re-validate the cluster (job done). However, in my case the following was true;

  • All IP addresses could ‘ping’ the IP addresses that it was telling me it could not communicate with.
  • All local firewalls were turned off on the domain profile.
  • No AV was running, or third party firewalls were installed.

There seemed to be no reason for this, I disabled and re-enabled the ‘Live migration’ NIC and 50% of the links ‘went green’ but then the Live Migration link said ‘partitioned‘ 🙁

In the end, (even though the cluster was in a failed state) I moved all my VMs onto one Host, then ran Windows update, and bounced the server, then repeated the process on the other host and the problem went away. I don’t know it it was a bug/update/driver problem, but fingers crossed it’s been OK since.

Related Articles, References, Credits, or External Links

NA

Virtualising Hyper-V ‘Validation Fails’

KB ID 0001580

Problem

Normally if you saw this error, it would mean that you didn’t have the advanced virtual extensions turned on, in the physical machine’s BIOS. But here I’m installing on Hyper-V in a vSphere/ESX environment;

Validation Results
The validation process found problems on the server which you want to install features. The selected features are not compatible with the current configuration of your selected server. Click OK to select different features.

Hyper-V cannot be installed: The processor does not have required virtualisation capabilities.

Solution

The VM in question needs to be ‘Powered Off’. Then edit its settings > VM Options > Expand CPU > Hardware virtualisation > Tick “Expose hardware assisted virtualisation to the guest” > OK.

Power on the VM, and then install the Hyper-V role.

Virtualising Hyper-V on Hyper-V

You need to expose the underlying virtualisation extensions on Hyper-V as well, with the following command;

[box]

Set-VMProcessor -VMName “server-name” -ExposeVirtualizationExtensions $true

[/box]

You also need to enable ‘MAC Spoofing’ on the advanced settings of the network card of the VM.

Related Articles, References, Credits, or External Links

NA

Convert (VMware) VMDK to (Microsoft) VHD/VHDX

KB ID 0001516

Problem

Recently I’ve looked a lot at converting VMware resources to either Hyper-V, or Azure. But what if you want to take a Microsoft machine (or workload) and run it in VMware? 

Well the easiest way is to use some freeware, “StarWind V2V Image Converter”. These days I’m dubious about any piece of freeware, because it’s either a) Not Free when you actually want to use it in anger, b) Full of adware and nastiness, c) Just a vehicle to get your email address to send you marketing and junk.

Well you do need to supply an email address to get it but, other than suggesting I might want to take a look at their free VSAN software, they have left me alone (ThanQ).

Solution

Launch the software, and browse to the folder containing your .vhd to .vhdx file. (Note: You can connect directly to a Hypervisor if you wish).

Again I’m going to output to a local file, (faster) but as above, you can output to a Hypervisor. (I’ll simply just SCP the image into VMware and create a VM with it, when I’m finished).

Select your output type, basically they are; VMware Workstation (thick or thin), Stream optimised (.OVA), or the one we want, ESXi.

Note: You can also output to RAW file or GQCOW2 (Handy for if you run EVE-NG and what to upload a server/workstation into it!)

Time for a coffee! Hopefully this is what you will see.

Related Articles, References, Credits, or External Links

NA

Manually ‘Installing’ Microsoft Integration Services Drivers

KB ID 0001512

Problem

If your OS is 2008R2 or newer then you wont need to do this as the drivers are already included. But what if you have a machine that you want to put the drivers in before you virtualise or migrate it. Well if you mount the ISO and run it this happens;

Unsupported Guest Environment
The Hyper-V integration services can only be installed inside of a virtual machine running Hyper-V

Bah! You are not the boss of me! I want the drivers in here because I’m about to virtualise it!

Solution

Mount the Integrations Services ISO on the machine (or open it with 7Zip and treat it like a zip file)

If you have Hyper-V 2016 or newer and cant find the iso, Microsoft handily don’t include any more, because it’s a massive 29Mb is size? (Yeah I don’t understand either?) Here’s a copy. Go to the x86 or amd64 directory depending on whether you are x32 or x64 bit. locate the Windows{Version}-HyperVIntegrationServices-{processor-version}.cab  that matches your machine and copy it to your desktop. Then open it, select all the files.

Download Microsoft Integration Services Disk

Extract the file to a folder.

Open an administrative command prompt, then change directory to the folder you extracted all the files into. Run the following command;

[box]for /f %i in (‘dir /b /s *.inf’) do pnputil.exe -i -a %i[/box]

It will run though and install all the drivers, you may get some warnings that some of the drivers are unsafe or unsigned. Just say install them anyway.

Note: If you are on Server 2003, then there are a bunch of KB updates on the CD that you will also need to install.

Related Articles, References, Credits, or External Links

NA

Conversion Error ‘Unsupported Disk Database Entry’

KB ID 0001508

Problem

Seen when attempting to convert a VMware disk (.vmdk) file to a Microsoft disk (.vhd or .vhdx) with Microsoft Virtual Machine Converter.

Microsoft Virtual Machine Converter encountered an error while attempting to convert the virtual machine.
Details: The entry “{value}’ is not a supported disk database entry for the descriptor.

If you click on the ‘Log‘ link you will see something line this;

The entry 1 is not a supported disk database entry for the descriptor.

You will see a similar error ,if you use the ConvertT0-MvmcVirtualHardDisk PowerShell command;

[box]

ConvertTo-MvmcVirtualHardDisk : The entry 1 is not a supported disk database entry for the descriptor.
At line:1 char:1
+ ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath $Winfolder\$VMDK -Vh …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Accel…nversionService:DriveConversionService) [ConvertTo-MvmcVirtualHardDisk], VmdkDescriptorParseException
+ FullyQualifiedErrorId : DiskConversion,Microsoft.Accelerators.Mvmc.Cmdlet.Commands.ConvertToMvmcVirtualHardDiskC
ommand

ConvertTo-MvmcVirtualHardDisk : One or more errors occurred. At line:1 char:1
+ ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath $Winfolder\$VMDK -Vh …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Accel…nversionService:DriveConversionService) [ConvertTo-MvmcVi rtualHardDisk], AggregateException
+ FullyQualifiedErrorId : DiskConversion,Microsoft.Accelerators.Mvmc.Cmdlet.Commands.ConvertToMvmcVirtualHardDiskC
ommand

 

[/box]

Solution

I did some searching and found this was a common error, and that most people were fixing it with a tool called dsfok and using that to extract the descriptor file, and then edit it. Which is great, but all the examples had paths to the vmdk on Windows machines? 

My VMDK was on an ESXi Datastore, (where you would expect it to be). I wasn’t about to start copying vmdk files off to Windows and back again. So I needed a solution that would work in LINUX and was quicker and easier, (I am lazy after all).

There’s two ways I found to fix this, if you are happy using a vi editor in Linux then use option 1, if you are a Windows type and prefer doing things with a GUI then use option 2.

Background: In an ESX environment VM-Name.vmdk is not actually the hard disk, that’s usually called VM-Name-flat.vmdk, the descriptor in your error message, you can find in the VM-Name.vmdk file. (which you can edit in a text editor).

Option 1 – Linux and Vi

SSH into your ESXi host, then change directory to the datastore that has the VM in it;

[box]cd /vmfs/volumes/{Datastore-Name}[/box]

Enable SSH Access to VMware vSphere ESX

Change directory to the folder with your VM in it, and here you can see the VM-Name.vmdk and the VM-Name-flat.vmdk file I was taking about. Edit the file using vi (vi vm-name.vmdk).

OK, remember my initial error? It was talking about a value of “1” I’ve only got one entry with that value ‘ddb.toolsInstallType = “1”‘, simply comment that line out by prefixing it with a hash, (or pound sign if you’re American). Save and exit the file, then retry the conversion. 

Note: If it wont let you edit the file, you may need to shut down the guest VM.

Using the VI Editor (For Windows Types)

Option 2 – Windows and WinSCP

Download WinSCP and use it to connect to your ESXi host (SSH needs to be enabled). Navigate to vmfs > volumes > {Datastore-name} > {vm-name} locate the VM-Name.vmdk file and download it to your Windows machine.

You can now edit the file, as above locate the offending line, prefix it with a hash (pound) symbol so that it is ignored, then simply save and upload the file back again, (choosing ‘yes‘ when prompted to overwrite the file). Then retry the conversion.

Related Articles, References, Credits, or External Links

NA

Hyper V: Add a VM as a Cluster Resource

KB ID 0001390

Problem

If you have a Hyper  V cluster, then you should add virtual machines with ‘Failover Cluster Manager’ but if someone does not, (i.e. they add them directly to a host), then you wont see them in the list! So how do you add them in?

Solution

In Cluster Failover Manager > Right Click the failover node > Configure Role.

Next.

Scroll down and select Virtual Machine > Next.

Non clustered VM’s will be shown select the VM(s) as required > Next.

Next.

Finish

Related Articles, References, Credits, or External Links

NA

Hyper V: Live Migration Error 0x80071008

KB ID 0001387

Problem

When attempting to perform a ‘live migration’ of a virtual machines storage, this happened.

Error
Invalid Parameter Code 0.80071008

Solution

Oddly I had already moved one of the virtual machines drives to another cluster, before this happened, so I was a little confused. To get the migration to work, I needed to ‘unmount’ the parent VMs mounted .ISO file.

The set the migration going again.

Related Articles, References, Credits, or External Links

NA

Hyper V: Get All The Guest VM IP Addresses

KB ID 0001386

Problem

Getting the IP address for an individual guest VM is easy enough, but if you have a lot of guest VM’s then you need some PowerShell.

Solution

To get the IP’s of all the Guest VM’s on an individual Hyper-V host, use the following syntax;

[box]Get-VM | Select-Object -ExpandProperty NetworkAdapters | Select-Object VMName,IPAddresses | Format-Table -Auto[/box]

Note: The entries with no IP, are either powered off, (or are VM replicas).

But if you have a Hyper-V cluster, you would have to do this on every host. Or you can use the following syntax;

[box]Get-VM -ComputerName (Get-ClusterNode)| Select-Object -ExpandProperty NetworkAdapters | Select-Object VMName,IPAddresses | Format-Table -Auto[/box]

Related Articles, References, Credits, or External Links

NA

Hyper-V Creating a NAT Network and vSwitch

KB ID 0001384

Problem

I’m without access to all my test equipment at the moment, so when I needed to do some testing, I thought I’d use Hyper-V on my new work laptop. I needed to ‘knock up’ a quick vSwitch that would NAT my test machines, to my laptops connected NIC.

Solution

Open an administrative PowerShell window, and execute the following three commands. Note: You can change the values in RED to suit your own requirements, or leave them as they are to copy my network setup.

[box]

New-VMSwitch -SwitchName "NAT-Switch" -SwitchType Internal

New-NetIPAddress -IPAddress 192.168.200.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NAT-Switch)"

New-NetNAT -Name "NAT-Network" -InternalIPInterfaceAddressPrefix 192.168.200.0/24

[/box]

As far as Hyper-V is concerned that’s it! Now simply connect your virtual machines to the new switch.

Remember you have a NAT switch, it’s not doing DHCP, you will need to assign your virtual machines static IP addresses, though you can of course configure a DHCP server on one of your virtual machines.

 

Related Articles, References, Credits, or External Links

NA