VirtualBox commands
Here are few frequently used commands
Creating a VM
VBoxManage createvm — name ubuntu1804 — ostype Ubuntu_64 — register
To check the info of the VM created
VBoxManage showvminfo ubuntu1804
Setting Ram for VM
VBoxManage modifyvm ubuntu1804 — memory 4096 — boot1 dvd — vrde on — vrdeport 5001
Create a bridge virtual network adapter
VBoxManage modifyvm ubuntu1804 — nic1 nat
Add a storage controller to be used with the hard disk
VBoxManage storagectl ubuntu1804 — name ubuntu1804_SATA — add sata
Create a new virtual hard disk image
VBoxManage createhd — filename ubuntu1804.vdi — size 10280 — format VDI — variant Standard
Attach the hard disk to the controller?
VBoxManage storageattach ubuntu1804 — storagectl ubuntu1804_SATA — port 1 — type hdd — medium ubuntu1804.vdi
Attach the dvddrive to the controller?
VBoxManage storageattach ubuntu1804 — storagectl ubuntu1804_SATA — port 0 — type dvddrive — medium /home/guest1/iso/ubuntu-18.04.1-desktop-amd64.iso
To start the VM
VBoxManage startvm ubuntu1804 — type headless
List VMs
vboxmanage list vms
View the VMs that are running at the moment
vboxmanage list running vms
Output a detailed list
vboxmanage list -l runningvms
Comments
Post a Comment