diff --git a/VirtualBox.md b/VirtualBox.md new file mode 100644 index 0000000..340b078 --- /dev/null +++ b/VirtualBox.md @@ -0,0 +1,55 @@ +# VirtualBox + +(https://www.virtualbox.org) + +## Installation + +```sh +apt install virtualbox virtualbox-dkms virtualbox-ext-pack virtualbox-guest-additions-iso virtualbox-qt +``` + +## Status + +```sh +VBoxManage list vms +VBoxManage list runningvms +``` + +## Start vms + +```sh +VBoxManage startvm "Rocky Linux" --type=headless +``` + + +## Stop vm + +```sh +VBoxManage controlvm SlackDB poweroff soft +``` + +## Export / Import + +```sh +VBoxManage export SlackDB --output SlackDB.ova # export +VBoxManage import SlackDB.ova # import +``` + +## Extend disk + +```sh +VBoxManage modifyhd slack.vdi --resize 102400 # MB +# 16 GB = 16384 MB +# 32 GB = 32768 MB +# 48 GB = 49152 MB +# 64 GB = 65536 MB +# 80 GB = 81920 MB +# 100 GB = 102400 MB +``` + +## Convert to KVM + +```sh +VBoxManage clonehd --format RAW .vdi .img +qemu-img convert -f raw .img -O qcow2 .qcow2 +``` \ No newline at end of file