Difference between revisions of "VBoxManage"

From Hawk Wiki
Jump to: navigation, search
(Created page with "==VBoxManage== <pre> VBoxManage controlvm # list vms VBoxManage list vms # show detail VBoxManage showvminfo vb1 </pre> === To make vboxautostart-service.service work, you n...")
 
(Install VBOX)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== install vnc server ==
 +
http://wiki.hawkguide.com/wiki/Vnc_server
 +
 +
==Install VBOX==
 +
<pre>
 +
 +
sudo apt-get install virtualbox
 +
 +
</pre>
 +
 
==VBoxManage==
 
==VBoxManage==
 +
first need to install extension pack
 +
https://www.virtualbox.org/wiki/Download_Old_Builds_6_1
 +
 
<pre>
 
<pre>
 
VBoxManage controlvm
 
VBoxManage controlvm
Line 5: Line 18:
 
VBoxManage list vms
 
VBoxManage list vms
 
# show detail
 
# show detail
VBoxManage showvminfo vb1
+
vboxmanage showvminfo "my-ubuntu"
 +
 
 +
# power off
 +
VBoxManage controlvm my-ubuntu poweroff
 +
 
 +
# start headless
 +
VBoxManage startvm my-ubuntu --type headless
 +
 
 +
# set auto restart
 +
# setup auto start first
 +
https://askubuntu.com/questions/404665/how-to-start-virtual-box-machines-automatically-when-booting
 +
# if you see error VERR_ACCESS_DENIED, tun this
 +
sudo touch /etc/vbox/${USER}.start
 +
sudo chgrp vboxusers /etc/vbo
 +
sudo chmod 1775 /etc/vbox
 +
sudo chmod 777 /etc/vbox/${USER}.start
 +
VBoxManage modifyvm <uuid|vmname> --autostart-enabled on
 
</pre>
 
</pre>
  

Latest revision as of 19:41, 5 October 2023

install vnc server

http://wiki.hawkguide.com/wiki/Vnc_server

Install VBOX


sudo apt-get install virtualbox

VBoxManage

first need to install extension pack https://www.virtualbox.org/wiki/Download_Old_Builds_6_1

VBoxManage controlvm
# list vms 
VBoxManage list vms
# show detail
vboxmanage showvminfo "my-ubuntu" 

# power off
VBoxManage controlvm my-ubuntu poweroff

# start headless
VBoxManage startvm my-ubuntu --type headless

# set auto restart 
# setup auto start first
https://askubuntu.com/questions/404665/how-to-start-virtual-box-machines-automatically-when-booting
# if you see error VERR_ACCESS_DENIED, tun this
sudo touch /etc/vbox/${USER}.start
sudo chgrp vboxusers /etc/vbo
sudo chmod 1775 /etc/vbox
sudo chmod 777 /etc/vbox/${USER}.start
VBoxManage modifyvm <uuid|vmname> --autostart-enabled on

To make vboxautostart-service.service work, you need to disable SELinux

sudo setenforce 0
vim /etc/selinux/config
# change to SELINUX=permissive