[elbe-devel] [PATCH v2 4/5] initvm: Define NIC's PCI bus slot

Holger Dengler holger at hdengler.de
Thu Jun 23 21:19:24 CEST 2022


On 22.06.22 09:09, Bastian Germann wrote:
> The PCI devices generated by the qemu namespace are not taken into account
> on generating the libvirt devices. Define slot 05 for the virtual NIC.
> 
> This fixes initvm creation on Debian sid which currently errors with:
> libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor:
> kvm: -device {"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}:
> PCI: slot 2 function 0 not available for cirrus-vga,
> in use by virtio-net-pci,id=(null)
> 
> Signed-off-by: Bastian Germann <bage at linutronix.de>

Tested-by: Holger Dengler <holger at hdengler.de>

> ---
>  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 997b58fb44..285b875548 100644
> --- a/elbepack/init/libvirt.xml.mako
> +++ b/elbepack/init/libvirt.xml.mako
> @@ -95,6 +95,6 @@ xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
>      <qemu:arg value='-netdev' />
>      <qemu:arg value='user,id=user.0${forward}' />
>      <qemu:arg value='-device' />
> -    <qemu:arg value='virtio-net-pci,netdev=user.0,mac=${nicmac}' />
> +    <qemu:arg value='virtio-net-pci,netdev=user.0,mac=${nicmac},addr=05' />
>    </qemu:commandline>
>  </domain>

-- 
Gruß,
Holger Dengler
--
holger at hdengler.de


More information about the elbe-devel mailing list