[CentOS-virt] Preferred method of provisioning VM images

Thu Jun 12 12:58:26 UTC 2014
Dario Faggioli <raistlin at linux.it>

On mar, 2014-06-10 at 17:21 +0100, Lars Kurth wrote:
> Hi all,

> == #1 virt-install ==
> Advantages: similar to KVM
> Disadvantages: may cause weird issues / confusion with people switching 
> back to xl. The core issue is that with the current version of xen and 
> libvirt, this only works with xm (when xl is used, this can create some 
> undefined behavior). However as we have seen in some recent threads on 
> this list, people tend to mix which can cause problems.
When you're saying "this only works with xm (when xl is used, this can
create some undefined behavior", that is because of the particular
version of libvirt (and Xen) is available in CentOS?

I'm asking because, with current enough versions of both, situation
should not be that bad, at least not as far as virt-install and VM
provisioning are concerned... :-O

Personally, I'm not sure whether this is the best solution, but I see it
like something that should not be left in a 'non-working' state.

Parhaps, a disadvantage I see in going for it as the default and
recommended mechanism is that you really need:
 - a recent version of libvit to start with
 - a way to update libvirt quite often, to take advantage of new 
   features being added

> == #2 xen-tools ==
> Advantages: Very flexible. Many other distros use xen-tools, so we have 
> lots of beginners docs that just need to be tweaked
> Disadvantages: needs porting/packaging for CentOS. Does not work for 
> kvm. Says "xen". (Maybe that's an advantage.)
> We know that xen-tools works with Fedora (see 
> http://blog.xen.org/index.php/2013/01/24/using-xen-tools-on-fedora/), so 
> the porting effort may be small
Yep, and I went beyond that, and produced some spec files. This should
be the latest one, although it's for version 4.3.1 of xen-tools, so no,
not the latest possible or the tip of the repo:

My main problem with xen-tools is that it is kind of debian (and
derivatives) biased, when it comes to building the guest file system.
I.e., last time I tried, provisioning a Fedora or CentOS guest was
possible, but not as straightforward as creating a debian one. That is
not xen-tool's fault, is the fact there were no good alternatives to

However, it looks like rinse (one of said alternatives to debootstrap)
is getting some steam again:

so that may actually be worth a try.

Also, I recently saw this in xen-tools-discuss mailing list:

"anouncement : Xen-tools update for centos 6.5"

Even if only for the title, it looks like something to investigate! :-P

> Unknowns: What would be needed to make it work for CentOS
Talking a bit with Axel (xen-tools' maintainer) at the time, the main
issue in packaging subsequent versions of xen-tools for Fedora was going
to be some dependencies from a bunch of perl module he wrote, and
packaged himself for Debian, as separate packages. Nothing terrible, but
that would mean making the RPMs for those modules as well.

TBH, it is a while back, and I'm not sure what happened, whether went
that route. This link, from the xen-tools-discuss email mentioned above:

seems to have (more) updated spec files. I haven't tried them, though.

> == #3 virt-builder (http://libguestfs.org/virt-builder.1.html) ==
> Advantages: supports KVM, Xen and other VM inages. Seems easy to use.
> - if so, it would avoid xm / xl confusion.
> Unknowns: Not sure at which level virt-builder integrates with Xen and 
> other hypervisors. It seems to operate at disk image format (similar to 
> xen-tools) . I don't know whether virt-builder is restricted to some 
> hypervisors in RHEL7.
> Disadvantages: may need porting/packaging for CentOS. It appears as if 
> it will be in RHEL7, so it may just appear with CentOS 7. If not, some 
> porting work may need to be done.
Not commenting on this as I don't know it.

All that being said, and FWIW, I think I'd prefer #1, provided a recent
enough version of Xen and Libvirt could be used.


<<This happens because I choose it to happen!>> (Raistlin Majere)
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20140612/a2fa077f/attachment-0002.sig>