﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
10134	VBoxManage controlvm ... savestate returns a wrong error code when failing => Fixed in SVN	bekks		"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.
}}}
"	defect	closed	VM control	VirtualBox 4.1.8	fixed			other	Linux
