[Pkg-virtualbox-devel] Bug#693602: [virtualbox] startvm does not report valid returncode on error

Omega Weapon omegaphil at gmail.com
Sun Nov 18 12:44:26 UTC 2012


Package: virtualbox
Version: 4.1.18-dfsg-1.1
Severity: normal

Reporting this here rather than the Virtualbox bugtracker as you need an 
Oracle account to do this, which requires personal information to 
register and is therefore unacceptable.

startvm has failed intermittently for some time, yet the command always 
returns as success (0) and therefore my script failed to capture the 
error. The following command is used, ran from cronjob script running as 
root:

====================================================================

sudo -u <user that owns the VM> VBoxManage startvm "<VM name>" 2>&1

====================================================================

The VM is in the saved state. I added extra code to detect the failure 
to start, and now have my first actual feedback from the failure:

====================================================================

VBoxManage: error: The virtual machine '<VM name>' has terminated 
unexpectedly during startup with exit code 0
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), 
component Machine, interface IMachine, callee
Waiting for VM "<VM name>" to power on...

====================================================================

This is clearly a failure and should return a failure exit code.

I am not looking into the actual error itself as it looks to be a mess 
from the search hits.


--- System information. ---
Architecture: amd64
Kernel:       Linux 3.2.0-4-amd64

Debian Release: wheezy/sid
   500 unstable        ignorantguru.github.com
   500 testing         security.debian.org
   500 testing         ftp.uk.debian.org
   500 stable          www.getgnash.org
   500 quodlibet-unstable www.student.tugraz.at

--- Package information. ---
Depends                 (Version) | Installed
=================================-+-==============
libc6                    (>= 2.6) |
libcurl3              (>= 7.16.2) |
libgcc1              (>= 1:4.1.1) |
libgsoap2                         |
libpng12-0          (>= 1.2.13-4) |
libpython2.7             (>= 2.7) |
libsdl1.2debian       (>= 1.2.11) |
libssl1.0.0            (>= 1.0.0) |
libstdc++6               (>= 4.6) |
libvncserver0                     |
libx11-6                          |
libxcursor1            (>> 1.1.2) |
libxext6                          |
libxml2                (>= 2.7.4) |
libxmu6                           |
libxt6                            |
zlib1g               (>= 1:1.1.4) |
python              (>= 2.6.6-7~) |
python                   (<< 2.8) |
python2.7                         |
adduser                           |


Recommends                       (Version) | Installed
==========================================-+-=====================
virtualbox-dkms       (= 4.1.18-dfsg-1.1)  | 4.1.18-dfsg-1.1
  OR virtualbox-source  (= 4.1.18-dfsg-1.1) |
virtualbox-qt          (= 4.1.18-dfsg-1.1) | 4.1.18-dfsg-1.1
libgl1-mesa-glx                            |
  OR libgl1                                 |
libqt4-opengl                 (>= 4:4.5.3) |
libqtcore4                    (>= 4:4.5.3) |
libqtgui4                     (>= 4:4.5.3) |


Suggests                            (Version) | Installed
=============================================-+-===========
virtualbox-guest-additions-iso                | 4.1.18-1
vde2                                          |



More information about the Pkg-virtualbox-devel mailing list