How to Fix Hyper V Error 0x80070539

The Hyper-V error (0x80070539) typically appears as “The security ID structure is invalid” when starting or importing a virtual machine, immediately halting the operation. This error code means that the system is attempting to use a malformed or unresolvable security identifier (SID).

How to Fix 0x80070539 Hyper-V Error
How to Fix 0x80070539 Hyper-V Error


It usually occurs after moving virtual machines between hosts or domains, where the saved SID in the VM configuration no longer maps to a valid user or group. Another known cause is leftover or corrupted SID entries in the system registry, especially under the ProfileList key with .bak profiles.

When importing a virtual machine, Hyper-V may reference user or group permissions that no longer exist on the new host. If the associated SID doesn’t resolve to a valid account, the VM fails to start. Ensuring proper user permissions and cleaning up invalid registry entries usually resolves the issue.

1. Add a Valid User ID to the VM

This command grants VMConnect access to a specific user account, resolving permission issues that may occur after moving VMs between systems. It doesn’t fix SID-related errors in registry or VM configuration, but allows the current user to connect to the VM through Hyper-V Manager.

  1. Click on the Windows start menu and search for PowerShell.
  2. Right-click on PowerShell and select Run as Administrator.
    Open Windows PowerShell
    Open Windows PowerShell
  3. Run the following command in PowerShell. Make sure to replace the VM name, domain, and user name with the correct details for your setup:
    Grant-VMConnectAccess -VMName <Name of VM that is not starting> -UserName <Domain and username of the current user>
    Run the VMConnectAccess Command
    Run the VMConnectAccess Command
  4. Try launching the VM and see if the access issue is resolved.

For example, if your VM is called “appuals”, you would use this command:

Grant-VMConnectAccess -VMName "appuals" -UserName ".\Administrator"

Avoiding the Error in the Future

To avoid this error from happening again, it’s essential to migrate or move Hyper-V VMs using supported and secure methods that preserve permissions and account mappings.

  1. Perform Hyper-V Live Migration
  2. Use PowerShell to Move the VM
  3. Export and Import the Hyper-V VM
  4. Use a third-party migration tool

1. Perform Hyper-V Live Migration

This method moves active workloads between machines without shutting them down. It retains all associated permissions and configurations, making it one of the safest ways to relocate resources without breaking security links.

  1. Open the Server Manager and go to Tools > Hyper-V Manager.
  2. Right-click on Hyper-V Manager and choose Connect to Server.
    Connect to a Server in the Hyper-V Manager
    Connect to a Server in the Hyper-V Manager
  3. Enter the name of the server you want to connect to and click OK.
  4. In the Virtual Machines pane, select the server.
  5. Right-click on the VM you want to move and select Move.
    Move the VM in the Hyper-V Manager
    Move the VM in the Hyper-V Manager
  6. Follow the Move wizard to complete the migration.

2. Use PowerShell to Move the VM

Moving the instance using scripting tools ensures that configuration data, permissions, and storage paths are preserved properly. This reduces the chances of permission conflicts during the transition.

  1. Open PowerShell as an administrator and run this command:
    Move-VM VMTest TestServer -IncludeStorage -DestinationStoragePath D:\VMTest
  2. Be sure to replace “VMTest” with your VM’s name, and “TestServer” with your target server’s name.

3. Export and Import the VM

Exporting creates a complete backup that includes all necessary files and configuration data. Re-importing it on a different machine sets up the environment from scratch, bypassing many manual reconfiguration steps.

3.1. Export VM

  1. Open Hyper-V Manager and right-click on the desired VM.
    Export VM in the Hyper-V Manager
    Export VM in the Hyper-V Manager
  2. Select Export and choose where you want to save the exported VM files.
  3. Click Export and wait for the operation to finish.

3.2. Import VM

  1. Open Hyper-V Manager and right-click on the destination host.
    Import Virtual Machine in the Hyper-V Manager
    Import Virtual Machine in the Hyper-V Manager
  2. Select Import VM and follow the instructions on the screen to complete the process.

4. Use a Third-Party Migration Tool

You can also use external apps or services to migrate Hyper-V VMs across systems or domains. Some of these tools handle permission mapping automatically and reduce the chance of SID mismatches. Examples include:

  • Veeam Backup & Replication
  • StarWind V2V Converter
  • Altaro VM Backup
ABOUT THE AUTHOR

Raza Arshad


Raza Arshad is a certified Google IT Support Professional. With a keen eye for detail and a passion for problem-solving, he excels in identifying and resolving bugs and Windows-related issues. Armed with a deep understanding of computer systems, Raza effortlessly navigates through complexities to pinpoint the root cause and implement effective solutions. His exceptional skills in bug detection and Windows troubleshooting make him a valuable asset in any IT support team.