VirtualBox command line and Oracle VM Manager 3.1.1 part 1

Rather than wait until I have the whole thing polished I thought I'd do a multipart entry on building Oracle VM Manager VM and installing the software. Now the previous version 3.0.3 had a VirtualBox template available. The current version 3.1.1 doesn't, at least not that I can find, so this is a kinda of roll your own template.

Tools used for this job:
  • Virtual Box 4.1.8 Oracle VM 
  • Manager ISO 3.1.1 
  • OEL R6U1 ISO

Oh and somewhere to run VirtualBox, in this case my Mac Mini

Setting up the VM guest I based it off the original 3.0.3 VM template so 64 bit Linux 4GB Ram and two disks one for the OS and one to install the software on with a bridged interface. Now I could say go away and do that, but where would the fun in that be. Lets script it and create from the command line:

#!/bin/sh
#
# create_ovm_vm create a VirtualBox vm suitable for installing OracleVM Manager software
#
home=~
vmname=OVM
vmstorage="${home}/VirtualBox VMs/${vmname}"
bootimage="/ISO/Oracle/OracleLinux-R6-U1-Server-x86_64-dvd.iso"
#
# Use "VBoxManage list bridgedifs" to find the names of your available interfaces
#
nic="en0: Ethernet" # Mac mini
#nic="e1000g0 - Intel PRO/1000 Gigabit Ethernet" # Solaris Box
#nic="en1: AirPort" # Macbook AirPort
#
VBoxManage createvm --name "${vmname}" --register --ostype Oracle_64
VBoxManage modifyvm "${vmname}" --memory 2048 --nic1 bridged --bridgeadapter1 "${nic}" --rtcuseutc on --boot1 none
VBoxManage createhd --filename "${vmstorage}/${vmname}-disk01.vdi" --size 15000
VBoxManage createhd --filename "${vmstorage}/${vmname}-disk02.vdi" --size 10000
VBoxManage storagectl "${vmname}" --name "IDE Controller" --add ide --controller PIIX4 --hostiocache on
VBoxManage storageattach "${vmname}" --storagectl "IDE Controller" --type dvddrive --device 0 --port 0 --medium "${bootimage}"
VBoxManage storagectl "${vmname}" --name "SATA Controller" --add sata --controller IntelAhci --sataportcount 2 --bootable on --hostiocache on
VBoxManage storageattach "${vmname}" --storagectl "SATA Controller" --type hdd --port 0 --medium "${vmstorage}/${vmname}-disk01.vdi"
VBoxManage storageattach "${vmname}" --storagectl "SATA Controller" --type hdd --port 1 --medium "${vmstorage}/${vmname}-disk02.vdi"
VBoxManage showvminfo ${vmname} --details

Make sure for your build you adjust the the location of the dvd install image, and part 2 will talk about the handsfree install, along with the name of your bridged interface,VBoxManage list bridgedifs to find that one out.  To save the typing or cut and paste error the script can be downloaded from here.

Note the command line interface for VBoxMange has changed a bit over the version so if you have a really old version this may not work. Of course if you find yourself looking at this years after I wrote it hopefully the syntax is still compatible with newer releases.

Part 2 will cover the handsfree build of the guest to a suitable config for installing Oracle VM Manager 3.1.1