The Oracle VM Server installation for x86 hardware can be automated using a Kickstart configuration file. Kickstart is well documented for Oracle Linux. You can find out more information at:
http://docs.oracle.com/cd/E37670_01/E41137/html/ol_kickstart.html
If you perform a manual installation of Oracle VM Server installation for
x86 hardware, a Kickstart configuration template using the options
that you selected during your install is generated automatically
by the Anaconda install wizard and is available in
/root/anaconda-ks.cfg
. It is recommended that
you perform at least one installation manually to obtain this file
with the correct parameters already set for future installations.
A typical Kickstart configuration file for Oracle VM Server, as generated by Anaconda for an installation using an NFS server as the path to the installation ISO, may look similar to the following:
# Kickstart file automatically generated by anaconda. install eula Accepted nfs --server=n.n.n.n
--dir=/srv/install/ovs lang en_US.UTF-8 keyboard us network --onboot yes --device eth0 --mtu=1500 --bootproto dhcp --noipv6 ovsagent --iscrypted $6$pkg8GsEJFbLPdRf6$JvBX.yJo6F9oyz1qIldIPy0bHvPpOHElZKvg3FR9DIWW07nMy/k2T5r3r ovsmgmntif eth0 rootpw --iscrypted $6$TO0IU.UJCLq2JZio$iJj1RPwV5wX7pD3puIUrZh1j7R2aF.cGFs6FEs2K9Py2yO3eEntR2vRKo4 # Reboot after installation reboot firewall --disabled authconfig --enableshadow --enablemd5 selinux --disabled timezone --utc America/Los_Angeles bootloader --location=mbr --driveorder=sda,sdb --append="rhgb quiet" # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work clearpart --all --drives=sda part / --fstype=ext4 --grow --maxsize=51200 --size=1024 part /boot --fstype=ext4 --size=500 part swap --grow --maxsize=16128 --size=16128 # The following line is used to create an additional partition using the remaining disk space # This partition can be used to host a local repository or provision a VM with a virtual disk part None --fstype=ext4 --grow --size=100 repo --name="Oracle VM Server" --baseurl=nfs:n.n.n.n
:/srv/install/ovs --cost=100 %packages @base @core @ovs-virtualization %end
The example above has marked the EULA (End User License Agreement) as Accepted. If you do this, make sure that you have read the EULA and that you agree to its terms.
If all of your servers are equivalent and you can afford to clear
all partitions on the disk where you are installing Oracle VM Server, you
can uncomment the partitioning information to automate this part
of the installation across all of your servers. You must include a
clearpart
declaration and include the
--drives
parameter to make sure a swap partition
can be created.
Since Oracle VM Server does not have very large disk space requirements, it is typically installed into a partition of limited size. If you have a large local physical disk, you may want to use the remaining disk space to host a local repository or to attach as a virtual disk to a virtual machine. For this purpose, the kickstart configuration may include the line:
part None --fstype=ext4 --grow --size=100
Remember that when installing to a server with a large number of Fibre Channel LUNs connected, the installer may take a long time to examine all storage devices. To avoid this, it is good to add a line into your Kickstart configuration to tell the Anaconda installer to ignore all other disks other than the target installation disk. For instance, you might add a line similar to the following:
ignoredisk --only-use=/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0
If you use Oracle Linux 6, which is the default base operating system for
Oracle VM Server, or Fibre Channel LUNs, disk device naming can change
across reboots. This means that a local disk may not be at
/dev/sda
as you might have expected for each
subsequent reboot. In this case, it may be better to use the UUID
for a disk as found at /dev/disk/by-id
, or
better still, use the /dev/disk/by-path
.
Identifying disks by-path is more reliable when working with a
number of identical machines, since it is likely that the by-id
name is different for every disk. Using the by-path identifier
allows you to use the same Kickstart configuration file for more
than one machine. You can find out how disks are identified by
running the following command as root:
# ls -lR /dev/disk
For example:
clearpart --all --drives=/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 ignoredisk --only-use=/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 part /boot --fstype=ext4 --size=100 part / --fstype ext4 --size=3072 --ondisk=/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 part swap --size=1024 --ondisk=/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0
Beware of boot loader lines within a Kickstart configuration
file that contain the append option
console=hvc0
. This option can cause the console
for the server to echo your password when you log in. If you see
this option in your Kickstart configuration file, remove it.
If your server has multiple network interfaces, you should at least specify the network interface to be used for the management interface first. If you have more than one network interface specified in a kickstart file, the first interface is used as the management interface. It is preferable to not include lines for any of the other network interfaces available on your server within the kickstart configuration file, as this can confuse the installer. You can configure additional network interfaces on a server within Oracle VM Manager after installation and discovery.
If you have a server with a particularly large amount of memory, you may want to edit the boot loader line to cater to these requirements. Equally, if you need to enable Huge Page support to facilitate Huge Pages for paravirtual machines, you need to edit the same line. For example, your boot loader line may be adjusted to read as follows:
bootloader --location=mbr --driveorder=sda,sdb --append="rhgb quiet allowsuperpage" --dom0_mem=1440M
See Section 5.4.5, “Post-upgrade Steps” for more information on the options that you may want to append here.
There are numerous options available for use in a Kickstart configuration file. The file generated by Anaconda after it has successfully completed the installation should be sufficient for use to automate the installation process on other systems, unless you need to provide different partitioning information for each system. In this case, you may need to create and maintain a separate Kickstart file for each system.
It is possible to create a %post
division in your
Kickstart configuration file for the purpose of automating some
actions after the install has completed, but before the server has
rebooted. This can prove useful if you need to perform additional
tasks, such as copying SSH keys from a location accessible to the
server, or for triggering a change to a PXELinux configuration
parameter to prevent an install loop as discussed in
Section 4.1, “Installation From PXE Boot”.