[elbe-devel] [PATCH v3] Enable initvm creation with newer qemu versions

bage at linutronix.de bage at linutronix.de
Mon Apr 8 10:18:11 CEST 2019


From: Bastian Germann <bage at linutronix.de>

QEMU >= 2.9 does not have the vlan option for the ancient -net flag.
Use the -netdev flag with a virtio device like the other qemu invocations.
Leave out explicit hubport config.

This enables `elbe initvm create` on Debian buster which has QEMU 3.1.

Signed-off-by: Bastian Germann <bage at linutronix.de>
---
 elbepack/init/Makefile.mako | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/elbepack/init/Makefile.mako b/elbepack/init/Makefile.mako
index 0b4960e8..aeec6b51 100644
--- a/elbepack/init/Makefile.mako
+++ b/elbepack/init/Makefile.mako
@@ -27,7 +27,6 @@ else
 MACHINE?=pc
 endif
 
-NICMODEL?=virtio
 CONSOLE?=ttyS0,115200n1
 LOOP_OFFSET?=1048576
 HD_TYPE?=virtio
@@ -104,8 +103,8 @@ all: .stamps/stamp-install-initial-image
 		-append 'root=/dev/$(HD_NAME) debconf_priority=critical console=$(CONSOLE) DEBIAN_FRONTEND=text' \
 		-no-reboot \
 		-nographic \
-		-net nic,vlan=1,model=$(NICMODEL),macaddr="${nicmac}" \
-		-net user,vlan=1 \
+		-device virtio-net-pci,netdev=user.0,mac="${nicmac}" \
+		-netdev user,id=user.0 \
 		-m $(MEMSIZE) \
 		-smp $(SMP) \
 		-usb \
-- 
2.20.1




More information about the elbe-devel mailing list