While moving my Lab to a new environment using the Hyper-v Export and Import VM options, I ran into an “‘Unnamed VM’ could not initialize… The security ID structure is invalid” error when trying to start the Domain Controller Virtual machines.
After doing some research, I found out that after a VM Import, Hyper-v doesn’t know how to handle an invalid or non existent security id or user that had been granted virtual machine screen access. This ID is referenced in the VM configuration file.
To resolve this, I used the
Grant-VMConnectAccess cmdlet to add VM Screen access permission to the local administrator account:
Grant-VMConnectAccess -VMName dhcp00 -UserName administrator -Verbose
I made sure to run the cmdlet in an administratively run powershell session. After running the cmdlet, the Domain Controller VMs started successfully.
Running dcdiag showed the Domain Controllers in a stable state. I used the same process to move other VM’s running specific services, including Exchange Server 2010 and testing to make sure all required services are running using
Test-ServiceHealth cmdlet. The process also helped test one of the options that could be used as a Disaster Recovery procedure if necessary.