[virt-tools-list] virt-bootstrap proposal

Cedric Bosdonnat cbosdonnat at suse.com
Mon Mar 20 09:45:30 UTC 2017

Hi Cole, Daniel,

On Thu, 2017-03-16 at 10:04 +0000, Daniel P. Berrange wrote:
> On Wed, Mar 15, 2017 at 07:24:13PM -0400, Cole Robinson wrote:
> > Sorry for the delayed response. Just looked now.
> > 
> > On 03/09/2017 05:09 AM, Cedric Bosdonnat wrote:
> > > Hi all,
> > > 
> > > Those following libvirt's mailing already saw a similar thread started there.
> > > I have worked on a virt-bootstrap tool to make it easy to instanciate
> > > container root file system out of docker images (and possible other sources).
> > > 
> > > You'll see a wrap up blog post explaining the workflow here:
> > > 
> > > http://bosdonnat.fr/system-container-images.html
> > > 
> > > Daniel suggested to have the virt-bootstrap code (or whatever the final name
> > > could be) along with virt-install and virt-manager.
> > 
> > Besides being written in python and being virt related this doesn't have much
> > overlap with virt-manager.git code. All current command line tools are largely
> > concerned with manipulating/generating libvirt XML, and looks like
> > virt-bootstrap won't ever do that? So for example it will have a completely
> > orthogonal test suite. That's my initial impression anyways
> Oh, I didn't look at the code, but I thought it was doing all the XML generation
> too. ie populate the chroot and configure the libvirt guest in the same manner
> that virt-install would do, and would hence benefit from sharing code.

It still makes sense for virt-manager to call such a tool to create the rootfs
for the user.

I don't see the point of generating the XML since virt-install / virt-manager are
doing it already.

> > Right now the tool is basically just a wrapper around skopeo; besides handling
> > virt-builder images, what else do you foresee the tool handling? Different
> > formats, example command line arguments, etc. Just trying to get a sense of
> > how much bigger the tool will get.
> I'd expect it to be able to do bootstrapping of yum / dpkg into chroots at
> some point.

Sure. We could also imagine the tool to do more than just a rootfs creation by
converting docker container config (or other ones) into libvirt container one.
This obviously would get implemented in calling LXC driver's native2xml

So far I'm not sure what should be the exact scope of it, but I think it would
be good to keep it simple.


More information about the virt-tools-list mailing list