While starting a virtual machine on Hyper-V, if you get An error occurred while attempting to start the selected virtual machine(s) or ‘VM’ could not read or update virtual machine configurations: The security ID structure is invalid error along with an error code 0x80070539, here is how you can fix it. It arises due to some inadequate permission and setting. Therefore, you can go through the following guide to get rid of this problem.
The entire error message says something like this:
An error occurred while attempting to start the selected virtual machine(s).
‘vm-name’ could not initialize.
An attempt to read or update virtual machine configuration failed.
An attempt to read or update virtual machine configuration failed.
‘vm-name’ could not initialize. (Virtual machine ID)
‘vm-name’ could not read or update virtual machine configuration: The security ID structure is invalid. (0x80070539). (Virtual machine id: your-vm-ID)
For your information, this error appears when you move a virtual machine from one environment to another. It could be the same PC or two different computers. As it is possible to move the virtual machine from one environment to another, many people often do that without taking precautions. If you have done it for the first time, you may get this aforementioned error while starting the virtual machine after the migration.
That being said, you need to reset the security ID in the virtual machine configuration. Although Hyper-V assigns one to the new virtual machine, it doesn’t do the same thing for the migrated machines. That is why you need to do it manually using PowerShell.
VM could not initialize, 0x80070539 Hyper-V error
To fix VM could not initialize, 0x80070539 Hyper-V error, follow these steps:
- Search for powershellin the Taskbar search box.
- Click the Run as Administrator option.
- Click on the Yes button on the UAC prompt.
- Enter this command: Grant-VMConnectAccess -VMName “vm-name” -UserName “Domain and username of the user”
- Close PowerShell and try restarting the virtual machine.
To know more about these steps, continue reading.
To get started, you need to open Windows PowerShell with administrator privileges. For that, search for powershell in the Taskbar search box and click on the Run as Administrator option. Then, click on the Yes button on the UAC prompt to open the PowerShell.
Next, you need to enter this command:
Grant-VMConnectAccess -VMName "vm-name" -UserName "Domain and username of the user"
Don’t forget to replace the vm-name with the virtual machine name and Domain and username of the user with the current username.
Once done, close all windows, and try to restart the virtual machine.
Read: Fix 0x800f080c Hyper-V error on Windows
What is error code 80070005 in Hyper-V?
This error implies that the Virtual Machine ID or SID is missing on the virtual hard disk file. In other words, you need to assign the SID to your VHD or AVHD file. You can do that with the help of the Command Prompt and this command: icacls <.vhd or .avhd file path> /grant “NT VIRTUAL MACHINE\ <vm-ID > “:(F).
Why is VHDX not booting Hyper-V?
There could be countless reasons why VHDX is not booting in Hyper-V. From a missing file or corruption to incorrect configuration to insufficient permission, anything could be responsible for this error. Depending upon the error, you could fix the problem by rebuilding the virtual hard disk file.
Read: Hyper-V encountered an error while loading the virtual machine configuration.