Customizing your oVirt Appliance
With 3.5, oVirt gained the oVirt Engine Appliance. This appliance is a qcow2 image with a preinstalled (but not configured) oVirt Engine.
If you want to automate stuff, then an OVA is not so handy, because you’ll need to unroll the ova, before you can modify your appliance (i.e. add an ssh key, or change the root password, …)
But, for convenience the Jenkins job also builds the qcow2 image, just does not export it.
Anyhow, when you’ve got the qcow2 image in hand (eitehr by unrolling the ova, or downloading the qcow2), you can modify it as follows:
# Download
$ curl -O http://jenkins.ovirt.org/job/ovirt-appliance_engine-3.5_master_merged/ws/ovirt-appliance/engine-appliance/ovirt-appliance-fedora.qcow2
# Create a qcow-qcow2
$ qemu-img create \
-f qcow2 \
-o backing_file=ovirt-appliance-fedora.qcow2 \
ovirt-instance.qcow2
# Create the script to run inside
$ cat > inside.sh <<EOF
# Remove root password
passwd --unlock root
passwd --delete root
# Disable firstboot
rm -vf /etc/sysconfig/firstboot /etc/reconfigSys
chkconfig firstboot off
EOF
# Run the script insde the appliance
$ guestfish -ia ovirt-instance.qcow2 \
upload inside.sh /tmp/inside.sh \
: sh "bash -x /tmp/inside.sh >&2" \
: rm "/tmp/inside.sh"
# Test
$ qemu-kvm -m 2048 -smp 4 -snapshot -hda ovirt-instance.qcow2
The newer guestfish tools provide more high-level functionality, IIRC also some functionality to disable the firstboot assistant.
::: {#footer} [ November 11th, 2014 10:22am ]{#timestamp} [ovirt]{.tag} [appliance]{.tag} [guestfish]{.tag} :::