Saturday, April 23, 2011

Hyper-V: An error occurred while attempting to export the virtual machine.

When you try to export Hyper-V Virtual machine to network share you get this error:

An error occurred while attempting to export the virtual machine. 
Failed to copy file during export.
General access denied error (0x80070005)


Solution:
Computer account of Hyper-V host should have permissions on NTFS and share level to write to target network share:

NTFS permissions:

1.  On the destination server, Right-click on the shared folder and select Properties. 
2.  Select the Security tab. 
3.  Click Edit button and click the Add button in the permissions dialog box. 
4.  Click Oject Types and select Computers if not already done and click OK.
5.  In the dialog "Enter the object names to select" provide the name of Hyper-V host machine and click Check Names.
6.  With the Hyper-V host machine name select, click Allow by "Full control" and click OK.

Share  permissions:

1.  On the destination server, Right-click on the shared folder and select Properties. 
2.  Select the Sharing tab. 
3.  Click Advanced Sharing...
4.  On the Advanced Sharing dialog, click Permissions  and then Add.
5. Click Oject Types and select Computers if not already done and click OK.
6.  In the dialog "Enter the object names to select" provide the name of Hyper-V host machine and click Check Names.7.  With the Hyper-V host machine name select, click Allow by "Full control" and click OK.

2 comments:

  1. This error could also happen even you are not trying to export the file to network shared folder!!!
    It can also happen if you rename the VM after installation, for example :(WINSERV1) to (WINSERV2) in this case if you try export the VM you get the same error.
    So you have to make sure that name of the server that you wont to exported have the same default name when the VM is created . or rename (.vhd) file to the new name. the 1st solution is better.
    For Contact:
    Taha Abdel Sayed Taha /IT Helpdesk Assistant
    taha.taha@kenana.com

    ReplyDelete
  2. I have the same problem , but the fix was so simple, do the following
    1- Computer Management
    2- Right click on the drive where the VMs located, and select properties
    3- Tools , and click on Check Now
    4- Select both options "Automatically Fix file system errors" and "Scan for and attempt recovery for bad sectors"

    ReplyDelete