#file: docs/cheat-sheets/vbox/vbox-cheat-sheet.sh
# how-to start a vm without ui
VBoxManage startvm "vm_name" --type headless
# how-to save the current state of the vm
VBoxManage controlvm "vm_name" savestate
# how-to start a vm with ui
VBoxManage startvm "vm_name"
# how-to shutdown a vm
VBoxManage controlvm "vm_name" poweroff
# add port forwarding from host to guest
VBoxManage modifyvm "vm_name" --natpf1 "5001,tcp,,5001,,5001"
#how-to check network settings
VBoxManage showvminfo "vm_name" | grep NIC
:: how-to export all myy Virtual box vms in Windows in the current dir in cmd
for /f "tokens=1 delims= " %i in ('VBoxManage list vms') do VBoxManage export %i -o %i.ova
#how-to resize the virtual disk
VBoxManage modifyhd "C:\Users\ysg\VirtualBox VMs\lp-host\lp-host-disk1.vmdk" --resize 20000
#you reserved too little space during installation ?! No problem resize the virtual disk :
VBoxManage clonehd "C:\Users\ysg\VirtualBox VMs\lp-host\lp-host-disk1.vmdk" "C:\Users\ysg\VirtualBox VMs\lp-host\lp-host-disk.vdi" --format vdi
VBoxManage modifyhd "C:\Users\ysg\VirtualBox VMs\lp-host\lp-host-disk.vdi" --resize 20480
#
# ---------------------------------------------------------
# VersionHistory:
# ---------------------------------------------------------
# export version=1.0.0
# ---------------------------------------------------------
# 2016-08-05 09:42:26 -- ysg -- Initial version
# ---------------------------------------------------------
#eof file: docs/cheat-sheets/vbox/vbox-cheat-sheet.sh
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!