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

Manuel Traut manut at linutronix.de
Wed Aug 22 17:57:40 CEST 2018


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



More information about the elbe-devel mailing list