Score:3

Cannot turn off "Nested virtualization" in Windows Admin Center

cn flag

While doing VM testing, I have, out of curiosity, ticked Enable nested virtualization in the Processor tab in Windows Admin Center (Version 2103.2 Build 1.3.2105.24004).

Trying to start the VM returns this error, which makes sense:

RemoteException: Failed to start virtual machine VM NAME. Error: 'VM NAME' failed to start. 'VM NAME' could not initialize. The virtual machine could not be started because this platform does not support nested virtualization. 'VM NAME' failed to start. (Virtual machine ID ) 'VM NAME' failed to start worker process: Unspecified error (0x80004005). (Virtual machine ID ) 'VM NAME' could not initialize. (Virtual machine ID ) The virtual machine could not be started because this platform does not support nested virtualization. Consider not exposing virtualization extensions to the virtual machine.

However, after this change, I am unable to untick Enable nested virtualization, as saving immediately ticks it again. How do I disable it so the VM can run again?

Score:4
us flag

or...

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $false

djdomi avatar
za flag
this is the official way also suggest by the MCSA 2016 :)
Score:1
cn flag

This appears to be a bug (I have submitted it through the WAC feedback form) and cannot be resolved even using Hyper-V manager. The built-in Powershell tools do not appear to have the appropriate commands to do so either, unless you have System Center, which adds a command called Set-SCVirtualMachine. I have not tested that though.

I have resolved it the following way:

  1. In Windows Admin Center, use Files & File Sharing module to navigate to the VM save location. The folder should contain a .vmcx file, which is the configuration.

  2. You may not be able to directly download (and later upload and replace) the file. In that case, enter commandline on the host (for example through Powershell module) and copy the <FILENAME>.vcmx file to <FILENAME>.vcmx.backup, by just using copy <FILENAME>.vcmx <FILENAME>.vcmx.backup. Afterwards, download the file. Make an extra backup!

  3. Using a Hex editor such as HxD, open the file and search for nested_virtualization. Between that and text enable_perfmon_pmu, you should see a view like this. Offset/start position is different and changes with each VM.

HxD view

  1. After the text enabled (in hex 65 6E 61 62 6C 65 64), you will see a hex sequence 00 01. Change that sequence to read 00 00.

HxD view with highlight

  1. Save the modified file, upload and replace the original one (you may need to use Powershell to copy and overwrite the file)

  2. Start the VM again - the VM should start normally as before the change.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.