[elbe-devel] [PATCH] libvirt: Pin the qemu machine type definition in libvirt.xml to 'pc-i440fx-2.6'

Manuel Traut manut at linutronix.de
Fri Oct 12 16:16:25 CEST 2018


On Fri, Oct 12, 2018 at 04:12:08PM +0200, Manuel Traut wrote:
> FYI: http://forum.lab.linutronix.de/mantisbt/view.php?id=1439

oops, for people not having access, this is just a duplication of
the following github issue:

https://github.com/Linutronix/elbe/issues/183

  Manu

> On Wed, Aug 22, 2018 at 05:57:40PM +0200, Manuel Traut wrote:
> > Hi Andreas,
> > 
> > On Wed, Aug 22, 2018 at 10:49:47AM +0000, andreas at linutronix.de wrote:
> > > From: Andreas Messerschmid <andreas.messerschmid at linutronix.de>
> > > 
> > > The default 'pc' machine type in qemu evaluates to 'pc-i440fx-2.8' in Debian Stretch.
> > > When using the qemu 'pc' machine type with Debian Stretch in a virtualized VMware setup the
> > > ELBE initvm fails to boot after creation. No boot errors are observed with machine
> > > type 'pc-i440fx-2.6'.
> > > 
> > > Signed-off-by: Andreas Messerschmid <andreas.messerschmid at linutronix.de>
> > 
> > This is a regression introduced by changing elbe to use libvirt instead of
> > running the initvm in a tmux session.
> > 
> > The 'old workaround' still exists in elbepack/init/Makefile.mako:
> > 
> > ---
> > # this is a workaround for
> > # http://lists.linutronix.de/pipermail/elbe-devel/2017-July/000541.html
> > VIRT=$(shell test -x /usr/bin/systemd-detect-virt && /usr/bin/systemd-detect-virt)
> > DIST=$(shell lsb_release -cs)
> > ifeq ($(filter-out vmware stretch, $(VIRT) $(DIST)),)
> > MACHINE?=pc-i440fx-2.6
> > else
> > MACHINE?=pc
> > endif
> > ---
> > 
> > I think we should use the same heuristic for creating the libvirt.xml
> > 
> > The nice thing of the Makefile solution is, that the initvm can be moved from
> > a native PC to vmware and it will still work.
> > 
> > But i think it's ok to detect the system-type during file generation.
> > 
> >   Manu
> > 
> > > ---
> > >  elbepack/init/libvirt.xml.mako | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/elbepack/init/libvirt.xml.mako b/elbepack/init/libvirt.xml.mako
> > > index c2b3d077..289acfa2 100644
> > > --- a/elbepack/init/libvirt.xml.mako
> > > +++ b/elbepack/init/libvirt.xml.mako
> > > @@ -35,7 +35,7 @@ xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> > >    <currentMemory unit='KiB'>${memory}</currentMemory>
> > >    <vcpu placement='static'>${cpus}</vcpu>
> > >    <os>
> > > -    <type arch='x86_64' machine='pc'>hvm</type>
> > > +    <type arch='x86_64' machine='pc-i440fx-2.6'>hvm</type>
> > >    </os>
> > >    <features>
> > >      <acpi />
> > > -- 
> > > 2.11.0
> > > 
> > > 
> > > _______________________________________________
> > > elbe-devel mailing list
> > > elbe-devel at linutronix.de
> > > https://lists.linutronix.de/mailman/listinfo/elbe-devel
> > 
> > _______________________________________________
> > elbe-devel mailing list
> > elbe-devel at linutronix.de
> > https://lists.linutronix.de/mailman/listinfo/elbe-devel
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel



More information about the elbe-devel mailing list