About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A Hyper-V virtual machine that will not start shows "An error occurred while attempting to start the selected virtual machine(s)" and then "Failed to Power on with Error 'General access denied error'" or "Account does not have sufficient privilege to open attachment", with the code (0x80070005). A related message reads "'Unnamed VM' failed to initialize." Microsoft's cause is plain: the permissions on the virtual hard disk (.vhd), the snapshot file (.avhd) or the VM configuration file do not include the virtual machine's own ID. The fix is to add that ID back with icacls, after saving the existing permissions.
What the error means
Each Hyper-V virtual machine has a unique Virtual Machine ID, which Microsoft calls a SID. Microsoft's page says: "If the Virtual Machine SID is missing from the security permissions on the .vhd or .avhd file, the virtual machine does not start, and you receive the error 0x80070005 (General access denied error)".
The message names the file that failed and the Virtual Machine ID at the end of the line, so the error gives you both inputs for the fix. The page notes that the message may name "either the Microsoft Emulated IDE Controller or the Synthetic SCSI Controller", and "either a virtual hard disk (.vhd) file or a snapshot file (.avhd)". A second form refers to the configuration file instead: "failed to read or update the virtual machine configuration because access was denied: General access denied error (0×80070005). Check the security settings on the folder in which the virtual machine is stored."
The page's scope is "Supported versions of Windows Server". It does not say how the entry went missing. A file copied or restored by a method that does not carry permissions is a possible suspect, but only a look at the permissions proves it.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The VM ID is missing from a disk file | "Account does not have sufficient privilege to open attachment" with a .vhd or .avhd path |
icacls on that file lists no NT VIRTUAL MACHINE\ entry with the ID in the message |
| The VM ID is missing from the configuration file | "failed to initialize"; "failed to read or update the virtual machine configuration because access was denied" | icacls on the configuration file (the page's example is the .xml file named with the VM ID) |
| Several files in a chain are affected | Fixing one file moves the error to the next | Repeat for each disk and snapshot file the VM uses |
The NT Virtual Machine\Virtual Machines account lacks Log on as a service |
Many VMs fail together | Group Policy or Local Security Policy User Rights Assignment |
| An antivirus filter blocks the files | Permissions look right but access is still denied | Exclusions against Microsoft's antivirus exclusions for Hyper-V hosts |
The last two causes come from Microsoft's backup, checkpoint and storage page, which lists "Insufficient permissions: Missing Log on as a Service rights for NT Virtual Machine accounts or incorrect NTFS permissions" and "Antivirus interference". The error page does not mention them.
Prove the cause before changing anything
All read-only.
- Copy the exact error text, including the Virtual Machine ID. In the message it follows "Virtual machine ID" or "Virtual Machine ID", for example
5FC5C385-BD98-451F-B3F3-1E50E06EE663. - List the VM's disks:
Get-VMHardDiskDrive -VMName VMName
If the machine has checkpoints, list them with Get-VMSnapshot -VMName VMName and look at each checkpoint's disks with Get-VMSnapshot -VMName VMName -Name "checkpoint name" | Get-VMHardDiskDrive.
- Show the permissions on the file named in the error. With no other switch,
icaclsdisplays them:
icacls "E:\VMs\VMName\Disk0.vhd"
Look for NT VIRTUAL MACHINE\ followed by the ID from the error. If it is not there, that is the cause. Do the same for the configuration file.
- Confirm the ID belongs to the virtual machine you think it does, so you do not grant access for the wrong machine.
Get-VMaccepts an ID:
Get-VM -Id 5FC5C385-BD98-451F-B3F3-1E50E06EE663
Use the ID from your own error message. The Virtual Machine ID is unique to every virtual machine, so a match to the wrong VM name means the disk path in the error belongs to a different machine, and you should stop and find out why before changing anything.
- If many VMs fail at once, check the policy right "Log on as a service" for
NT Virtual Machine\Virtual Machines, and check the antivirus exclusions.
Example (illustrative): a VM fs01 on hv01 at contoso.com.au has three disks and one configuration file. The volume was copied from D:\VMs to E:\VMs by a file-copy tool. Each of the four files could be missing the entry: 3 disks + 1 configuration file = 4 files. If you fix only the file named in the first error, each start can fail on the next file in turn, up to 4 rounds. Checking all four files first saves the repeated failed starts.
Fix
Save the current permissions
Before changing anything, save the permissions of the folder that holds each file named in the error. Disks can sit outside the VM's own folder, so repeat the command for each folder, using a different output file name each time. The pattern is Microsoft's documented /save and /restore pair:
icacls "E:\VMs\VMName\*" /save C:\Temp\vmname-acl.txt /t
Create C:\Temp first if it does not exist. Keep this file; it is the back-out.
Grant the VM ID access
Risk: (F) is Full control on that file. Impact: the VM's own identity can read, write and change permissions on the file. That is the same level Microsoft's page gives, but it is a permission change on a production disk file, so apply it only to the files named in the error. Back-out: if the grant was unwanted, remove only that entry with icacls "E:\VMs\VMName\Disk0.vhd" /remove "NT VIRTUAL MACHINE\5FC5C385-BD98-451F-B3F3-1E50E06EE663", which "Removes all occurrences of the specified SID from the DACL". To put every file in the folder back exactly as saved, run icacls E:\VMs\VMName /restore C:\Temp\vmname-acl.txt, the form Microsoft's example uses for restoring saved DACLs (a directory, then /restore, then the saved file). If the path contains spaces, put quotes around it and leave off a trailing backslash: this is Windows command-line behaviour, not something Microsoft's icacls page states, in which a backslash directly before a closing quote is read as an escaped quote.
Microsoft's command, from an elevated command prompt, for a disk file is:
icacls "E:\VMs\VMName\Disk0.vhd" /grant "NT VIRTUAL MACHINE\5FC5C385-BD98-451F-B3F3-1E50E06EE663":(F)
Use your own path and your own Virtual Machine ID. For a configuration file named with the ID, the page's example is:
icacls "E:\VMs\VMName\7E77503A-A26B-4BB5-9846-396F49A30141.xml" /grant "NT VIRTUAL MACHINE\7E77503A-A26B-4BB5-9846-396F49A30141":(F)
Then start the virtual machine.
Repeat for each file in the chain
If the error moves to another file, repeat the grant for that file with the same ID. For a VM with checkpoints, each .avhd in the chain may need it.
If the files are right but the VM still fails
Microsoft's backup, checkpoint and storage page gives three corrections for permission problems: "Ensure the NT Virtual Machine\Virtual Machines account has Log on as a Service rights via Group Policy or Local Security Policy", "Use icacls to verify and grant Full Control to VM service accounts", and "Configure antivirus exclusions by following the Microsoft antivirus exclusions for Hyper-V hosts."
Risk: a Group Policy change affects every server in its scope, and an antivirus exclusion lowers scanning for the excluded paths. Record the current policy value and the current exclusions first. Back-out: restore the recorded values.
Confirm the fix
- The virtual machine starts and reaches its sign-in screen.
icaclson each fixed file shows theNT VIRTUAL MACHINE\entry with the VM ID.- A second start and stop works, so the fix is not a one-off.
- Other VMs in the same folder tree still start. If you saved the folder permissions, compare the saved text with a fresh
icaclslisting.
What to watch afterwards
- How the files get to the host. If the same VM loses the entry after every copy or restore, change the copy or restore method so permissions are carried or reapplied.
- New VMs created in the same folder. They get their own IDs, and each ID needs its entry.
- A policy that removes the Log on as a service right. Many VMs failing together points here.
- Antivirus changes. Microsoft's antivirus exclusions page lists the paths and processes for a Hyper-V host.
Read next
Related articles you may want next.
- Backup & RecoveryRebuilding a standalone Hyper-V host: what the virtual machine files don't carry with themIdentify Hyper-V recovery dependencies beyond virtual disks: VM configuration versions, virtual switches, certificates and virtual TPM protection.Read article
- TroubleshootingHyper-V virtual machines "Critical - Paused": Event ID 16060, out of disk space on the volume holding the disksHyper-V VMs 'Critical - Paused' or Event ID 16060 'run out of disk space'? Check the volume, checkpoints and CSV, free space safely, then resume.Read article
- TroubleshootingHyper-V backup checkpoint fails: Error -0x800423F2, error code 32768 and VSS writer events 8229 and 12293Hyper-V backup says it could not create the backup checkpoint (-0x800423F2) or VSS events 8229 and 12293? Prove the cause, then fix it safely.Read article
Risks and limits
These commands have not been run or lab-tested.
- Microsoft's error page shows
.vhd,.avhdand.xmlfile names. It does not list other file types, and does not say how newer configuration files are named. - The page does not explain how the entry came to be missing. Do not assume the cause is copy or restore.
icacls ... /restoreapplies the saved permissions to files that exist in the folder; it does not recreate files. Test the restore on a copy of a small file first.- A virtual machine with checkpoints has several files to check. Do not merge or delete checkpoint files to fix this error.
- Full control on a disk file is Microsoft's documented grant. If your standard calls for less, choose the narrowest permission that lets the machine start.
Sources
- Hyper-V virtual machine may not start, and you receive an error 0x80070005: General access denied error — Microsoft Learn, page dated 2026-02-12, accessed 20 November 2026
- Troubleshoot Hyper-V Virtual Machine Backup, Checkpoint, and Storage Failures — Microsoft Learn, page dated 2026-02-12, accessed 20 November 2026
- icacls — Microsoft Learn, page dated 2025-06-09, accessed 20 November 2026
- Recommended antivirus exclusions for Hyper-V hosts — Microsoft Learn, page dated 2026-02-12, accessed 20 November 2026
- Get-VM — Microsoft Learn, date not shown, accessed 20 November 2026
- Get-VMHardDiskDrive — Microsoft Learn, date not shown, accessed 20 November 2026
- Get-VMSnapshot — Microsoft Learn, date not shown, accessed 20 November 2026
This article was originally published on .