I can not run a Virtualbox Machine from command line what do I exactly need? I did a bit research first but this command did not work for me:
vboxmanage startvm win7 --type headlessResult is:
VBoxManage: error: Could not find a registered machine named 'win7'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(pszVM).raw(), machine.asOutParam())" at line 575 of file VBoxManageMisc.cpp- "win7" is the VM I'm trying to run.
- I can run this VM via phpVirtualBox addon perfectly fine.
- After launching this vm via phpVirtualBox I can perfectly RDM from Linux or Windows.
- I'm running this VM on Ubuntu Server 14.04.03 amd64 headless installation.
- Virtualbox version is: 4.3.34r104062
- I don't know how to register this VM from terminal as its files located in a USB hdd using the NTFS partition.
My aim was to run this vm on system boot, preferably a bit delayed.
I'm ready to provide any other information needed.
41 Answer
Here is a way to start a virtual machine from terminal :
Open Virtual Box, right-click on the virtual machine. Then click on Create shortcut on desktop.
Go to the desktop, right-click on the shortcut and edit it.
Then copy the command and paste it into the terminal.
/usr/lib/virtualbox/VirtualBox --comment "Ubuntu" --startvm "cea829eb-85fe-4842-b98e-e98603094be0"or you can start in terminal like this.
Get your UUID of VM
cd "VirtualBox VMs"
cd your-virtualpc-name
cat your-virtualpc-name.vbox-prev |grep Machineoutput should look like this.
neil@ASUS:~/VirtualBox VMs/Ubuntu$ cat Ubuntu.vbox-prev |grep Machine <Machine uuid="{cea829eb-85fe-4842-b98e-e98603094be0}" name="Ubuntu" OSType="Ubuntu" snapshotFolder="Snapshots" lastStateChange="2015-11-22T08:47:08Z"> <ExtraDataItem name="GUI/RestrictedRuntimeMachineMenuActions" value="SaveState,PowerOff"/> </Machine>
neil@ASUS:~/VirtualBox VMs/Ubuntu$ Copy the Machine uuid
and run it in the command like so. With the quote marks
VBoxHeadless --startvm "cea829eb-85fe-4842-b98e-e98603094be0" 7