Since we have servral machine on my testbed (fedora), and if I need start some VMs on that, I have to go to the server and using the VirtualBox GUI to start it. now I am bored of this, I want to start the VMs and connect with termial using my laptop. so I want to show how you start your VMs without using the specified Al Virtualbox has powerful command line tools, and most of time we'll use this "VBoxManage ", this tool will help you start and shutdown the virtual machines, or just let you configure the network and check the status of the machine, and etc. it has same options to make you life better. you can get more info just by typing "VBoxMange ". the simple way of start/shutdown of the VMs is just "VBoxManage startvm <vm_name> or <uuid>" (U can use VBoxMange list vms to get the info)
[majian@localhost ~]$ VBoxManage list vms"blackbox" {41a1c221-49cd-4605-b0fd-e7fdd1aceb36}[majian@localhost ~]$ VBoxManage startvm 41a1c221-49cd-4605-b0fd-e7fdd1aceb36Waiting for VM "41a1c221-49cd-4605-b0fd-e7fdd1aceb36" to power on...VBoxManage: error: The virtual machine 'blackbox' has terminated unexpectedly during startup with exit code 1VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Machine, interface IMachine
Well, we got one problem here, that's because we are using the ssh terminal without GUI, we need to use the Headless mode to do that, you have two option for that:
VBoxManage startvm "myvm" --type headless // VBoxMange with headless mode orVBoxHeadless -s “myvm” // use the direct command VBoxHeadless
And here's the sample output of that when I use the method 2, but please note that if you use VBoxHeadless, this terminal need to stay open when you use your VM or you need to run this command in the backgroud.
[majian@localhost ~]$ VBoxHeadless -s "blackbox"Oracle VM VirtualBox Headless Interface 4.3.10_RPMFusion(C) 2008-2014 Oracle CorporationAll rights reserved.
-EOF