How can I send VBoxHeadless to the background so I can close the Terminal?
Just found a solution here: Starting the the virtual machine with VBoxManage
instead of VBoxHeadless
solves my problem:
VBoxManage startvm <uuid|vmname> --type headless
For example, if your VM's name was Ubuntu and it had a UUID of 865b2700-471a-11e4-916c-0800200c9a66, you can run:
VBoxManage startvm Ubuntu --type headless
or
VBoxManage startvm 865b2700-471a-11e4-916c-0800200c9a66 --type headless
Note: If the name of your VM contains spaces, wrap the name in quotes (e.g. "My Ubuntu"
).
The machine goes nicely into the background. Now I can control the virtual machine with VBoxManage controlvm
poweroff/pause/reset (section 3.3).