New tool: virt-customize

The final big feature of libguestfs 1.26 has arrived. Virt-customize is the customization bits from virt-builder, in a separate program. This lets you take any virtual machine and install packages, edit configuration files, run scripts, set passwords and so on.

One of the most requested features for virt-builder is the ability to customize templates while keeping a shared backing file, and virt-customize lets you do this.

Here’s how to use virt-customize:

$ virt-customize -a fedora-20.img \
    --update --install gcc
[   0.0] Examining the guest ...
[  37.0] Setting a random seed
[  37.0] Updating core packages
[ 238.0] Installing packages: gcc

virt-inspector has a way to list out the packages installed in a virtual machine disk image, and we can use it to show that gcc was installed:

$ virt-inspector -a fedora-20.img |
    xmlstarlet sel -t -c '//application[name="gcc"]'


Filed under Uncategorized

5 responses to “New tool: virt-customize

  1. Pingback: Using virt-customize to make custom guests with a single backing file | Richard WM Jones

  2. Do you happen to know when it will become available for Fedora 20 or in the fedora-virt-preview repository?

    • rich

      In Fedora 20 soon, perhaps next week? We’re just chasing an important supermin bug.

      Normally I wouldn’t do a big version bump in a Fedora release, but there are two reasons to do it now: (1) libguestfs API and command line is stable, there should be no regressions. (2) Fedora 21 schedule is incredibly long.

  3. Pingback: libguestfs 1.26 released | Richard WM Jones

  4. Pingback: libguestfs RHEL 7.1 preview packages (yes, really) | Richard WM Jones

Leave a Reply

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

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.