Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Oracle VM Virtualbox on my Windows 7 development machine. I want to start a VM when Windows starts, and cleanly shut that VM down when Windows stops.

Can that be done?

I can start a headless VM by entering this on the command line;

"C:\Program Files\Oracle\VirtualBox\vboxheadless" -startvm "sw (Ubuntu 12.04)"

How can I 'cleanly' stop that VM? IE. How can I send an ACPI Shutdown to that VM?

share|improve this question

closed as off-topic by Michael Hampton Feb 23 '15 at 12:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.


  1. Configure your guest OS to shut down on pressing the power button. For Ubuntu 12.04 with GUI it depends on your Desktop Environment installed on where to configure that in the system settings.

    For headless machines, make sure you have installed the package acpid.

  2. Execute

    VBoxManage controlvm "VM Name" acpipowerbutton

Reference: VBoxManage controlvm documentation

Alternatively, use SSH and PuTTY to execute the command shutdown -h now without interaction as described in "How to run a command file in PuTTY using automatic login in a command prompt?" on

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.