Results 1 to 4 of 4

Thread: Virtualbox bypass "Close Virtual Machine" box

  1. #1
    Join Date
    May 2006
    Location
    Redmond, WA
    Beans
    57
    Distro
    Ubuntu 12.04 Precise Pangolin

    Virtualbox bypass "Close Virtual Machine" box

    I'm running VirtualBox OSE 1.5.0 on a 64bit Gutsy host with a WinXP guest.

    I usually keep the virtual machine open so I can test things in IE (and use flash without a kludgey hack).

    Whenever I shutdown Ubuntu, VirtualBox always throws up a "Close Virtual Machine" prompt with either "save snapshot" or "shutdown".

    Does anyone know how to set a default answer so there's no prompt? That way when I hit shutdown in Ubuntu, I can leave the computer and know that it'll shutdown?

    The prompt pops up under other windows, so sometimes I don't see it and I leave my computer, only to find out later that it's still running (trying to save electricity here).

    Thanks.
    Hester: 12.04 Desktop x64 | Core i5-2540M @ 2.6 GHz | 16GB DDR3 | 80GB SSD + 256GB SSD
    Cortana: 12.04 Desktop x86 | Atom N270 @ 1.6 GHz | 2GB DDR2 | 32GB SSD
    Horatio: 12.04 Server x64 | Atom N330 @ 1.6 GHz | 1GB DDR2 | 2.5TB

  2. #2
    Join Date
    May 2007
    Location
    Netherlands
    Beans
    321
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Virtualbox bypass "Close Virtual Machine" box

    From the User Manual, I found the following option to use in the shutdown script:
    Code:
    VBoxManage controlvm "VM name" savestate
    That works like a charm, it saves the state of the VM for you to continue next time you start the VM. You can also use poweroff or acpipowerbutton to shutdown the VM directly.
    Throw Apples out the Windows, but make sure not to hit the Penguin.

  3. #3
    Join Date
    May 2006
    Location
    Redmond, WA
    Beans
    57
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Virtualbox bypass "Close Virtual Machine" box

    Thanks!

    The command works, but where do I put it? I tried making a shutdown script and placing links in rc0.d and rc6.d, but they won't run until after gdm is finished.
    Hester: 12.04 Desktop x64 | Core i5-2540M @ 2.6 GHz | 16GB DDR3 | 80GB SSD + 256GB SSD
    Cortana: 12.04 Desktop x86 | Atom N270 @ 1.6 GHz | 2GB DDR2 | 32GB SSD
    Horatio: 12.04 Server x64 | Atom N330 @ 1.6 GHz | 1GB DDR2 | 2.5TB

  4. #4
    Join Date
    May 2007
    Location
    Netherlands
    Beans
    321
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Virtualbox bypass "Close Virtual Machine" box

    You have to add it in the /etc/acpi/power.sh script I think. Check what the shutdown button calls in order for the system to shutdown, then put the command at the beginning.
    Throw Apples out the Windows, but make sure not to hit the Penguin.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •