Oracle Linux 6.3 comes with kernel 2.6.39-200.24.1 (UEK2)
# uname -a Linux ol6u3 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Oracle Linux updates are freely available on our public-yum site and the default install of Oracle Linux 6.3 already points to this location for updates.
# yum update # reboot # uname -a Linux ol6u3 2.6.39-300.17.3.el6uek.x86_64 #1 SMP Wed Dec 19 06:28:03 PST 2012 x86_64 x86_64 x86_64 GNU/Linux
There is an extra kernel module required for the Oracle VM API to work, the ovmapi kernel module provides the ability to communicate messages back and forth between the host and the VM and as such between Oracle VM Manager, through the VM API to the VM and back. We included this kernel module in the 2.6.39-300 kernel to make it easy. There is no need to install extra kernel modules or keep kernel modules up to date when or if we have a new update. The source code for this kernel module is of course part of the UEK2 source tree.
After reboot, download the latest public-yum repo file from public-yum which contains more repositories and enable the add-on channel which contains the Oracle VM API packages:
inside the VM :
# cd /etc/yum.repos.d # rm public-yum-ol6.repo <- (replace the original version with this newer version) # wget http://public-yum.oracle.com/public-yum-ol6.repo
Find the ol6_addons section and change enabled=0 to enabled=1.
[ol6_addons] name=Oracle Linux $releasever Add ons ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1
Save the file.
# yum install ovmd xenstoreprovider python-simplejson ovm-template-config
This installs the basic necessary packages on Oracle Linux 6 to support the Oracle VM API. xenstore provider is the library which communicates with the ovmapi kernel infrastructure. ovmd is a daemon that handles configuration and re-configuration events and provides a mechanism to send/receive messages between the VM and the Oracle VM Manager.
In order to be able to create a VM template that includes basic OS configuration system scripts, you can decide to install any or all of the following :
ovm-template-config-authentication : Oracle VM template authentication configuration script. ovm-template-config-datetime : Oracle VM template datetime configuration script. ovm-template-config-firewall : Oracle VM template firewall configuration script. ovm-template-config-network : Oracle VM template network configuration script. ovm-template-config-selinux : Oracle VM template selinux configuration script. ovm-template-config-ssh : Oracle VM template ssh configuration script. ovm-template-config-system : Oracle VM template system configuration script. ovm-template-config-user : Oracle VM template user configuration script.
Simply type # yum install ovm-template-config-... to install whichever you want.
To enable ovmd (recommended) do :
# chkconfig ovmd on # /etc/init.d/ovmd start
If you want to shutdown this VM and enable the first boot configuration as a template, execute :
# ovmd -s cleanup # service ovmd enable-initial-config # shutdown -h now
After cloning this VM or starting it, it will act as a first time boot VM and it will require configuration input through the VM API or on the virtual VM console.
My next blog will go into detail on how to send messages through the Oracle VM API for remote configuration and also how to extend the scripts.