Root-cause for the following VBOX_E_INVALID_VM_STATE?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
rbarak
Posts: 52
Joined: 25. Sep 2018, 20:43

Root-cause for the following VBOX_E_INVALID_VM_STATE?

Post by rbarak »

Is it possible to get the root-cause for the following VBOX_E_INVALID_VM_STATE in VBox.log.1?

Code: Select all

   1475 773:31:20.356657 Console: Machine state changed to 'Stopping'
   1476 773:31:20.357051 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)
   1477 773:33:45.220120 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Invalid machine state: Stopping}, preserve=false aResult        Detail=0
(VM guest is CentOS 7, running on a CentOS 7 host)
Attachments
sonark-big-data-vm-2020-02-11-21-09-46-1.txt
VBox.log.1 with VBOX_E_INVALID_VM_STATE
(95.04 KiB) Downloaded 13 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Root-cause for the following VBOX_E_INVALID_VM_STATE?

Post by scottgus1 »

00:00:00.285412 Console: Machine state changed to 'Restoring'
...
00:30:25.329488 VMMDev: Guest Log: 00:06:59.811017 automount vbsvcAutomounterMountIt: Successfully mounted 'data' on '/media/sf_data'
...
66:10:18.064342 Console: Machine state changed to 'Paused'
66:10:32.307835 Changing the VM state from 'SUSPENDED' to 'RESUMING'
...
165:57:15.038635 Changing the VM state from 'RUNNING' to 'RESETTING'
...
773:31:20.356657 Console: Machine state changed to 'Stopping'
773:31:20.357051 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)
773:33:45.220120 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE
Looks like the guest was started from a saved-state, paused & resumed at about 66 hours, was reset at 165 hours, and finally someone tried to turn it off at 773 hours (32 days).

None of this explains to me why there would be a VBOX_E_INVALID_VM_STATE, unfortunately. Some of our forum gurus speak hex and might be able to see more.

However, the "VBOX_E_INVALID_VM_STATE" errors I have seen have more data in the log after the error. Is this log truncated manually?
rbarak
Posts: 52
Joined: 25. Sep 2018, 20:43

Re: Root-cause for the following VBOX_E_INVALID_VM_STATE?

Post by rbarak »

scottgus1 wrote:
However, the "VBOX_E_INVALID_VM_STATE" errors I have seen have more data in the log after the error. Is this log truncated manually?
The log was not truncated manually: the 773:33:45.220120 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE line is the last line of the log file.
On the off-chance it may help, I'm attaching the log newer than the above log file.
Attachments
sonark-big-data-vm-2020-02-27-10-08-13-0.txt
VBox.log
(95.05 KiB) Downloaded 15 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Root-cause for the following VBOX_E_INVALID_VM_STATE?

Post by scottgus1 »

Hmmm. Still don't see anything weird, in the new log either.

Have to leave this one for better eyes than mine.

There are codes that go with the error:

aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={872da645-4a9b-1727-bee2-5585105b9eed}

That "0x80bb0002" looks like an error code, maybe the source code has something pertaining to which error codes match to the error causes you posted here: viewtopic.php?f=10&t=96544&p=470867#p470813
rbarak
Posts: 52
Joined: 25. Sep 2018, 20:43

Re: Root-cause for the following VBOX_E_INVALID_VM_STATE?

Post by rbarak »

scottgus1 wrote:[...]
There are codes that go with the error:
aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={872da645-4a9b-1727-bee2-5585105b9eed}
That "0x80bb0002" looks like an error code, maybe the source code has something pertaining to which error codes match to the error causes you posted here: viewtopic.php?f=10&t=96544&p=470867#p470813
The 0x80BB0002 is just:

Code: Select all

#define VBOX_E_INVALID_VM_STATE 0x80BB0002
As for the 872da645-4a9b-1727-bee2-5585105b9eed, the only reference is in ./src/VBox/Main/idl/VirtualBox.xidl:8981, where we see:

Code: Select all

   8979   <interface
   8980     name="IConsole" extends="$unknown"
   8981     uuid="872da645-4a9b-1727-bee2-5585105b9eed"
   8982     wsmap="managed"
   8983     reservedMethods="8" reservedAttributes="8"
   8984     >
   8985     <desc>
   8986       The IConsole interface represents an interface to control virtual
   8987       machine execution.
   8988 
   8989       A console object gets created when a machine has been locked for a
   8990       particular session (client process) using <link to="IMachine::lockMachine" />
   8991       or <link to="IMachine::launchVMProcess"/>. The console object can
   8992       then be found in the session's <link to="ISession::console" /> attribute.
   8993 
   8994       Methods of the IConsole interface allow the caller to query the current
   8995       virtual machine execution state, pause the machine or power it down, save
   8996       the machine state or take a snapshot, attach and detach removable media
   8997       and so on.
   8998 
   8999       <see><link to="ISession"/></see>
   9000     </desc>
Post Reply