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

RELATED POST

System Check before shift begins

Here is an oldie but goodie, right before my shift would begin here is a set of items to check…

Working with date command

Quick reminder on how to use date command: %a – Displays the locale’s abbreviated weekday name. %A – Displays the…

Install Apache using Puppet Master

In this vast world of orchestration & automation tools and techniques, here is a quick one on how to get…

Using nmon & nmon visualizer

A great way to visualize nmon data is using Nigel Griffiths nmon visualizer java tool #java -DfontSize=16 -jar NMONVisualizer_.jar