VBox Manage

Make sure you know the name of your VM.  Both options work, second just shows you which are running :

VBoxManage list vms

VBoxManage list runningvms

Let's assume the VM is called WindowsServer (if there are any spaces in the name use quotes).

To start the VM in headless mode (first option works best as it doesn't leave command line hanging):

VBoxManage startvm WindowsServer --type headless

VBoxHeadless -startvm WindowsServer

To run it in the GUI:

VBoxManage -startvm WindowsServer --type gui


To stop the VM you would again use VBoxManage but this time with controlvm option. controlvm has several options pause|resume|reset|poweroff|savestate

To stop the VM in a saved state:

VBoxManage controlvm WindowsServer savestate

For a graceful shutdown:

VBoxManage controlvm WindowsServer acpipowerbutton