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 3 years ago.
jeffL35-VBox.log Download (88.3 KB) - added by jeffL35 4 months ago.
Log before system crashed

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 3 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 3 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 3 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 3 years ago by Technologov (previous) (next) (diff)

Changed 3 years ago by Daniel Sokolowski

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

comment:8 Changed 2 years 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 2 years ago by frank

Are only Windows hosts affected by this problem?

comment:10 Changed 19 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 10 months 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

comment:12 Changed 6 months ago by Bright

I just got this issue too: after Windows reboot incidentally, vbox file was gone.

I had two VMs, one was Windows 2012, 64bit and the other was Ubuntu 14, 64bit. The host is Win 7, 64bit. The interesting thing was, the Windows vbox file was gone but the Ubuntu one was still there.

I was shocked by what had happened as it was not easy to build up a VM with all components installed. Fortunately, by following the instructions mentioned above, I could add and start up the Windows VM again after copied the existing .vbox-temp file and renamed it to .vbox.

comment:13 Changed 4 months ago by jeffL35

The same thing just happened a day before. My Windows host hanged, and I had to power it off forcefully. The .vbox file was lost, but the .vbox-prev file was still there, so my VM was not completely lost. The .vbox file seemed to be corrupted, for opening in Notepad++ was unsuccessful. The file could not be deleted, and it would not go away when refreshing the folder in Windows Explorer. A reboot got rid of the broken .vbox file. I renamed the .vbox-prev file to a .vbox file, and everything was fine again. Version: Virtualbox 5.0.0 r101573 downloaded from Host: Windows 7 Guest: Ubuntu 15.04

Changed 4 months ago by jeffL35

Log before system crashed

comment:14 Changed 2 months ago by mslade

I encountered this myself after rebooting this morning. This is VirtualBox 5.0.4 r102546 on Windows 7 64bit. I will add that my machine has BitLocker installed and running. I have no reason to believe BitLocker is related to the issue, but I know it does some voodoo on the hard drive and am curious if others effected are also using BitLocker or similar.

My host requested a reboot for patching and at the time the VM was running in headless mode. The host seemed to hang for a long time after all windows were closed but before actually rebooting; not sure if that's related or not.

After rebooting the host would not start due to missing .vbox file, although both .vbox-prev and .vbox-tmp are available.

comment:15 Changed 7 weeks ago by Hale

I have the same problem on our server with regularity of a week. It is especially boring when it happens on Saturday and people are calling my home to take me from my family.

WTF is going on!? This critical problem is 3 years old and still not solved! I am beginning to suspect that other Oracle products and activities can share the same irresponsibility in management.

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