Quick tip: Create a CentOS 6 guest with EPEL packages

You can use virt-builder [≥ 1.26] to create guests with packages from other repositories, like this:

$ virt-builder centos-6 \
    --run-command 'rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm' \
    --update \
    --install cloud-utils,cloud-init

(cloud-utils & cloud-init are examples of packages that are only available in EPEL)

3 Comments

Filed under Uncategorized

3 responses to “Quick tip: Create a CentOS 6 guest with EPEL packages

  1. Thats pretty sweet. Could save a lot of time😀

  2. ofr

    You should maybe note that this works only starting with libguestfs 1.25.47 afaik. At least it didn’t work with 1.24.5, because virt-builder doesn’t execute the run-command prior to installing the packages.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s