[CentOS-virt] Preferred method of provisioning VM images

Wed Jun 18 10:46:06 UTC 2014
George Dunlap <dunlapg at umich.edu>

On Mon, Jun 16, 2014 at 11:54 AM, Karanbir Singh <mail-lists at karan.org> wrote:
> On 06/10/2014 05:21 PM, Lars Kurth wrote:
>> == #4 Cloud Image from Cloud Image SIG ==
>> We could rely on pre-built cloud images from the Cloud Images SIG.
>> People could just download the cloud image once it's done and customize
>> it, rather than installing / building their own.
>>
>> Advantages: seems easy
>>
>> Disadvantages: coordination with Cloud Images SIG. May not be flexible
>> enough
>
> We ship a test/devel grade CentOS-6-x86_64-pv image ( well, its a qcow2
> image, should work for pvhvm as well, the fstab is label driven ).[1]
>
> The biggest problem in doing pre-baked images is the instance metadata.
> We need to find an easy way to get network settings into the instance
> and the root password ( or key ), and finally - in some cases, console
> redirection/setup, but i dont think the console is a deal breaker or a
> big deal. The network and access credentials however are.
>
> In a typical cloud environ this info would come from the cloud
> controller's metadata service; on a typical virtualised setup though
> this becomes an issue ( and isnt really Xen specific ).

A couple of notes on virt-builder:

* When I tried it, all of the images booted on Xen out-of-the-box
except Fedora 19 and 20; I reported this to the list and the
developers were very responsive, so now everything works.  (The
exception might be RHEL7-rc, but I think should be gone now.)
* However, libguestfs has a massive dependency tree in RHEL7 for some
reason; KB said that a "yum install libguestfs" wanted to install 178
additional RPMs.  A minimal C6 install is only 143 RPMs, so this more
than doubles it.  That makes this a bit less desirable as the primary
method of getting a system up and running quickly.

So it looks like we might want to recommend three potential paths we
could recommend people to explore:

1) For basic CentOS VMs, use a CentOS-provided cloud image, with our
custom metadata tweaking script.

2) For more versatile image set-up and manipulation (including other
operating systems), use virt-builder.

3) If you're thinking about using libvirt anyway, use virt-install and
install from installation media.

Does that sound reasonable?

#1 still has some issues we need to work out -- particularly with
sorting out the metadata.  I'll start a separate thread to talk about
that.

 -George