FreeBSD 11.3+ - no network interface after upgrade


Recommended Posts

Currently running FreeBSD 11.2, which is eol at the end of the month. So instead of waiting till the absolute last minute to upgrade to 11.3, I decided to knock it out 20 minutes before I was to to leave with the wife 😐. Plenty time right? wrong.

 

After the upgrade to 11.3, the network interface is no longer detected. I rolled back successfully, and network is back.

 

Q35-3.1

SATA primary vdisk

e1000-82545em

I downloaded the 11.3 ISO and created a new VM and the installer failed to detect a network interface. I believe FreeBSD 12 is affected as well, but I haven't tested yet. 
 

Is anyone aware of a fix for this?

Link to comment

No one else uses FreeBSD? 
 

This seems to be the issue. Sounds like custom kernel might work. Prefer not to go that route, but will if that's what's necessary. 

 

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236922

 

cron sending nastygrams :(

Quote

WARNING: FreeBSD 11.2-RELEASE-p14 HAS PASSED ITS END-OF-LIFE DATE.
Any security issues discovered after Wed Oct 30 17:00:00 PDT 2019
will not have been corrected.

 

Edited by WashingtonMatt
Link to comment
  • 2 weeks later...
  • 2 weeks later...

Hi there,

 

We don't officially "support" any OS.  The way virtualization works, the underlying guest OS has to support the virtual drivers required by the hypervisor.  There is nothing that we can do to change that.  Please contact FreeBSD and ask them to add driver support for virtio or any other supported virtual network interface supported by KVM.

Link to comment
  • 1 month later...
  • 2 weeks later...
On 11/22/2019 at 10:24 PM, jonp said:

Hi there,

 

We don't officially "support" any OS.  The way virtualization works, the underlying guest OS has to support the virtual drivers required by the hypervisor.  There is nothing that we can do to change that.  Please contact FreeBSD and ask them to add driver support for virtio or any other supported virtual network interface supported by KVM.

 

Can you check how on Proxmox the "virtual drivers" i.e. VirtIO, just works? How come it doesn't work on Unraid?  Both use KVM... Do some research, figure out why it works there and fix it here. Don't just "pass the ball" onto the FreeBSD developers.

Link to comment
1 hour ago, ChewbaccaBG said:

 

Can you check how on Proxmox the "virtual drivers" i.e. VirtIO, just works? How come it doesn't work on Unraid?  Both use KVM... Do some research, figure out why it works there and fix it here. Don't just "pass the ball" onto the FreeBSD developers.

Most likely different kernel/qemu/libvirt versions.

  • Like 1
Link to comment
8 hours ago, ChewbaccaBG said:

Hopefully this will get addressed in the next update/release....

I would be curious if anyone has Proxmox and can try this in Proxmox 6.1 for us.  It was just released at the beginning of December, but features the 5.3 Linux kernel and the same QEMU version as Unraid 6.8.  If you can get FreeBSD working under Proxmox 6.1 but not Unraid, there may be something for us to investigate.

Link to comment
1 hour ago, jonp said:

I would be curious if anyone has Proxmox and can try this in Proxmox 6.1 for us.  It was just released at the beginning of December, but features the 5.3 Linux kernel and the same QEMU version as Unraid 6.8.  If you can get FreeBSD working under Proxmox 6.1 but not Unraid, there may be something for us to investigate.

I've got 2 Proxmox 6.1-5 servers each running 4 FreeBSD 12.1 VMs.

 

Kernel 5.3.13-1-pve

pve-qemu-kvm/stable,now 4.1.1-2 amd64 [installed,automatic]
qemu-server/stable,now 6.1-4 amd64 [installed,automatic]

PVE doesn't use Libvirt.

 

Here's an example config for a running FreeBSD VM:

agent: 1
balloon: 0
bios: ovmf
bootdisk: sata0
cores: 4
cpu: host
efidisk0: zfspool_1:vm-102-disk-1,size=128K
ide2: none,media=cdrom
machine: q35
memory: 8192
name: BSD1
net0: virtio=02:00:00:XX:YY:ZZ,bridge=vmbr0,firewall=1
numa: 0
ostype: other
sata0: zfspool_2:vm-102-disk-0,size=180G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=c4e688c6-5e5e-4706-a352-c64a88a10bc2
sockets: 1
vmgenid: 0eb3ca8a-fd21-4476-a10b-9334dec3916f

 

 

Let me know if there is anything else you want me to check.

Edited by ChewbaccaBG
Link to comment

Can you find the qemu command that is being executed when you start your VM?  Not sure where you'd find that in proxmox, but it should look something like this:

 

qemu-system-x86_64 \ 
-enable-kvm \ 
-m 2048 \ 
-nic user,model=virtio \ 
-drive file=alpine.qcow2,media=disk,if=virtio \ 
-cdrom alpine-standard-3.8.0-x86_64.iso \ 
-sdl

 

Link to comment

/usr/bin/kvm -id 102 -name BSD1 -chardev socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait -mon chardev=qmp,mode=control -chardev socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5 -mon chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/102.pid -daemonize -smbios type=1,uuid=c4e688c6-5e5e-4706-a352-c64a88a10bc2 -drive if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd -drive if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/zvol/zfspool_1/vm-102-disk-1 -smp 4,sockets=1,cores=4,maxcpus=4 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg -vnc unix:/var/run/qemu-server/102.vnc,password -cpu host,+kvm_pv_unhalt,+kvm_pv_eoi -m 8192 -device vmgenid,guid=0eb3ca8a-fd21-4476-a10b-9334dec3916f -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device usb-tablet,id=tablet,bus=ehci.0,port=1 -device VGA,id=vga,bus=pcie.0,addr=0x1 -chardev socket,path=/var/run/qemu-server/102.qga,server,nowait,id=qga0 -device virtio-serial,id=qga0,bus=pci.0,addr=0x8 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -iscsi initiator-name=iqn.1993-08.org.debian:01:4b7c9d269ce -drive if=none,id=drive-ide2,media=cdrom,aio=threads -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -device ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7 -drive file=/dev/zvol/zfspool_2/vm-102-disk-0,if=none,id=drive-sata0,format=raw,cache=none,aio=native,detect-zeroes=on -device ide-hd,bus=ahci0.0,drive=drive-sata0,id=sata0,rotation_rate=1,bootindex=100 -netdev type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=02:00:00:b3:a9:48,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300 -machine type=q35+pve1

Link to comment

Thanks for looking into this a bit. I wish I knew enough about this stuff to help. I will add that my motherboard has 2 NICs, and I passed through the Intel I219-V (em driver) to FreeBSD and have the same issue. Works fine on FreeBSD 11.2, not detected on 11.3+.  I've tried all different combinations of qemu and ovmf/seabios, I can't get anything to work, which doesn't jive with some other reports on different host OS's.

 

Maybe @Leoyzen knows something?

 

There is some  information in this thread that seems to get at the root of the issue regarding PCI ID's. Various bug reports don't seem to be getting any traction after many months.

Quote

https://forum.proxmox.com/threads/vm-w-pcie-passthrough-not-working-after-upgrading-to-6-0.56021/#post-274339

 

@ctmartin i did a little bit of investigation and it looks like a freebsd kernel issue

this bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236922 and the freebsd kernel source https://svnweb.freebsd.org/base/release/12.0.0/sys/net/netmap_virt.h?view=markup
point to the fact that in the freebsd kernel the vendor/pci id of the pcie root port of qemu is used for a 'ptnetmap-memdev' device (which of course is wrong)
the reporter of the bug says that with a kernel without netmap support it loads the correct kernel driver...

maybe you can open a bug report at freebsd and ask why that vendor/pci id was chosen (i cannot seem to find any reference to this device anywhere else)

 

  • Thanks 1
Link to comment

Maybe a bit off-topic wrt proxmox, but when I tried to install opnsense (freebsd based) in a VM, it also didn't find any network interfaces when using the Q35 machine type. With i440 machine type, the network interfaces were visible to the OS and working just fine.

HTH the op.

Link to comment
28 minutes ago, Ioannis said:

Maybe a bit off-topic wrt proxmox, but when I tried to install opnsense (freebsd based) in a VM, it also didn't find any network interfaces when using the Q35 machine type. With i440 machine type, the network interfaces were visible to the OS and working just fine.

HTH the op.

I'll try later today.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.