HYPER-V ERROR 0X80070057 AFTER VIRTUAL DISK RESIZE , This is a possible Workaround

Published on
15,415 Points
2 Endorsements
Last Modified:
I have been plagued with this issue more than once, shut down my Hyper-V VM using the Hyper-V manager native to server 2008 because of disk space issues. This VM in question holds our office Sharepoint Server, the Sharepoint Databases are backed up using Backup exec.
So the machine is now shut down after a 6 hour merge (What it is merging I have yet to figure out as it did not even seem to help me), I selected Edit Disk from the Actions menu on the right side of Hyper-V manager browse to the disk and select it, this gives a little disclaimer that you should not edit a Virtual Machine if it has a snapshot or differencing disk. I admit I sometimes skip reading small unemphasized print like this, It is obvious that Microsoft knows this is an issue judging from all the posts on the http://social.technet.microsoft.com/Forums and hopefully they will roll out a SP to fix this, many people have fallen into this trap and I am sure many more will until this is fixed. So here is where things went bad, made the disk 60GB from 50GB, thinking nothing of it I turned on the machine 5 minutes before quitting time and after 50% of starting I received this infamous error:

'SERVERNAME' Microsoft Emulated IDE Controller (Instance ID {83F8638B-8DCA-4152-9EDA-2CA8B33039B4}): Failed to power on with Error 'One or more arguments are invalid' (0x80070057). (Virtual machine CFB19551-4BB9-4B30-8EC7-1A461C2F6A33)

'SERVERNAME': Failed to open attachment 'D:\Images In Use\Server 2008 x64 Sharepoint\Snapshots\CFB19551-4BB9-4B30-8EC7-1A461C2F6A33\Server 2008 x64_C3EBA156-8CF4-4375-9DF3-43EF2C4B80AA.avhd'. Error: 'One or more arguments are invalid' (0x80070057). (Virtual machine CFB19551-4BB9-4B30-8EC7-1A461C2F6A33)

Luckily I am able to work from home but unfortunately it was during my evening that I would rather be out barbequing and playing with my kids.

After reading several posts on possible solutions to fix this error most said just use your original .VHD file and rebuild from there which is not an option I wanted. One of the articles I found did have some promise “http://networkfoo.org/server-infrastructure/recovering-your-virtual-machine-how-manually-merge-hyper-v-snapshots-back-one-“  talked of renaming the last snapshot .AVHD to a .VHD and try to merge this as a differencing disk. Maybe in some situations it would work but not in my situation. There was one great piece of information here, it mentioned using WinImage to read this newly renamed .AVHD ".VHD" file and copy out your data. "Thanks jason Neurohr I would not have found this workaround without your article"

Having nothing more to lose I downloaded it and it seemed to read the VHD fine then I noticed that under the Disk tab there was an option to convert a virtual Hard Disk Image. I ran this option pointed to my renamed (.AVHD) .VHD file gave it a new name and ran it. An hour or two later when it finished my 20GB Snapshot was now a 44GB file.
I created a new VM using this VHD as the disk, fired it up and it actually started. Once it was up I was able to get to our Sharepoint and verify that all the data was present and intact! What a relief! If you decide to try this make sure you make copies of everything just in case this does not work for you but this seems like it was a great undocumented find.

There was one other option that I had not tried yet and that was to use the VHDTool at http://code.msdn.microsoft.com/vhdtool which actually is a command line tool which has a repair option: Repairs a broken Hyper-V snapshot chain where an administrator has expanded the size of the root VHD. The Base VHD will be returned to its original size. But has a warning that "This may cause Data Loss if the contents of the base VHD were changed after expansion". I was not sure I would like to take that chance as the VHD would fail after starting 50%. It would have been my last resort.
I hope this helps everyone as much as it helped me!

Onother possible resource is the following page from Brian Ehlert:
Brian also has some good ideas to recover from this.

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Join & Write a Comment

A query can call a function, and a function can call Excel, even though we are in Access. This is Part 2, and steps you through the VBA that "wraps" Excel functionality so we can use its worksheet functions in Access. The declaration statement de…
Please check the video also in regards to recovery of deleted emails from office 365 admin center and through the MFCMAPI tool. I have mentioned each and every step with the proper steps that need to be taken care of.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month