[Libguestfs] Notes on building libguestfs in a systemd-nspawn container

Daniel P. Berrange berrange at redhat.com
Thu Jan 30 10:39:24 UTC 2014

On Thu, Jan 30, 2014 at 10:28:31AM +0000, Richard W.M. Jones wrote:
> On Thu, Jan 30, 2014 at 11:50:35AM +0530, Kashyap Chamarthy wrote:
> > 
> > Again, for comparison, `make -k check` on _host_:
> > 
> >     real    63m1.078s
> >     user    54m39.393s
> >     sys     12m8.130s
> Is KVM available in the container?  I've never tried that actually ..

I don't believe so. IIRC systemd-nspawn will populate a tmpfs on /dev
with only zero, null, full, random, unrandom, tty nodes.

If you use libvirt to setup the container then you can tell libvirt
to add in the /dev/kvm node too.

This shows how to setup the basic Fedora OS container


Then update the XML to passthrough the /dev/kvm char device as a


|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the Libguestfs mailing list