Ticket #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:|
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.