Skip to content

Instantly share code, notes, and snippets.

@RichGuk
Created March 28, 2012 15:52
Show Gist options
  • Save RichGuk/2227598 to your computer and use it in GitHub Desktop.
Save RichGuk/2227598 to your computer and use it in GitHub Desktop.
VirtualBox commands
VBoxManage createvm --name Win7 --register
# Get a list of oses with VBoxManage list ostypes
VBoxManage modifyvm Win7 --ostype Windows7_64 --memory 1024 --vram 30 --acpi on \
--cpus 2 --ioapic on --boot1 dvd --nic1 bridged --bridgeadapter1 eth1
VBoxManage createhd --filename /VM/Win7/Win7.vdi --size 15360
VBoxManage storagectl Win7 --name "SATA" --add sata --sataportcount 4 --hostiocache on
VBoxManage storagectl Win7 --name "IDE" --add IDE
# Get Storage controllers with VBoxManage showvminfo
VBoxManage storageattach Win7 --storagectl "SATA" --port 0 --type hdd --medium /VM/Win7/Win7.vdi
VBoxManage storageattach Win7 --storagectl "IDE" --port 0 --device 0 --type dvddrive --medium /mnt/iso/win7.iso
VBoxManage storageattach Win7 --storagectl "IDE" --port 0 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
VBoxManage modifyvm Win7 --vrdeport 3388 --vrde on
# or VBoxManage startvm Win7 --type headless
VBoxHeadless -startvm Win7 &
VBoxManage controlvm Win7 poweroff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment