Bug 834812 - Record the default network card model into the domain XML
Record the default network card model into the domain XML
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
: Upstream
Depends On:
Blocks: 887886
  Show dependency treegraph
Reported: 2012-06-23 17:01 EDT by Ronen Hod
Modified: 2014-12-14 19:53 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 887886 (view as bug list)
Last Closed: 2014-04-04 17:00:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ronen Hod 2012-06-23 17:01:36 EDT
Realtek 8139 is KVM's worst performing emulated NIC, both regarding performance and stability.
rtl8139 bugs are a pain, and we encourage customers to switch to virtio NIC, or E1000, hence it is best to also change the default emulated NIC to E1000.
I believe that in the past E1000 was not bundeled with Win-XP, and it should be verified at the time this bug is fixed.
The issue might be true for virt-manager just the same.

Thanks, Ronen.
Comment 1 Eric Blake 2012-07-11 17:08:10 EDT
In qemu/qemu_command.c, I see:

char *
qemuBuildNicDevStr(virDomainNetDefPtr net,
                   int vlan,
                   int bootindex,
                   virBitmapPtr qemuCaps)
    virBuffer buf = VIR_BUFFER_INITIALIZER;
    const char *nic;
    bool usingVirtio = false;

    if (!net->model) {
        nic = "rtl8139";
    } else if (STREQ(net->model, "virtio")) {
        nic = "virtio-net-pci";
        usingVirtio = true;
    } else {
        nic = net->model;

that is, we are hard-coding a default to match what old qemu used to default, if the user didn't specify a model.  It also looks like we are failing to record that we hard-coded the model back into the guest XML.  We may need to clone this to virt-install to ensure that installers never rely on the default, but I'm not sure what we can do from libvirt, short of recording the model that we actually default to, but where we are careful to not cause windows guests to see new hardware.
Comment 5 Peter Krempa 2013-01-29 10:22:39 EST
As libvirt didn't record the default model into the XML we can't change the default without breaking backward compatibility.

The best thing we are able to do is to record the model used into the XML even in case of the default NIC model. The default NIC model has to be changed in management apps used on top of libvirt. 

I'm changing the summary to reflect this.
Comment 7 Peter Krempa 2013-04-05 08:51:26 EDT
The default network card model is now recorded in the XML instead of just being silently used.

commit a68d6726679323823ee5be47f0144e9ccffa0757
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Tue Feb 19 17:33:52 2013 +0100

    qemu: Record the default NIC model in the domain XML
    This patch implements the devices post parse callback and uses it to fill
    the default qemu network card model into the XML if none is specified.
    Libvirt assumes that the network card model for qemu is the "rtl8139".
    Record this in the XML using the new callback to avoid user

Comment 11 RHEL Product and Program Management 2014-04-04 17:00:55 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.