VirtualBox

Ticket #10134 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

VBoxManage controlvm ... savestate returns a wrong error code when failing => Fixed in SVN

Reported by: bekks Owned by:
Priority: major Component: VM control
Version: VirtualBox 4.1.8 Keywords:
Cc: Guest type: other
Host type: Linux

Description (last modified by frank) (diff)

When using "VBoxManage controlvm <vmname> savestate" and the command fails, the returned exit code is zero instead of non-zero, as you can see here:

myuser@mybox:~$ VBoxManage controlvm myvmname savestate && echo "Cool." || echo "Not so cool."
VBoxManage: error: Machine in invalid state 2 -- saved
Cool.

Doing the same with the pause argument instead of savestate returns the correct error code but a different message with the same logical content, as can be seen here:

myuser@mybox:~$ VBoxManage controlvm myvmname pause && echo "Cool." || echo "Not so cool."
VBoxManage: error: Invalid machine state: Saved
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "Pause()" at line 116 of file VBoxManageControlVM.cpp
Not so cool.

Change History

comment:1 Changed 2 years ago by bekks

From what other people posted on #vbox@freenode IRC 01/07/12, the error is the same on the following versions:

4.0.14r74382 on Ubuntu 10.04.3 64bit 4.1.8_Debianr75467 on Debian 4.1.8r75467 on Ubuntu 11.04 64bit 4.1.8r75467 on Mac OS X

comment:2 Changed 2 years ago by bekks

And again... now readable:

From what other people posted on #vbox@freenode IRC 01/07/12, the error is the same on the following versions:

4.0.14r74382 on Ubuntu 10.04.3 64bit
4.1.8_Debianr75467 on Debian
4.1.8r75467 on Ubuntu 11.04 64bit
4.1.8r75467 on Mac OS X

comment:3 Changed 2 years ago by frank

  • Description modified (diff)
  • Summary changed from VBoxManage controlvm ... savestate returns a wrong error code when failing to VBoxManage controlvm ... savestate returns a wrong error code when failing => Fixed in SVN

Thanks for the report. Fixed in the next maintenance release (4.1.12).

comment:4 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use