I am filled with solutions

Weekly essays on testability, testing and being a tester.

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.

Published Wednesday, July 16, 2008 12:01 AM by SaintD

Comments

No Comments
Anonymous comments are disabled

About SaintD

Dustin Andrews has been testing software at Microsoft since 2001. He currently programs primary in C# and has loved it ever since he learned it had a good regex class. He came from the industry where he has been an ISP unix admin, Perl and SQL developer, dev lead, help desk technician and manager. He has also waited tables, worked many long nights as a convenience store clerk disinfected shoes in a bowling alley and done other jobs he has blocked out of his memory. He is currently in the Unlimited Potential Group as a Server Test Lead.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker