[Solved] Backup copy of vm wont open

Discussions related to using VirtualBox on Windows hosts.
Post Reply
AlexanderPeterLawrence
Posts: 5
Joined: 12. May 2015, 22:00

[Solved] Backup copy of vm wont open

Post by AlexanderPeterLawrence »

running on 64bit windows 7 with vbox 4.3.26 and when i closed my linux 32bit ubuntu vm i accidentally checked to restore to snapshot. so all the progress from two weeks was lost. there is a windows backup of the vm so i copied all the backup files into a new folder.

i tried to open the backup vm and it popped up for a second and disappeared. it had this error window
failed to open blah blah
Result Code: E_FAIL (0x80004005)
Component: ProgressProxy
Interface: IProgress {c20238e4-3221-4d3f-8891-81ce92d9f913}

in virtual media manager it says this little exclamation mark error that google said nothing
could not open the medium blah blah
vmdk error reading grain table in blah blah
vd error verreof opening image file

seriusly what the heck does it take to make this open
Attachments
my_Linux-2015-05-12-16-10-07.log
(1003 Bytes) Downloaded 9 times
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: backup copy of vm wont open

Post by loukingjr »

Assuming by "there is a windows backup of the vm" you mean the entire Ubuntu VM folder, you should unregister the Ubuntu guest from the VirtualBox guest list. Right click on its icon and choose "Remove" And "Keep All Files". Then choose Add Machine, navigate to the Ubuntu backup folder, select the *.vbox file. This is just to make sure the backup is good. If it runs, shut it down, unregister it, then move the entire backup VM folder in place of the original.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
AlexanderPeterLawrence
Posts: 5
Joined: 12. May 2015, 22:00

Re: backup copy of vm wont open

Post by AlexanderPeterLawrence »

actually thats just what i did. deleted the old folder and removed the vm from the vbox list with keep all files. same thing happened for other backups of the vm
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: backup copy of vm wont open

Post by loukingjr »

That's not what you said you did. But no matter.
Are your backups compressed/encrypted?
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
AlexanderPeterLawrence
Posts: 5
Joined: 12. May 2015, 22:00

Re: backup copy of vm wont open

Post by AlexanderPeterLawrence »

none are compressed or encrypted
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: backup copy of vm wont open

Post by loukingjr »

It's very odd none of the backups work. Not much point in backing up if the backup files are damaged.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: backup copy of vm wont open

Post by mpack »

Report the error messages again, this time without the "blah blah". Precise descriptions please. Details like paths and filenames are sometimes important.

Actually, when restoring a backup there's no need to unregister the old VM, unless somehow the VM UUID changed: just shut down the VM and replace the VM files using those from the backup.

How were the backups made? I.e. are they a straight copy of the entire VM folder, or did you let windows backup choose what files to copy? In fact you could just show me a listing of the backed up file set.
AlexanderPeterLawrence
Posts: 5
Joined: 12. May 2015, 22:00

Re: backup copy of vm wont open

Post by AlexanderPeterLawrence »

the backups are from the windows restore. it automatically creates them for all the files in the folder. here is all the files
alexpl1@ALEXPL1-WL1 /cygdrive/c/Users/alexpl1/VirtualBox VMs/alexpl1_Linux
$ ls -l; ls -l */*
total 4581708
-rwxrwx---+ 1 alexpl1 Domain Users 42805 Dec 8 09:56 alexpl1_Linux - Copy.vbox-prev
-rwxrwx---+ 1 alexpl1 Domain Users 41932 May 12 15:29 alexpl1_Linux.vbox
-rwxrwx---+ 1 alexpl1 Domain Users 41932 May 12 15:29 alexpl1_Linux.vbox-prev
-rwxrwx---+ 1 alexpl1 Domain Users 4691525632 Nov 19 15:12 alexpl1_Linux.vmdk
drwxrwx---+ 1 alexpl1 Domain Users 0 May 12 15:29 Logs
drwxrwx---+ 1 alexpl1 Domain Users 0 May 8 12:45 Snapshots
-rwxrwx---+ 1 alexpl1 Domain Users 962 May 12 15:29 Logs/VBox.log
-rwxrwx---+ 1 alexpl1 Domain Users 963 May 8 12:45 Logs/VBox.log.1
-rwxrwx---+ 1 alexpl1 Domain Users 1003 May 8 12:23 Logs/VBox.log.2
-rwxrwx---+ 1 alexpl1 Domain Users 106292 Apr 23 18:42 Logs/VBox.log.3
-rwxrwx---+ 1 alexpl1 Domain Users 506657 May 12 15:29 Logs/VBoxStartup.log
-rwxrwx---+ 1 alexpl1 Domain Users 21037056 Nov 19 15:29 Snapshots/{4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk
-rwxrwx---+ 1 alexpl1 Domain Users 5683347456 Apr 23 18:41 Snapshots/{bb249097-4bb2-480f-ae24-6329848f09ed}.vmdk
-rwxrwx---+ 1 alexpl1 Domain Users 1544421376 Nov 19 15:21 Snapshots/{ce317887-a256-4489-b5fc-0c9447583591}.vmdk
-rwxrwx---+ 1 alexpl1 Domain Users 135659520 Nov 19 16:12 Snapshots/{fe4ad63e-ff70-4043-a137-cf6aefe9f986}.vmdk
-rwxrwx---+ 1 alexpl1 Domain Users 469901682 Nov 19 15:12 Snapshots/2014-11-19T20-12-37-974041800Z.sav
-rwxrwx---+ 1 alexpl1 Domain Users 272935459 Nov 19 15:21 Snapshots/2014-11-19T20-21-42-134918200Z.sav
-rwxrwx---+ 1 alexpl1 Domain Users 381280643 Nov 19 15:30 Snapshots/2014-11-19T20-30-08-197235200Z.sav
-rwxrwx---+ 1 alexpl1 Domain Users 423222581 Nov 19 16:14 Snapshots/2014-11-19T21-14-41-331030300Z.sav



this is the error that happens when i open the backup vm
Failed to open a session for the virtual machine alexpl1_Linux.

The VM session was closed before any attempt to power it on.

Result Code: E_FAIL (0x80004005)
Component: SessionMachine
Interface: ISession {12f4dcdb-12b2-4ec1-b7cd-ddd9f6c5bf4d}


the other error is attached as screenshot
Attachments
errorwindow.jpg
errorwindow.jpg (119.8 KiB) Viewed 2259 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: backup copy of vm wont open

Post by mpack »

"Error reading grain table" is a very serious error. The grain table in VMDK serves the same purpose as the block table in a VDI.

If it was me, I would next examine the first 100k or so of the VMDK, using a hex viewer/editor. I have a nasty feeling that you'll find that the data is random garbage, or all zeros. In other words I think your backups are probably useless, perhaps for all files larger than some threshold size (larger than 4GB springs to mind).

Likewise, you could try opening one of the "error" VMDKs using CloneVDI. I expect you'll get a similar error.

Do I gather that you still have the original VM where you accidentally reverted to a snapshot? Because I strongly suspect that this is in a better state than your backups.

And of course, you will need to investigate why your backup procedures have failed.
AlexanderPeterLawrence
Posts: 5
Joined: 12. May 2015, 22:00

Re: backup copy of vm wont open

Post by AlexanderPeterLawrence »

just noticed that {4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk which is the problem vmdk is only 20mb large. all the other vmdk files are 100s or 1000s of mb. would the small size has something to do with the error? it doesnt make sense for {4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk to matter since all the progress is in {bb249097-4bb2-480f-ae24-6329848f09ed}.vmdk

there should be some way to cut {4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk out of the loop and just focus on {bb249097-4bb2-480f-ae24-6329848f09ed}.vmdk
I just tried to delete the snapshot associate with {4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk and it caused an error
Failed to delete the snapshot working_network of the virtual machine alexpl1_Linux.

Could not open the medium 'C:\Users\alexpl1\VirtualBox VMs\alexpl1_Linux\Snapshots/{4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk'.

VMDK: error reading grain table in 'C:\Users\alexpl1\VirtualBox VMs\alexpl1_Linux\Snapshots\{4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk' (VERR_EOF).

VD: error VERR_EOF opening image file 'C:\Users\alexpl1\VirtualBox VMs\alexpl1_Linux\Snapshots/{4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk' (VERR_EOF).

Result Code: E_FAIL (0x80004005)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}

UPDATE!!!!!!!!!!!!!!!
i replaced the crapped out {4c7d4d67-c09a-467a-bcd0-c7c87c2f5cb2}.vmdk backup with the non-backup and deleted it in vbox. The vm opens normally now. WIN.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: backup copy of vm wont open

Post by mpack »

So problem solved? Well done. I'll change the topic title in that case.

Might I suggest that you stop using snapshots? Judging from that last post you clearly don't understand their dangers - and if you keep regular backups then they are unnecessary.
Post Reply