VirtualBox

Opened 14 years ago

Last modified 11 years ago

#7142 new defect

SHUTDOWN=acpibutton fails to wait for shutdown of headless/vrdp guest with parrallel boot activated on host

Reported by: ddehnhard Owned by:
Component: other Version: VirtualBox 3.2.6
Keywords: Cc:
Guest type: other Host type: Linux

Description

Hello,

I am running Virtualbox vrdp type virtual machines on a server. These are started and stopped with the acpipowerbutton (and a wait until all vms are stopped) command on host startup and shutdown. I use a custom init script for this, but while investigating the problem I used the functionality of the entry "SHUTDOWN=acpibutton" in /etc/default/virtualbox and it shows exactly the same behaviour: The VM is not shutting down gracefully, but stopped abruptly, when the host is shutting down. Moreover multiple times I lost data on that stopped VMs (they worked well, just "forgot" some recent activities like VCS commits...).

For my script I found the problem to be the fact that Debian (Squeeze) recently activated parrallel execution of initscripts. I suspect the sendsigs script at fault, as it sends KILL signals to all remaining running processes. Though I solved that problem for me by adding $all to Required-Start and Required-Stop, so the VMs start and stop after respectively before all other scripts, which is what I want. I think it's the same with SHUTDOWN=acpibutton option of the virtualbox init script.

I migrated my machines from VMWare Server, I had no problems with the equivalent shutdown option there.

Change History (1)

comment:1 by Ryan, 11 years ago

I've run into the same problem with VirtualBox 4.2.4 running on Debian 6.0.6. On shutdown or reboot, the sendsigs script runs before the vboxdrv script and sends SIGTERM to all the VirtualBox processes. I think dependency based boot ordering is the real culprit. For me, adding:

# Required-Stop: sendsigs

..to the vboxdrv initscript and running:

insserv

..changes the shutdown sequence so vboxdrv runs before sendsigs.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use