[Not-Really-Solved] Revert to Current Snapshot: Inaccessible

Discussions related to using VirtualBox on Linux hosts.

[Not-Really-Solved] Revert to Current Snapshot: Inaccessible

Postby urilabob » 17. Aug 2009, 17:52

host: CentOS 5.3 (64 bit)
guest: fedora 11 (64 bit)
Virtualbox: 3.0.4
Hardware: mostly intel

Help!! I've been building fedora in my virtualbox very carefully, snapshotting every major step, with lots of reversions because of crashes (but it seems to be more stable now I have the "additions" installed). However on the latest stage, updating the system after install, the guest froze. Not to worry, I'll just pull the plug and revert, thought I. Well, not so simple. When I view snapshots in the manager, the current snapshot is in bold text. When I try to revert to it, one of three things happens:

1. the VM becomes greyed out, with a stop sign and "inaccessible". The "details" tab says: "The selected virtual machine is inaccessible. Please inspect the error message shown below and press the Refresh button if you want to repeat the accessibility check." (which would be great if there actually _was_ an error message shown below; in fact,the screen below is just blank).

2. As above, except that the screen _does_ contain a message, such as:
Result Code: Unknown Status 0x80000400 (0x00000400)
(since I can't find any doco on this, it doesn't seem to be much different from 1)

3. VirtualBox segfaults

It seems to be random which of the three occurs, though I think the longer I leave it running before trying to revert, the higher the probability of segfault.

Any ideas on how to recover to the snapshot (preferably the previous one, but any would be better than nothing) would be _immensely_ appreciated. I really don't want to go through this whole process again.

Thanks and Best Wishes
Last edited by urilabob on 13. Sep 2009, 16:21, edited 1 time in total.
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Revert to Current Snapshot: Inaccessible

Postby urilabob » 17. Aug 2009, 18:01

Sorry, just realised I should have given examples from the logs of recent segfaults:

Aug 17 23:52:39 sc kernel: VirtualBox[7620]: segfault at 0000000000000008 rip 00
002aaaaf3cb5c0 rsp 00007fffc2279f68 error 4
Aug 18 00:35:39 sc kernel: VirtualBox[7976]: segfault at 0000000000000008 rip 00
002aaaaf3cb5c0 rsp 00007fff66137b78 error 4
Aug 18 00:59:15 sc kernel: VirtualBox[8302]: segfault at 0000000000000521 rip 00
002aaaaf39002a rsp 00007fff56132f40 error 4

(can't find anything related in any logs when it doesn't segfault)
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Revert to Current Snapshot: Inaccessible

Postby Perryg » 17. Aug 2009, 18:03

In the VBox program GUI, what does it say the state is? Off,Saved, Running, Aborted..Etc.
Should be just under the name of the guest on the left side.
Perryg
Site Moderator
 
Posts: 25943
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Revert to Current Snapshot: Inaccessible

Postby urilabob » 17. Aug 2009, 18:16

Perryg wrote:In the VBox program GUI, what does it say the state is? Off,Saved, Running, Aborted..Etc.
Should be just under the name of the guest on the left side.


Says it's "Powered Off"
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Revert to Current Snapshot: Inaccessible

Postby Perryg » 17. Aug 2009, 18:23

OK on the right side in the snapshot folder you should see your various snapshots.
The last one should say current state (changed)
What happens if you right click on that one and then click revert?

If it says Current state and no (changed) then what happens if you try to right click on it then?
Do you have a choice to revert?
Perryg
Site Moderator
 
Posts: 25943
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Revert to Current Snapshot: Inaccessible

Postby urilabob » 17. Aug 2009, 18:32

Perryg wrote:OK on the right side in the snapshot folder you should see your various snapshots.
The last one should say current state (changed)
What happens if you right click on that one and then click revert?


Dead right, it's "Current state(changed). Right clicking on it and selecting revert is what causes one of the three behaviours listed above - that is:
.Inaccessible (with a blank report screen)
.Inaccessible (with the report screen listed above)
.segfault

I've checked pretty carefully, it doesn't seem to be a permissions or selinux problem (all relevant directories and files are owned by rim:vboxusers and have 660 permission or better, and there are no selinux alerts). I'm guessing that the "Current State" has got corrupted in a way that is blocking reversion.
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Revert to Current Snapshot: Inaccessible

Postby Perryg » 17. Aug 2009, 18:51

At this point you have very little of a decision to make.
The only thing that I can think of (and I am no expert in snapshots, just what I have found that works for me) is to discard the current state and snapshot (which should take you back to the snapshot just before and revert to that state as well).

But before doing this I would strongly suggest that you make a backup copy of the machine VDI at the very least, in case this whole thing goes south.
At least you will not need to reinstall the OS, if it is not what got damaged by pulling the plug as you say.

You can backup the entire .virtualbox folder which should have all of the files in them (unless you told VBox to put them somewhere else), but this is going to take some serious disk space.

Good luck and let us know how it turns out.

PS: my experience with Fedora 11 and any other program that produced Segfaults were usually caused by SeLinux. Not saying that is your reason but almost always was my problem.
Perryg
Site Moderator
 
Posts: 25943
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Revert to Current Snapshot: Inaccessible

Postby urilabob » 18. Aug 2009, 08:59

Perryg wrote:The only thing that I can think of (and I am no expert in snapshots, just what I have found that works for me) is to discard the current state and snapshot (which should take you back to the snapshot just before and revert to that state as well).

But before doing this I would strongly suggest that you make a backup copy of the machine VDI at the very least, in case this whole thing goes south.


All safely backed up. But attempting to discard _any_ state results in the same problem. So I'm still stuck. However I got some more clues: running VBoxManage from the command line gives a bit more information:
VBoxManage discardstate scteachplate
VirtualBox Command Line Management Interface Version 3.0.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Cannot discard the machine state as the machine is not in the saved state (machine state: 1)
Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "ForgetSavedState(true)" at line 1201 of file VBoxManage.cpp

The relevant code lines seem to be checking (mMachineState != MachineState_Saved), and then aborting with this error (I'm downloading the source to see if I can make more sense of the possible values of mMachineState - right now, I don't know what machine state 1 means - at the moment, I only have some snippets from patches that google turned up).
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Revert to Current Snapshot: Inaccessible

Postby urilabob » 18. Aug 2009, 10:07

OK, this is what I'm seeing;
VBoxCAPI_v2_2.h:

Code: Select all   Expand viewCollapse view
enum MachineState
{
    MachineState_Null = 0,
    MachineState_PoweredOff = 1,
    MachineState_Saved = 2,
    MachineState_Aborted = 3,
    MachineState_Running = 4,
    MachineState_Paused = 5,
    MachineState_Stuck = 6,
    MachineState_Starting = 7,
    MachineState_Stopping = 8,
    MachineState_Saving = 9,
    MachineState_Restoring = 10,
    MachineState_Discarding = 11,
    MachineState_SettingUp = 12,
    MachineState_FirstOnline = 4,
    MachineState_LastOnline = 10,
    MachineState_FirstTransient = 7,
    MachineState_LastTransient = 12
};


In less ConsoleImpl.cpp:
Code: Select all   Expand viewCollapse view
    if (mMachineState != MachineState_Saved)
        return setError (VBOX_E_INVALID_VM_STATE,
            tr ("Cannot discard the machine state as the machine is "
                "not in the saved state (machine state: %d)"),
            mMachineState);

    HRESULT rc = S_OK;

    rc = mControl->SetRemoveSavedState(aRemove);
    CheckComRCReturnRC (rc);

    /*
     *  Saved -> PoweredOff transition will be detected in the SessionMachine
     *  and properly handled.
     */
    rc = setMachineState (MachineState_PoweredOff);


The comment about the transition sounds suspiciously like an assumption that was not validated in my case... any thoughts? Are we getting into bug-report territory here?
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Revert to Current Snapshot: Inaccessible

Postby Perryg » 18. Aug 2009, 15:08

As I said earlier I am no expert in snapshots, but it appears to me that VBox is indeed looking for a tag. These usually end up in the machine.xml, or the virtualbox.xml.
You can look and edit these (since you have a backup up) but you may want to go ahead and raise a ticket at bugtracker (link is at the bottom of my post). That way they can tell you what if anything you can do. Be sure to send them the link to this page so they can see the progression of how it happened to where you are now as well as your VBox log.

Please be sure to post your end results here so others can see what to do if this happens to them.
Perryg
Site Moderator
 
Posts: 25943
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Revert to Current Snapshot: Inaccessible

Postby urilabob » 25. Aug 2009, 17:44

Bad news and good.
The bad news: I wasn't ever able to resurrect the dead virtual machine. Even worse, a repeat of the same installation failed in exactly the same way: many kernel oopses and hangs on the way to getting a complete installed system, then a complete freeze on the first system update after installation, followed by a completely dead sequence of snapshots. So it's a repeatable failure.
The good news: using just 1 processor has worked perfectly so far, no hangs, no kernel oopses, just a rock-solid installation. So clearly it's some combination of the particular hardware architecture and using SMP. Maybe future upgrades will fix it....
urilabob
 
Posts: 66
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 14 guests