administering vbox on commandline
configure virtualbox
- VBoxManage list vms
- VBoxManage list hdds
- VBoxManage list dvds
- VBoxManage showhdinfo UUID
- VBoxManage list systemproperties
- VBoxManage showvminfo MACHINENAME|UID
- VBoxManage modifyvm NAME --nic2 none
- VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.2-69518.vbox-extpack
start a vbox in headless-mode
This means that you start a vbox without any GUI attached and the only way to access this vbox is via RDP
VBoxHeadless -s UID
reset/poweroff a running machine
VBoxManage controlvm UID reset
VBoxManage controlvm UID poweroff
you can also use pause, resume and other inputs like acpipowerbutton. Read the VBoxManage-manpage for details
attach usb
VBoxManage controlvm UID dvdattach|usbattach|usbdetach
to get a list of all devices attached to the host including the needed UUID for the usbattach-command you just run:
VBoxManage list usbhost and then something like: VBoxManage controlvm win7RC usbattach 36d31adb-eb4b-4ade-bf3c-07c862d3a182
attach dvd
VBoxManage storageattach vbox-zimbra --storagectl sata1 --port 1 --device 0 --type dvddrive --medium /data/vbox/ubuntu-8.04.4-server-amd64.iso
changing defaults
VBoxManage setproperty hdfolder PATH VBoxManage setproperty machinefolder PATH
creating a headless machine
VBoxManage createvm --register --name "vbox-zimbra" VBoxManage modifyvm vbox-zimbra --ostype Ubuntu_64 --memory 4096 --vram 4 --acpi off --ioapic on --cpus 2 --hwvirtex on --hwvirtexexcl on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --nic1 bridged --bridgeadapter1 eth0 VBoxManage modifyvm vbox-zimbra --vrdp on --vrdpauthtype external --vrdpmulticon on VBoxManage createhd --filename vbox-zimbra --size 140000 --remember --type writethrough --variant Fixed VBoxManage storagectl vbox-zimbra --name sata1 --add sata --hostiocache off VBoxManage storagectl vbox-zimbra --name ide1 --add ide --hostiocache off VBoxManage storageattach "vbox-zimbra" --storagectl sata1 --port 0 --device 0 --medium vbox-zimbra --type hdd VBoxManage storageattach "vbox-zimbra" --storagectl ide1 --port 0 --device 0 --medium /data/vbox/ubuntu-10.04-server-amd64.iso --type dvddrive VBoxManage setextradata vbox-zimbra "VBoxAuthSimple/users/peter" 6767aaa......................



