Hi I can run VMs via phpVirtualBox addon thanks for that but how come I can't run VMs from terminal?
For example `emre@tw8:~$ vboxmanage startvm xptw8 --type headless
VBoxManage: error: Could not find a registered machine named 'xptw8'
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
`
I mean what command phpVirtualBox is using to launch VMs maybe I should use it?
Hi Ian thank you for reply.
I don't have "vboxwebsrv" user. I have a user named "vbuser".
However isn't this command suppose to work with "sudo"? It didn't.
I'm using Virtualbox 4.3.34 and phpVirtualBox 4.3-3. I'm planning to upgrade what ever latest version is hope that will solve my issue.
edit 1:
Okay I updated to Virtualbox 5.0.12 and phpVirtualbox5.0.5
I still can't start virtual machines from terminal!
root@tw8:/home/vbuser/VirtualBox VMs# VBoxHeadless -startvm "c9ff4592-79a5-4d99-8c4f-5a86d32b0d3b" --vrdp=off
Oracle VM VirtualBox Headless Interface 5.0.12
(C) 2008-2015 Oracle Corporation
All rights reserved.
Invalid machine name or UUID!
root@tw8:/home/vbuser/VirtualBox VMs# VBoxHeadless -startvm win7 --vrdp=off
Oracle VM VirtualBox Headless Interface 5.0.12
(C) 2008-2015 Oracle Corporation
All rights reserved.
Invalid machine name or UUID!
root@tw8:/home/vbuser/VirtualBox VMs# vboxmanage startvm win7 --type headless
VBoxManage: error: Could not find a registered machine named 'win7'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(pszVM).raw(), machine.asOutParam())" at line 572 of file VBoxManageMisc.cpp
I'm just trying to add a line to crontab so virtualmachine can start on server boot. What I'm doing wrong?
edit 2:
Okay I logged in as "vbuser" to server via ssh.
I used this command and virtual machine started to work. VBoxHeadless -startvm "c9ff4592-79a5-4d99-8c4f-5a86d32b0d3b" --vrdp=off
I added this line to crontab of vbuser with @reboot at the beginning. Well it's not starting the VM on server boot. :|
edit 3:
Added this line into sudo crontab but still it's not starting vm on server boot.
@reboot sudo -u vbuser VBoxHeadless -startvm "c9ff4592-79a5-4d99-8c4f-5a86d32b0d3b" --vrdp=off
Last edit: emre 2016-01-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I can run VMs via phpVirtualBox addon thanks for that but how come I can't run VMs from terminal?
For example `emre@tw8:~$ vboxmanage startvm xptw8 --type headless
VBoxManage: error: Could not find a registered machine named 'xptw8'
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
`
I mean what command phpVirtualBox is using to launch VMs maybe I should use it?
If it's necessary more information can be found here http://askubuntu.com/questions/700364
Last edit: emre 2015-11-20
The user configured for vboxwebsrv is not the same user you are running vboxmanage as: "emre"
Hi Ian thank you for reply.
I don't have "vboxwebsrv" user. I have a user named "vbuser".
However isn't this command suppose to work with "sudo"? It didn't.
I'm using Virtualbox 4.3.34 and phpVirtualBox 4.3-3. I'm planning to upgrade what ever latest version is hope that will solve my issue.
edit 1:
Okay I updated to Virtualbox 5.0.12 and phpVirtualbox5.0.5
I still can't start virtual machines from terminal!
root@tw8:/home/vbuser/VirtualBox VMs# VBoxHeadless -startvm "c9ff4592-79a5-4d99-8c4f-5a86d32b0d3b" --vrdp=off
Oracle VM VirtualBox Headless Interface 5.0.12
(C) 2008-2015 Oracle Corporation
All rights reserved.
Invalid machine name or UUID!
root@tw8:/home/vbuser/VirtualBox VMs# VBoxHeadless -startvm win7 --vrdp=off
Oracle VM VirtualBox Headless Interface 5.0.12
(C) 2008-2015 Oracle Corporation
All rights reserved.
Invalid machine name or UUID!
root@tw8:/home/vbuser/VirtualBox VMs# vboxmanage startvm win7 --type headless
VBoxManage: error: Could not find a registered machine named 'win7'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(pszVM).raw(), machine.asOutParam())" at line 572 of file VBoxManageMisc.cpp
I'm just trying to add a line to crontab so virtualmachine can start on server boot. What I'm doing wrong?
edit 2:
Okay I logged in as "vbuser" to server via ssh.
I used this command and virtual machine started to work. VBoxHeadless -startvm "c9ff4592-79a5-4d99-8c4f-5a86d32b0d3b" --vrdp=off
I added this line to crontab of vbuser with @reboot at the beginning. Well it's not starting the VM on server boot. :|
edit 3:
Added this line into sudo crontab but still it's not starting vm on server boot.
@reboot sudo -u vbuser VBoxHeadless -startvm "c9ff4592-79a5-4d99-8c4f-5a86d32b0d3b" --vrdp=off
Last edit: emre 2016-01-16