Hyper-v export to off machine share trick.

Today I wanted to export a hyper-v machine to a share on a computer with more disk space. However I got this error: 'General access denied error' (0x80070005). I didn't have enough disk space to just make it locally and transfer it over. I really should get another disk for that system, but not today.

I quickly realized the problem. Hyper-v doesn't try to export with my permissions. It uses the permissions the service started under. I figured out two work arounds. Both are probably security issues, so tread with caution and common sense. Either method could allow unauthorized users and programs to write to the host you do the steps on. The second method at least contains this to one directory. Don't trust any executables that show up in that share. You should probably also remove the permissions when your task is done.

First, and untested, change the service accounts that hyper-v runs under to a domain account that has permissions to the share in question. The restart hyper-v. That will probably work. However the amount of damage that can happen if something goes wrong is unpredictable.

Second, add the MACHINE itself to the share permissions on the desination. You can do this the exact same way you would add a user (Click the advanced sharing button in Vista). However, in the permissions dialog box you have to click "Object Types" and check "Computers" in order to be able to see the computers.

 

From the Object Types screen click "Ok" then enter the name of the computer you want to give the permissions to. Then check "full control".

Once you hit OK on all the layers the machine itself will have permissions to write to the share.