VirtualBox: Create vm from script
Edit a few variables prior to kicking off the script, for instance the host name in the variable VM=’RHEL_6_5_5′ to whatever your new vm host name will be.
VM='RHEL_6_5_5'
VBoxManage createhd --filename $VM.vdi --size 80000
VBoxManage createvm --name $VM --ostype "RedHat_64" --register
VBoxManage storagectl $VM --name "SATA Controller" --add sata \
--controller IntelAHCI
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 \
--device 0 --type hdd --medium $VM.vdi
VBoxManage storagectl $VM --name "IDE Controller" --add ide
VBoxManage storageattach $VM --storagectl "IDE Controller" --port 0 \
--device 0 --type dvddrive --medium /home/fgonzal/Documents/RHEL_ISO/rhel-server-6.5-x86_64-dvd.iso
VBoxManage modifyvm $VM --ioapic on
VBoxManage modifyvm $VM --boot1 dvd --boot2 disk --boot3 none --boot4 none
VBoxManage modifyvm $VM --memory 1024 --vram 128
VBoxManage startvm --type gui $VM