57

I know that this is possible, but I don't know how...

I am just trying to start a VirtualBox VM called ubuservloc from the command line, but without success.

0

5 Answers 5

94

Only needed:

VBoxManage startvm "VM name" --type headless

For example:

VBoxManage startvm ubuservloc --type headless
8
  • 15
    There is also VBoxHeadless --startvm "VM name" Commented Apr 2, 2015 at 17:57
  • 12
    To shut it down use this command: VBoxManage controlvm "VM name" acpipowerbutton
    – Lynch
    Commented Jul 6, 2015 at 23:52
  • 1
    This won't work if the VM is on a saved state with 3D Acceleration on
    – Duncan
    Commented Jul 11, 2016 at 13:01
  • 3
    Additionally, if your VM uses 3D acceleration, it makes sense to (temporarily) disable it, as it'll prevent the VM from starting in headless mode.
    – Bass
    Commented Sep 13, 2016 at 10:08
  • 2
    In case you forgot the names of your VMs, do VBoxManage list vms. Commented Oct 19, 2018 at 7:19
8

Try this,

virtualbox startvm ubuservloc
1
1

stop

VBoxManage controlvm "vm_name" poweroff

start

nohup VBoxHeadless -startvm "vm_name" & 
1
  • To list virtual machines:

    VBoxManager list vms
    
  • To Start a virtual machine:

    VBoxManage startvm YOUR_VIRTUAL_MACHINE_NAME
    
  • To stop a virtual machine:

    VBoxManage controlvm Android poweroff
    
0
  • in windows 10
    1. open Oracle VM VirtualBox -> select vm_name right click -> create Shortcut in Desktop
    2. select shortcut -> properties -> shortcut -> target -> copy
    3. open cmd run (change 'VirtualBox.exe' -> 'VBoxHeadless.exe')
"C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe" --comment "linux_mint" --startvm "14f426cc-845d-46cb-9f6e-4dbb31a3769a"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .