I'm issuing this command on the Hyper-V host SERVER2:

Clear; Get-VM | ForEach { 
  Write-Host "Migrating: "$_.Name;
  Move-VMStorage `
    -VM $_ `
    -DestinationStoragePath "\\SERVER1\D$";

Both servers are domain-joined, non-clustered.

This is the result I'm getting:

Move-VMStorage : Storage migration for virtual machine 'ADMIN' (4F452569-7DB9-4606-9371-A905267A7B0F) failed with error 'General access denied error' (0x80070005). Migration did not succeed. Could not start mirror operation for the VHD file 'D:\Virtual Hard Disks\ADMIN.vhdx' to '\SERVER1\D$\Virtual Hard Disks\ADMIN.vhdx': 'General access denied error'('0x80070005'). You do not have permission to perform the operation. Contact your administrator if you believe you should have permission to perform this operation.

ACLs are correctly configured:

PS C:\Users\domain.admin> Get-Acl 'D:\Virtual Hard Disks' | FL

Path   : Microsoft.PowerShell.Core\FileSystem::D:\Virtual Hard Disks
Owner  : BUILTIN\Administrators
Group  : DOMAIN\Domain Users
Access : CREATOR OWNER Allow  268435456
         NT AUTHORITY\SYSTEM Allow  FullControl
         BUILTIN\Administrators Allow  FullControl
         BUILTIN\Users Allow  CreateFiles, AppendData
         BUILTIN\Users Allow  ReadAndExecute, Synchronize
         NT VIRTUAL MACHINE\Virtual Machines Allow  CreateFiles, AppendData, Read, Synchronize
         DOMAIN\SERVER2$ Allow  -2147483642
         DOMAIN\SERVER2$ Allow  CreateFiles, AppendData, Read, Synchronize
Audit  :


C:\Users\domain.admin>net localgroup Administrators
Alias name     Administrators
Comment        Administrators have complete and unrestricted access to the compu


DOMAIN\Domain Admins
The command completed successfully.

C:\Users\domain.admin>net group "Domain Admins"  <==(on the PDC)
Group name     Domain Admins
Comment        Designated administrators of the domain


Administrator            domain.admin
The command completed successfully.


I've delegated Kerberos as discussed here. Incoming and outgoing migrations are enabled on both machines, on Kerberos under any available network. Both firewalls are off.

I've contacted my administrator and I don't know what's wrong either.

Where to look next?


The problem was that I hadn't added the source and target machines to the target share's permissions:

# Create folder

# Create file share
New-SmbShare -Name VMS1 -Path X:\VMS -FullAccess Domain\HVAdmin, Domain\HV1$, Domain\HV2$, Domain\HVC$

# Set NTFS permissions from the file share permissions
Set-SmbPathAcl VMS1

This is documented here:


Once I added them the migration sailed right through.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.