Re: Switch livemedia-creator to qemu instead of virt-install

"Brian C. Lane" <[email protected]>
Newsgroups gmane.linux.redhat.anaconda.devel
Message-ID <[email protected]>
On Sun, Dec 20, 2015 at 06:45:40PM -0600, Dennis Gilmore wrote:
> On Friday, December 18, 2015 05:26:01 PM Brian C. Lane wrote:
> > I'm considering switching lmc to use qemu directly instead of
> > virt-install+libvirtd.
> > 
> > Currently lmc can use virt-install to create the full range of supported
> > images. But this doesn't work when running inside mock, which is used by
> > Fedora releng's koji system.
> > 
> > It also supports the --no-virt mode which runs anaconda directly in the
> > same environment as lmc. The benefit is less things to setup
> > and it works inside mock. But the drawback is that it uses device-mapper
> > for installing to a partitioned disk image, and device-mapper doesn't
> > work inside mock. So when running in mock you can only create a live iso
> > or a filesystem image, not anything that needs a partitioned disk.
> > 
> > I've been doing some experimenting and it ends up that qemu works inside
> > mock.
> > 
> > Switching to qemu (with optional auto-detection of when it could use
> > qemu-kvm to speed things up) would simplify the code and allow it to
> > create all the image types no matter where it is run from. It is also
> > possible (I haven't tried this yet) that it could be used to create
> > cross-arch images as well, since qemu has a wide range of supported
> > arches.
> 
> Would not be opposed to the change, it should work on platforms where we have 
> no hardware virt capability. We (releng) are reaching out to the lvm team to 
> see what can be done to make device-mapper work in a chroot, if it is 
> possible. 
> 
> Switching to using qemu would require lmc to learn a lot of details about 
> running vms for different arches. But it would enable making images for non 
> native arches as the commands are mostly the same. 

True, I'd encapsulate all that in a way that would make it easy to
extend or modify. I think the ability to make images for other arches
would be a big plus, even if it is a bit slow.

> 
> To use kvm would we need to bind mount /dev/kvm into the chroot?

I haven't tried that yet, but at a minimum, yes. I'm not sure what else
is needed to make qemu-kvm work.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.