Hello everyone,
I tried to create several virtual machines with qemu and NVMM this morning, and I encountered an unexpected situation: I was unable to create a "tap4".
I installed and configured everything as usual.
Brand new complete (with X11) install of NetBSD 10.0
1) Setup NVMM :
(become root)
su -
modload nvmm
echo nvmm >> /etc/modules.conf
chown myuser:wheel /dev/nvmm
2) Install qemu :
pkgin -y in qemu open-vm-tools OVMF
mkdir /var/run/vmblock-fuse ; vmware-vmblock-fuse /var/run/vmblock-fuse ; echo vmtools=YES >> /etc/rc.conf
(become myuser)
exit
vmware-user-suid-wrapper
3) Fix sound problem :
(become root again)
su -
sysctl -w hw.audio0.blk_ms=100
4) Create a NetBSD 10.0 VM (for example) :
mkdir /home/myuser/VM
qemu-img create -f qcow2 /home/myuser/VM/netbsd10.qcow2 12G
chown -R myuser:users /home/myuser/VM
echo "create" > /etc/ifconfig.tap3 && echo 'descr "NetBSD VM" up' >> /etc/ifconfig.tap3 && echo "! ifconfig bridge0 create" >> /etc/ifconfig.tap3 && echo '! ifconfig bridge0 descr "LAN VM bridge" up' >> /etc/ifconfig.tap3 && echo "! brconfig bridge0 add tap3 add wm0" >> /etc/ifconfig.tap3
chmod 660 /dev/tap3
reboot
5) Start the VM :
(become myuser)
qemu-system-x86_64 -accel nvmm -cpu qemu64 -smp cpus=1 -m 2G -display sdl,gl=on -usb -device usb-mouse,bus=usb-bus.0 -cdrom /home/myuser/ISO/boot.iso -drive file=/home/myuser/VM/netbsd10.qcow2,if=none,id=hd0 -device virtio-blk-pci,drive=hd0 -object rng-random,filename=/dev/urandom,id=viornd0 -device virtio-rng-pci,rng=viornd0 -audiodev oss,id=oss,out.dev=/dev/audio,in.dev=/dev/audio -device ac97,audiodev=oss -netdev tap,id=tap3,ifname=tap3,script=no -device virtio-net-pci,netdev=tap3 -bios /usr/pkg/share/ovmf/OVMFX64.fd -boot menu=on
Apart from a few usual issues with NVMM, it works quite well. VM access internet.. Well, everything is fine !
But this time, I decided to create a ... fourth VM!
And bam!!
no /dev/tap4... I tried manually (instead of creating an /etc/ifconfig.tap4), but no /dev/tap4 never appears...
What should I do ???
I see no limitations of tap interfaces number anywhere on the sysctl results.
I understood that it should now be necessary to integrate vether... but again, there is no documentation on how to do it with qemu, and no one seems to understand how to do, so I thought I would stick to tap for now.
Any idea ?
A big thank you in advance !