Ticket #4034 (closed defect: worksforme)

Opened 14 years ago

Last modified 14 years ago

VirtualBox stop_vm init script does not work

Reported by: Flancer Owned by:
Component: other Version: VirtualBox 2.2.2
Keywords: Cc:
Guest type: other Host type: other

Description (last modified by frank) (diff)

My VMs do not shutdown properly everything I reboot or shutdown the host machine.

I have noticed that the stop_vm function in the init script of vboxdrv does not really work.

I have made the following modification to the stop_vm function to make it work.

elif [ "$SHUTDOWN" = "savestate" ]; then
    begin_msg "Saving state of remaining VMs"
    for v in $VMS; do
        v=`echo ${v:1}`
        v=`echo ${v%\"}`
        sudo -H -u $i $VBOXMANAGE -nologo controlvm $v savestate

I am using VirtualBox 2.2.2. and Ubuntu 8.0.4.

Change History

comment:1 Changed 14 years ago by frank

  • Description modified (diff)

This is already fixed in SVN. The reason for the problem was that the output format of VBoxManage list runningvms changed. Why do you need the sudo command? Stopping the VM should actually work as super user without doing sudo as we set VBOX_IPC_SOCKETID.

comment:2 Changed 14 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 14 years ago by Flancer

  • Status changed from closed to reopened
  • Resolution fixed deleted

It seems with VirtualBox 3.0, I saw that on my machine it can't find the VMs unless I place in the sudo command to perform the savestate.

comment:4 Changed 14 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to worksforme

This script is meant to be called from a root account.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use