Server 2012 - Hyper V trouble - VM gone and need to recover urgently please.

Hi, I'll try to explain best i can to give an idea on the situation and please excuse my lack of knowledge on this.

The setup is 1x Host machine running Server 2012R2 running Hyper V services. There is one VM machine created Server 2012R2 and this is the domain controller.  No replication is enabled.

The trouble started yesterday when i tried to free up disk space on the Host server as the VM MMC would pause the machine due to low disk space. I made the massive mistake of moving a AVHDX file to another location and then deleting the file from the host server within VM MMC.  When i tried to start the machine back up it gave a number of error messages: 'Snapshot failed while attempting to change the state and there was an error opening a virtual hard disk further up the chain.  i moved the AVHDX file back to the exact location C:\Users\Public\Documents\Hyper-V\Virtual hard disks\ but still it wouldn't load and gave the same error.  I tried restarting Host server a couple of times to no avail.

I then made another mistake of clicking on the latest restore point which took me right back to July (no good) so i tried other various things from forums and this made things even worse.  I couldn't see any VM machine in the list, its gone and there was no VM to startup, as if its a fresh install of Hyper V.

I have a full Baremetal backup taken last week from Windows server backup, but when i ran this from the host it failed, error
The application writer is not running. Make sure the application writer is running, and then retry the recovery operation.
I've also tried to just restore Hyper V from windows backup but this threw up error messages also.
Now when i try to run a backup the options to restore a full recovery or Hyper V are ghosted out ~(No option to do so).

So as you can see things have gone from bad to worse with a simple mistake of moving one file!!!!!!!
My main question is can i get this VM back up and running by manually doing so with the full metal backup data?

Please please please help or advise.
Many Thanks
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Muhammad BurhanManager I.T.Commented:
its mean you 'have' that VHDX ?
please try this one:
create a new VM in hyper-v and attach that VHDX file as its primary HDD then hit start and see what happens.
JohnAuthor Commented:
This did work but its a 6 month old setup without the AD created so no good.  All the restore points must have the rest of the data, but these are missing.  I have a full bare metal backup - made with Server 2012 that is on a network computer, this was done last week. Can i use the VHDX files from this backup?

Lee W, MVPTechnology and Business Process AdvisorCommented:
I want to be clear here - as you've probably figured out - NEVER DELETE FILES YOU DON'T UNDERSTAND!

AVHDs are snapshot differences - you took a snapshot (which you should never do of a DC, and DEFINITELY NEVER DO to a PRODUCTION DC) and then you deleted ALL the data that had accumulated since by removing the AVHD when what you should have done was merged the snapshot back, getting rid of it.

At this point, I'd posit, what more hard could you possibly do by restoring your backup?  TRY IT!  JUST MAKE SURE you KEEP the backup in case something else doesn't work...

Better still, contact a consultant who can come in and take care of the recovery for you...

Once you get this all sorted out, PLEASE LEARN IT in a TEST ENVIRONMENT.  I am a strong proponent of Virtualization, but like any technology, you should learn it and understand it, at least do a google search before you start deleting things!

Googling avhd yields the following (emphasis by me):
A: An AVHD (or AVHDX) file is essentially a differencing disk that's a child of another VHD (or VHDX) file. The "A" in AVHD stands for Automatic VHD as in Automatically Managed VHD--that is, it's managed by Hyper-V, and you shouldn't touch it.Sep 8, 2013

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SolarWinds® VoIP and Network Quality Manager(VNQM)

WAN and VoIP monitoring tools that can help with troubleshooting via an intuitive web interface. Review quality of service data, including jitter, latency, packet loss, and MOS. Troubleshoot call performance and correlate call issues with WAN performance for Cisco and Avaya calls

JohnAuthor Commented:
Thanks Lee,

I've learnt my lesson here for sure.  I've restored the VM data from the backup but it still wont start and gives a number of error messages (attached).  Its like its missing a snapshot difference.

I have tried a bare metal recovery by using the server disk but i couldn't locate the image as its on a network NAS storage device.  Path is\backups\serverbackup
is it possible to move the backup from the network storage device onto the server? I just thinking it might detect this way?
Not looking good here..

Lee W, MVPTechnology and Business Process AdvisorCommented:
If this isn't a full backup that includes all files, including avhds then you're out of luck with the backup.

One LAST CHANCE - look over the previous versions - *IF* they were enabled... MAYBE you can recover that.
JohnAuthor Commented:
I think i choose to do a full backup Lee.  Can the backup be moved from the network location to the host server or will this cause problems?  I  was having trouble this morning trying to locate the backup over the network which might have been the network drivers or the incorrect path.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Post a screen shot of the backup.
JohnAuthor Commented:
This is created in windows 2012 server backup
JohnAuthor Commented:
JohnAuthor Commented:
Is this to do the recovery anyone?

Lee W, MVPTechnology and Business Process AdvisorCommented:
How are you trying to restore?  What happens when you go through Windows Backup Restore wizard and JUST restore the file?  Is it even found to restore?
JohnAuthor Commented:
Ive tried via the Wizard restoring the Hyper V option and it didn't work.  My last option is to try a recovery from the boot disk, if i get it to pick up the network.

Lee W, MVPTechnology and Business Process AdvisorCommented:
So you didn't try a FILE LEVEL restore?
JohnAuthor Commented:
Yes, i did a full file restore inc the Hyper V restore within the Wizard and it didn't do a great deal apart from loose a restore point and put me back 3.5 months.

After a long long day i've got this working by running the Bare Metal Recovery backup by booting from the server disk.  Same image that i was trying to get working from the wizard so a bit odd.

I normally don't mess with settings unless there's a good reason to do so. I've learned my lesson and i wont be trusting any changes i make in future on the VM and will do a complete whole system backup just in case....

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.