Cannot turn off "Nested virtualization" in Windows Admin Center
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?
Solution 1:
or...
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $false
Solution 2:
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:
-
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. -
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 usingcopy <FILENAME>.vcmx <FILENAME>.vcmx.backup
. Afterwards, download the file. Make an extra backup! -
Using a Hex editor such as HxD, open the file and search for
nested_virtualization
. Between that and textenable_perfmon_pmu
, you should see a view like this. Offset/start position is different and changes with each VM.
- After the text
enabled
(in hex65 6E 61 62 6C 65 64
), you will see a hex sequence00 01
. Change that sequence to read00 00
.
-
Save the modified file, upload and replace the original one (you may need to use Powershell to copy and overwrite the file)
-
Start the VM again - the VM should start normally as before the change.