qemu fails when starting with more than one virtual NIC

Bug #1600431 reported by Jonas Eriksson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I just upgraded my VM-host from 14.04 (trusty) to 16.04 (xenial) with qemu version 1:2.5+dfsg-5ubuntu10.2, and noticed that VMs with more than one NIC would not start. I'm controlling my VMs using libvirt, and noticed this message in the log:

libvirtd[6335]: internal error: process exited while connecting to monitor: 2016-07-08T11:07:10.097780Z qemu-system-x86_64: -device virtio-net-pci,netdev=hostnet1,id=net1,mac=<redacted>,bus=pci.0,addr=0x4: duplicate fw_cfg file name: genroms/pxe-virtio.rom

Experimenting using the qemu command line logged by libvirt, I determined that removing all NICs but one would let me start VMs. I created this minimal example to replicate the behaviour:
    $ sudo /usr/bin/kvm -nographic -machine pc-0.11,accel=kvm,usb=off -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,bus=pci.0,addr=0x3 -netdev tap,id=hostnet1,vhost=on -device virtio-net-pci,netdev=hostnet1,id=net1,bus=pci.0,addr=0x4
    qemu-system-x86_64: -device virtio-net-pci,netdev=hostnet1,id=net1,bus=pci.0,addr=0x4: duplicate fw_cfg file name: genroms/pxe-virtio.rom

Removing one NIC makes this setup work just fine:
    $ sudo /usr/bin/kvm -nographic -machine pc-0.11,accel=kvm,usb=off -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,bus=pci.0,addr=0x3
[abort using 'ctrl-a', followed by 'x']

To verify that this was not due to the upgrade process, I have also booted a Live CD of the Desktop version of Xenial, and reproduced the error there successfully.

To try and mitigate the issue, I did download the source for the qemu package and did a dirty workaround by replacing the exit(1) below the error message with return, but the real issue seems to be that qemu tries to re-add the fw_cfgs for each NIC defined on the command line.

Thanks,
/Jonas

Revision history for this message
Jonas Eriksson (7-ubuncuone-1) wrote :

Update:
The issue seems tied to the pc-0.11 machine type. Using the latest available pc-* (pc-0.15) does not show the same issue. Perhaps this would warrent a wontfix, but at least the issue is now indexable by google :)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for the information. In the past, we've provided upgrade scripts when problems developed with older machine types, but 0.11 is old enough that it probably isn't worth it.

Changed in qemu-kvm (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.