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"]' <application> <name>gcc</name> <version>4.8.2</version> <release>7.fc20</release> <arch>x86_64</arch> </application>
5 responses to “New tool: virt-customize”
Pingback: Using virt-customize to make custom guests with a single backing file | Richard WM Jones
Do you happen to know when it will become available for Fedora 20 or in the fedora-virt-preview repository?
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.
Pingback: libguestfs 1.26 released | Richard WM Jones
Pingback: libguestfs RHEL 7.1 preview packages (yes, really) | Richard WM Jones