-
-
Save pydevops/4168cfbb2afbd97ded284a7b1797b95d to your computer and use it in GitHub Desktop.
VirtualBox Cheat Sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"VBoxManage" command is different from "sudo VBoxManage" command | |
VBoxManage --version | |
sudo apt-get dist-upgrade -y -> Debian-based linux makes sure VirtualBox Guest Additions is installed | |
VBoxManage list runningvms -> Find running vm to box | |
vagrant package --base xxxxx_1522057296984_52705 --output ubuntu1604.box --> Package running vm as vagrant box | |
# Download an ISO image of VirtualBox Guest Additions | |
wget http://download.virtualbox.org/virtualbox/5.2.12/VBoxGuestAdditions_5.2.12.iso | |
sudo mount -o loop VBoxGuestAdditions_5.2.12.iso /tmp/vbox | |
lsmod | grep vboxguest -> verify vbox installation | |
modinfo vboxguest | |
#troubleshooting | |
VBoxManage list vms | awk '{print $2;}' | |
VBoxManage list runningvms | awk '{print $2;}' | |
VBoxManage showvminfo vmid | |
VBoxManage unregistervm --delete vmid | |
VBoxManage modifyvm vmid --name vmname | |
VBoxManage: error: Cannot unregister the machine 'xx' while it is locked | |
sudo VBoxManage controlvm 'xx' poweroff | |
VBoxManage: error: The machine 'xx' is already locked for a session (or being unlocked) | |
sudo VBoxManage startvm 'xx' --type emergencystop | |
rm -fr ~/"VirtualBox VMs/NAMEOFVM" -> delete it manually | |
ps -ef | grep -i virtualbox |
Author
pydevops
commented
Jan 28, 2019
- https://blog.sleeplessbeastie.eu/2013/07/23/virtualbox-how-to-control-virtual-machine-using-command-line/
- https://blog.scottlowe.org/2016/11/10/intro-to-vbox-cli/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment