Ticket #9457 (closed defect: obsolete)

Opened 11 years ago

Last modified 6 years ago

Restoring snapshot gets an Inaccessible state of virtual machine

Reported by: abcuser Owned by:
Component: other Version: VirtualBox 4.1.2
Keywords: Cc:
Guest type: Windows Host type: Linux

Description (last modified by aeichner) (diff)


today I have uninstalled VirtualBox 4.0.12 and installed VirtualBox 4.1.2 on Ubuntu 8.04 LTS host. Virtual machine is Windows XP sp3 (guest). I have installed Oralce extension pack and started machine, no problem, installed guest additions, rebooted machine, no problem. Then I shutdown guest and trying to work with snapshots.

I created a snapshot. Then started guest, do some changes and stopped the machine. Created a second snapshot. Then deleted first snapshot created today. Reverted back to a week old snapshot (when asked to create a snapshot of not losing a current state I have unchecked the option). Then created a new snapshot (that is child of a week old snapshot). Reverted back to today's second snapshot and got a Inaccessible virtual machine state (see attached picture of VBox GUI window).

I clicked on Refresh button several times, waited for 15 minutes and clicked on Refresh again. No messages, no errors, just "Inaccessible" state.



VBox.2.log Download (70.9 KB) - added by abcuser 11 years ago.
vbox log
snapshot.2.jpg Download (78.1 KB) - added by abcuser 11 years ago.
print-screen of error message in vbox GUI
VDVG-T7.vbox Download (35.9 KB) - added by DHughes 11 years ago.
corrupted .vbox file after restoring older snapshot
bug.tar.gz Download (377.9 KB) - added by rblenis 11 years ago.
vbox config and log files - had to delete some logs and vms to fit size restriction for upload. look at tweety vm - it is most recent crash while trying to take a snapshot from cli.
VDVG-S7.vbox Download (2.9 KB) - added by ...don 11 years ago.

Change History

Changed 11 years ago by abcuser

vbox log

Changed 11 years ago by abcuser

print-screen of error message in vbox GUI

comment:1 Changed 11 years ago by abcuser


This is my test environment and having only single virtual machine. Now I did the following:

  1. I have copied the main vdi file to safe location using operating system tool (Linux: mv command).
  2. I have tried to delete virtual machine but got error... so I have uninstalled VirtualBox using command: sudo dpkg -P virtualbox-4.1
    Note: Maybe there is some simpler work-around, just I don't know about it.
  3. I cleaned everything like deleting .VirtualBox folder etc.
  4. I have reinstalled the product: sudo dpkg -i virtualbox-4.1...
  5. I have run a command to avoiding getting "bad exit status 101" error at system startup: sudo /etc/init.d/vboxdrv setup --force
  6. Reboot Linux host.
  7. Start VirtualBox GUI, create new virtual machine, selecting default settings.
  8. Using operating system tools I have deleted vdi file (created by create new virtual machine action).
  9. Moved back the vdi file from step 1 to location step 8 using Linux mv command.
  10. Virtual GUI Virtual Media Manager - removed the non-existing vdi (because of step 8).
  11. Click on Settings button on my virtual machine and on Storage added vdi from step 9.
  12. Turn on virtual machine. I know I have lost snapshots but I don't care about them, this is just testing computer. So I am back with virtual machine without snapshots.

Now I can reproduce the same problem when ever I like following the following actions:

  1. On virtual machine having no snapshots (just like mine following step 12 above) create snapshot, just select default snapshot names.
  2. Start virtual machine. Then just shut-down machine, you don't need to change anything.
  3. Click on Current State and create another snapshot start virtual machine and shut-down.
  4. Revert to snapshot 1 - and you will get the broken "Inaccessible" state of virtual machine.

So it looks like snapshots are seriously broken in v4.1.2. I don't know in witch version this bug appears, I was migrating vbox from v4.0.12 to v4.1.2 today (I'd never used v4.1.0!)


comment:2 Changed 11 years ago by abcuser

Hi, now I have uninstalled vbox v4.1.2 and installed v4.0.12 (Ubuntu 8.04 amd64 deb file) and I can reproduce the same problem on VirtualBox v4.0.12! This is now puzzling to me. It looks like I haven't reverted any snapshots in v4.0.12 or... I migrated to v4.0.12 in about two weeks ago. Before that I have been using v3.2.12 for many many months and snapshots were working fine. I have deleted, reverted, created them many many times in v3.2.12. Regards

comment:3 Changed 11 years ago by Lelik

Can't reproduce this problem. Can you provide more detailed step-by-step description how to reproduce this problem? Thanks.

comment:4 Changed 11 years ago by frank

It could be also important if the VBoxSVC daemon was terminated in between the above steps (i.e. the VM selector was terminated at one point).

comment:5 Changed 11 years ago by abcuser

Detailed step-by-step instruction for VirtualBox v4.1.2:

  1. Open VirtualBox Manager GUI.
  2. Click on virtual machine having no snapshots. This selects virtual machine. Then click on Snapshots tab.
  3. Click on Take Snapshot icon, accept default name "Snapshot 1" and just click OK button.
  4. Click on Start button from toolbar to start virtual machine.
  5. When virtual machine is started, just shut-down the machine.
    Note: I am starting virtual machine just to get "Current state (changed)" to make it possible to create another snapshot.
  6. On Snapshot tab click on Current State and click on Snapshot icon to take another snapshot. Accept default name "Snapshot 2" and just click OK button.
  7. Repeat steps 4 and 5.
  8. In Linux command shell I executed: "ps aux | grep VBox" (without double quotes) to get processes with name VBox and there is VBoxSVC process displayed.
  9. On Snapshot tab click on first snapshot with name "Snapshot 1" and click on "Restore Snapshot" icon from toolbar.
    Problem appears!
  10. Repeat step 8 and there is no VBoxSVC any more.
  11. Rebooted Linux host, repeating step 8 and there is VBoxSVC again.
  12. Repeat step 9. Got error: "Failed to delete the snapshot Snapshot 1 of the virtual machine WindowsXP. Hard disk '/home/(my_user_id)/.VirtualBox/VirtualBoxVMs/WindowsXP/WindowsXP.vdi has more than one child hard disk (2).
  13. OK, I have seen this problem many times (probably bug as well) and have a work-around:
    a) Open Virtual Media Manager
    b) Click on plus sign at virtual machine vdi.
    c) There are two vdi child files displayed. One very small and one large (large one is snapshot file, don't delete this file).
    d) Delete small vdi file.
  14. Back to virtual machine Snapshot tab. Click on "Delete Snapshot" button and snapshot get deleted.

OK, so now I have a work-around. :)

Hope this helps.

comment:6 Changed 11 years ago by dj_palindrome

I'd be less than honest if I said I can give precise steps to reproduce the problem of "Failed to delete the snapshot. Hard disk has more than one child hard disk."

I can only confirm I've seen it on previous versions, and so have others.

What I don't understand is why the community has as much tolerance as it does for a 'solution' as absurd as "go ahead and delete the little file; if it's small, it can't possibly be very important, can it?"

Occasionally they aren't that small; somtimes there are more than one; and sometimes detaching them makes the VM unbootable.

comment:7 Changed 11 years ago by DHughes

I have also had this problem, but not for every snapshot. It does happen often enough that I have taken to taking hourly backups of my VB configuration files.

comment:8 Changed 11 years ago by DHughes

It seems to happen most when I restore older snapshots. Attached is a .vbox from a corrupted VM. Notice how there are multiple files at the same level.

Changed 11 years ago by DHughes

corrupted .vbox file after restoring older snapshot

comment:9 Changed 11 years ago by rblenis

I too am having the same problem with 4.0.x and 4.1.x. Very frustrating as I have a server with 5VMs that are hosed. I have successively edited the .xml config file for each VM and then hit refresh in VirtualBox gui, and can then start the VMs, but if I try to manage (delete, create, etc) any snapshots I end up with the same problem again.

comment:10 Changed 11 years ago by frank

rblenis, could you attach a copy of your complete .VirtualBox tree (all .xml / .vbox files but no medium file, compress of course) to this ticket? Still very difficult to reproduce that problem.

Changed 11 years ago by rblenis

vbox config and log files - had to delete some logs and vms to fit size restriction for upload. look at tweety vm - it is most recent crash while trying to take a snapshot from cli.

comment:11 Changed 11 years ago by frank

Should be finally fixed in VBox 4.1.4. Please check and confirm.

comment:12 Changed 11 years ago by abcuser

I removed VirtualBox v4.1.2 from computer and installed VirtualBox v4.1.4 on Ubuntu 8.04.4 host (using Windows XP as guest). I also installed Oracle v4.1.4 extension pack. Rebooted host to make sure everything is working fine. I repeated the tasks as reported at above report dated as: "2011-08-19 14:41:57".

The problem with snapshots is exactly the same (VBoxSVC gets shutdown)! Actually I also got additional error after host restart "FATAL: Could not read from the boot medium! System halted." and looked at Settings | Storage and found out that my main vdi disk file has disappeared from list. I manually added main vdi disk file to Settings | Storage and virtual machine started successfully. I have also noticed that when all snapshots were deleted on Snapshot tab there was still one entry "Snapshot 2" and no "Current State" as a child of snapshot (never seen this before looks like a corruption). Creating new snapshot and this picture is not changed. Creating yet another snapshot and nothing still only "Snapshot 2" listed without any "Current State" or any snapshots I created. I looked at Virtual Media Manager and there were 3 additional vdi files (probably snapshot files).

It looked like a total mess. So I have moved my main vdi file with Linux mv command to safe location. Deleted virtual machine from GUI, manually deleted all remaining vbox files from disk and created a new virtual machine. Copied back main vdi file from safe location and on create new virtual machine wizard window selected existing disk image. Started virtual machine and it is working fine.

Now I have tried to reproduce the same problem as reported above, but I am not able to do so. Snapshots can be created, and deleted, but restore of snapshot produced the same problem (VBoxSRV is not present anymore). Rebooted Linux host and trying to delete snapshot still produces error "Failed to delete the snapshot..." - I deleted the smallest vdi file from virtual media manager and now snapshots can be deleted and restored. But starting virtual machine get error "fatal could not read from the boot medium". It looks like storage info from Settings | Storage has disappeared again. I manually added vdi file in Settings | Storage and not vm can be started again.

It looks like this bug is not solved at all and some additional problems (regressions) appeared:

  • snapshot window not updating (Snapshot 2 listed without Current State),
  • losing main vdi file from Settings | Storage.

comment:13 Changed 11 years ago by frank

abcuser, as your VBoxSVC daemon seems to crash as a result of the restore snapshot operation, can you provide us a core dump?

comment:14 Changed 11 years ago by abcuser

frank, I can reproduce this behavior every time it just happens some time. Most of the cases not, but some time it just happens. I also get some strange error of not been able to create snapshot or delete snapshot and after reboot of host it works fine.

comment:15 Changed 11 years ago by abcuser

Sorry for typo, I can't reproduce behavior every time, it just happens some times. If I figure out reproduce scenario, I will send a core dump.

comment:16 Changed 11 years ago by DHughes

I have not had this problem since upgrading to 4.1.4. It was not a consistent error in the past, but I have done quite a few restores under 4.1.4 and would have expected at least one occurrence.

However, I did notice a new behavior: If I restore a snapshot and then stop and start VBoxManager, the status of the restored machines always changes to "Current State (changed)" even though there was no activity on those VMs after the restore.

comment:17 Changed 11 years ago by frank

rblenis, some of your VMs were created with VBox 4.0.8 and suffer from #8948. You have to edit the corresponding .vbox files manually and remove all lines which contain the word VersionEx (without a trailing 't'!).

comment:18 Changed 11 years ago by ex_rcn

I have a similar issue, using VBox 4.1.2 on ubuntu natty. The issue I reproduce is:

  • I have a vbox that is powered off (call it father) and has a linked clone that is running (call it child)
  • I try to restore the latest taken snapshot of the father vbox
  • VBoxSVC crashes, all running vbox are killed
  • VBoxManage list vms shows <inaccessible> rather than the name of father
  • I reboot the host
  • VBoxManage list vms still shows inaccessible, and the log tells that a disk is not accessible
  • debugging the father.vbox, I notice that the uuid in the HardDisk section of MediaRegistry part of the xml file is not consistent with those of the AttachedDevince of the SATA Controller
  • setting back the same uuid in the SATA Controller section as those of the MediaRegistry sections seems to solve the issue
  • I've not yet restarted the father vbox, need to do some backup beforehand, I'll let you know

hope this pieces of information helps

comment:19 follow-up: ↓ 20 Changed 11 years ago by frank

ex_rcn, VBox 4.1.2 still had this bug. Please update to VBox 4.1.6!

comment:20 in reply to: ↑ 19 Changed 11 years ago by Stan

I'm running the latest version 4.1.8 and I still get this error messgae whenever I try and revert back to a previous snapshot very annoying and basically making this product very difficult to use !!

comment:21 Changed 11 years ago by ...don

I am having this identical error in 4.1.8. All .vbox files created new under 4.1.x. Happens when I fork a chain of snapshots, and then go back and delete one of the forks. A sample file is attached.

Changed 11 years ago by ...don

comment:22 Changed 6 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete
  • Description modified (diff)

Please reopen if still relevant with a recent VirtualBox release.

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