VirtualBox

Ticket #10851 (new defect)

Opened 20 months ago

Last modified 9 months ago

VM config file lost after host power off

Reported by: Technologov Owned by:
Priority: blocker Component: other
Version: VirtualBox 4.1.20 Keywords:
Cc: Guest type: other
Host type: other

Description

VBox: 4.1.16 (and 4.1.20)

Host: Windows 7 x64 (and other Windows)

When shutting down host, (after Windows update, or sudden power off) in some cases VBox does delete the *.vbox meta-data file, and the VM becomes "inaccessible" state. In some cases the file becomes corrupted and zero-bytes, and there are no *.vbox-tmp and no *.vbox-prev files to recover from.

Workaround: copy [VM].vbox-tmp or [VM].vbox-prev as [VM].vbox can restore the VM in most cases. (something new users can't do)

Recommended real fix: VBoxSVC must write down a history of transactions into the VM folder, per VM, [VM].vbox-transactions file, which should list all changes to the *.vbox file meta-data in a patch/diff format, and then, when VM becomes "inaccessible", VBoxSVC must attempt to recover the file until last transaction automatically, plus will allow manual recover and debug.

NOTE: This bug is an old one, and AFAIK happens once every several weeks since v4.0.0 (but rarely) - still losing VM is *really* bad.

Log attached.

-Technologov, 2012-08-22.

Attachments

Win7-64bit-2012-08-22-03-29-27.log Download (59.7 KB) - added by Technologov 20 months ago.
VBox log
daniel-winx64-apr-12-2013-VBox.log Download (49.6 KB) - added by Daniel Sokolowski 12 months ago.

Change History

Changed 20 months ago by Technologov

VBox log

comment:1 Changed 20 months ago by frank

Please be more specific. You write that the .vbox file was lost and that no .vbox-prev nor .vbox-tmp files are available for recovering. In the next paragraph you write that the user could use a .vbox-tmp or .vbox-prev file to recover the VM config. What is true?

comment:2 Changed 20 months ago by frank

  • Summary changed from [BLOCKER] Metadata Corruption after host power off = Lost VM to VM config file lost after host power off

comment:3 Changed 17 months ago by Technologov

frank: Both are true.

  1. In some cases the user can recover from either .vbox-tmp or from .vbox-prev, but in other cases those files do not exist, which means no possibility to recover.
  1. In some cases *.vbox file gets deleted altogether, but in other cases I had this file zeroed.
  1. This bug is hard to reproduce, but I have it pop-up about once a month. It seems to affect versions 4.0.0-4.2.4 (latest), all v4.x series.

And today, Dominique Bazin, our user, experienced a similar data wipe-out on VBox 4.2.4.

-Technologov, 19.Nov.2012.

comment:4 Changed 17 months ago by klaus

The symptom descriptions are very strange... VirtualBox does not keep the VM config file open when the VM is running, so I wouldn't understand why file contents of rarely changing files would magically disappear due to a host crash. They should end up on the hard disk very very quickly.

There must be something else to it - do you run out of disk space or is there a problem with the hard disk itself? Because if that's the case we can spend any time we want on complex transaction logic and it won't help at all. So I want to have an idea first what's going on, and that's so far very very blurry.

Any recent snapshot operations (creating/deleting or something unusual like cancelling snapshot creation)?

comment:5 Changed 17 months ago by Technologov

No. No. No. I use 3x2 TB HDDs, (no RAID) and have several hundreds of gigs free space. There is no problem with hard disk.

Yes: few recents operations: changing VM settings (minor changes, like "shared folders", etc...), creating a snapshot, reverting to old snapshot. Not deleting and not cancelling snapshot operation was performed.

UPDATE: Just happened again to me. Host: Win7 x64 + VBox 4.1.22. The *.vbox file was deleted, but thankfully *.vbox-temp existed, so I manually recovered the VM.

-Technologov, 21.Nov.2012.

Last edited 17 months ago by Technologov (previous) (diff)

Changed 12 months ago by Daniel Sokolowski

comment:6 Changed 12 months ago by Daniel Sokolowski

My host machine restarted unexpectedly and I was effected by this issue as well on Win 7 x64 - VBox 4.2.6. No recent changes to the VM Settings (months since it was setup) Renaming the *.vbox-tmp to .vbox did work.

Attached is the last working log file from yesterday.

comment:7 Changed 10 months ago by patrik.thunstrom

Same thing happened here, running 4.2.12r84980.

Computer did a hang, had to force power off. Now when I've started up VirtualBox, all three of the VMs listed in my VirtualBox Manager states "Inaccessible" due to -102, file not found (and one of them -103, path not found).

Looking at the folders, it is indeed true, the files does not exist any more. For two of them the .vbox files are missing (they all had .vbox.prev though), and for the third which was created as a clone of one of the other two (may or may not be related to this being more "severe") the entire folder for the VM is missing, .vdi, .vbox & everything.

I'm really not even remotely able to write this down to being a bad disk, seeing that nothing else than the .vbox files are missing. (Scratch this, next morning computer wants to restart to scan bad drive which gets stuck at 40%)

What makes it even more likely to be some bad operation in the Manager is that I had 3 VMs listed in it, all of those gone missing, but in my virtual-images base folder where I kept all my folder structures for the VMs, I had 4 VMs stored. The one not listed in the VirtualBox Manager is the only one still having its .vbox file.

Seeing as the only one I had run lately was the one where the whole folder did get deleted, none of the logs I have gives any relevant information (as they hadn't even been powered on the last few weeks before things were deleted).

(Edit; Host - Win 8, x64. Guest - Win 7, x64)

(Edit 2: Computer now shows other signs of bad drive)

Last edited 10 months ago by patrik.thunstrom (previous) (diff)

comment:8 Changed 9 months ago by mandric

Any updates on a fix here? We've had it reported from customers twice and had to talk them through the rename process. From end user perspective it appears the whole VM is lost.

comment:9 Changed 9 months ago by frank

Are only Windows hosts affected by this problem?

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use