[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guest OS cannot setup properly its net interface backed by MacVTap

From: Salvatore Mazzarino
Subject: Guest OS cannot setup properly its net interface backed by MacVTap
Date: Mon, 18 Jan 2021 02:39:04 -0800


I’m trying to setup a guest VM with QEMU v5.1.0

I execute it in the following way:

/usr/bin/qemu-system-x86_64 -name flatcar_production_qemu -machine q35,accel=kvm -cpu host,pmu=off -qmp unix:/tmp/qmp-socket,server,nowait -m 2048M -netdev tap,id=macvtap4,vhost=on,vhostfds=3,fds=4 -device driver=virtio-net-pci,netdev=macvtap4,mac=e2:ef:88:bc:ae:62,disable-modern=false,mq=on,vectors=4,romfile= -device virtio-blk-pci,disable-modern=false,drive=rootfs,scsi=off,config-wce=off,romfile=,serial=rootfs -drive id=rootfs,file=rootfs.img,aio=threads,format=raw,if=none -device virtio-serial-pci,disable-modern=false,id=serial0,romfile= -device virtconsole,chardev=charconsole0,id=console0 -chardev socket,id=charconsole0,path=console.sock,server,nowait -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0,romfile= -vga none -no-user-config -nodefaults -nographic -daemonize -object memory-backend-ram,id=dimm1,size=2048M -numa node,memdev=dimm1 -realtime mlock=off -kernel flatcar_production_pxe.vmlinuz -initrd flatcar_production_pxe_image.cpio.gz -append "root=/dev/disk/by-id/virtio-rootfs ip= tsc=reliable no_timer_check= rcupdate.rcu_expedited=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 noreplace-smp= reboot=k console=hvc0 console=hvc1 cryptomgr.notests= net.ifnames=0 pci=lastbus=0 -smp 2

The network interface which is connected to is a MacVTap in bridge mode. The tap device under /dev exists and it is named tap5 and I pass there its file descriptor. I also use the vhostfds to improve performance.

What I get is that if I try to ping the interface with IP, the ICMP packets reach the tap5 device. Nothing however is written into the tap device by the OS. So here the impossibility for the OS to communicate.

Any idea what could be wrong?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]