Ticket #10851 (new defect)

Opened 3 years ago

Last modified 7 weeks 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


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.


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

Change History

Changed 3 years ago by Technologov

VBox log

comment:1 Changed 3 years 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 3 years 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 2 years 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 2 years 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 2 years 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.

-Technologov, 20.Nov.2012.

Version 3, edited 2 years ago by Technologov (previous) (next) (diff)

Changed 2 years ago by Daniel Sokolowski

comment:6 Changed 2 years 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 22 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 22 months ago by patrik.thunstrom (previous) (diff)

comment:8 Changed 21 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 20 months ago by frank

Are only Windows hosts affected by this problem?

comment:10 Changed 11 months ago by thomerow

Any updates on this? The same thing just happened to me after I shut down the host while VirtualBox was saving the machine state and got stuck at 100% for several hours. OS is Windows 7 64bit.

comment:11 Changed 7 weeks ago by tchung

I ran into this problem just now. Windows host was rebooted unexpectedly, caused by automatic reboot from windows update. After it came back up, the .vbox file was gone, but .vbox-tmp and .vbox-prev existed so I could recover the file.

Running VirtualBox 4.3.20 r96997 on Windows 7 64bit

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use