Unattended F19 guest creation with Oz

Oz has been in development for a couple of years, which lets you install various guest operating systems with minimal user-input.

A simple wrapper script is here

$ yum install oz -y
$  ./oz-jeos.bash guest-name distro
      'distro': f19, f18
       Examples: oz-jeos.bash f19-jeos f19  # create f19
                 oz-jeos.bash f18-jeos f18  # create f18

If you prefer to invoke manually…

Create a TDL (Template Description Language) file:

$ cat << EOF > f19.tdl
    <install type='url'>
  <description>Fedora 19</description>

NOTE: From the above TDL file, you can elide the disk attribute if you don’t need 25G of disk. The default disk size is 10G.

Invoke Oz:

$ oz-install -d 4 f19.tdl 2>&1 \
  | tee /var/tmp/f19-oz-log.txt


Filed under Uncategorized

4 responses to “Unattended F19 guest creation with Oz

  1. rabbit

    Thanks! Very useful thing!

  2. Pingback: OpenStack Community Weekly Newsletter (June 28 – July 5) » The OpenStack Blog

  3. Haitao

    One question: do I need to run oz on a physical hardware or a VM is ok? I tried above on a Fedora VM, it failed in the end with

    raise oz.OzException.OzException(“No disk activity in %d seconds, failing. %s” % (inactivity_timeout, screenshot_text))
    oz.OzException.OzException: No disk activity in 300 seconds, failing. Check screenshot at /var/lib/oz/screenshots/f19-1386020254.69.ppm for more detail

    Any idea?

    • In a VM should also be okay (if you have nested VMX enabled on your host & the guest has the VMX extensions exposed), You can see what’s causing the “No disk activity. . .” by running virt-viewer command on the Oz guest.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s