#!/usr/bin/bash # Reference: http://stdioe.blogspot.com/2012/01/creating-virtual-machine-with.html VM_NAME="Debian Squeeze 2" DEBIAN_CD_IMAGE="debian-6.0.3-amd64-i386-netinst.iso" # Create VM VBoxManage createvm --name "$VM_NAME" --ostype Debian --register # RAM VBoxManage modifyvm "$VM_NAME" --memory 384 # Hard Disk VBoxManage createhd --filename "$VM_NAME.vdi" --size 10000 --format VBoxManage storagectl "$VM_NAME" --name "SATA Controller" --add sata --controller IntelAhci VBoxManage storageattach "$VM_NAME" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$VM_NAME.vdi" VBoxManage storagectl "$VM_NAME" --name "IDE Controller" --add ide --controller PIIX4 VBoxManage storageattach "$VM_NAME" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium "$DEBIAN_CD_IMAGE"