sensible default NIC for x86? (virtio, not e1000)

Bug #1776696 reported by Steve Langasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

Booting an image that uses linux-kvm from the Ubuntu archive fails to find a network when using a minimal qemu commandline:

kvm -m 256 -net nic -net user,id=user.0,hostfwd=tcp::5555-:22 -drive file=boot-disk.img,if=virtio -drive file=seed.iso,if=virtio,media=cdrom

This fails because:

       -net nic[,vlan=n][,macaddr=mac][,model=type]
       [,name=name][,addr=addr][,vectors=v]
           [...] The NIC is an e1000 by default on the PC target.

e1000 is a sensible least-common-denominator driver for use on a generic hypervisor, because it's old and simple and has maximum compatibility with a range of possible guest OSes.

But it's clearly inferior to virtio in every other way, and I don't think we want to enable the e1000 in the linux-kvm build - I think we want people to configure their VMs to use virtio instead of e1000, which is the default in various frontends to qemu. I think anyone who is configuring a kvm instance for running Linux as a guest, and uses e1000 instead of virtio, has it misconfigured.

Would it therefore make sense at this point in time to change the default NIC driver for qemu from e1000 to virtio?

Revision history for this message
Ryan Harper (raharper) wrote :

I don't think so.

From a hypervisor perspective, general function I think is more important than running as fast as possible. Historically users have always enabled additional speed by swapping out emulated devices for paravirtual ones.

For users of the command line, changing the default will have impact on commands that are currently working with e1000 that may not work without it.

I suspect that the number of OSes with e1000 support is still far greater than ones that come with virtio drivers. At a minumum, Windows images don't include virtio drivers by default, so this change would catch all of those users.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I second Ryans opinion on this.
Especially older guests and the mentioned Windows guests are lost without e1000 being the default.

OTOH all arguments for virtio are true.
The breaking working commandline is prior art, as it was done around 2013 switching from RTL8139 to e1000.

So I think it "can" be done, but if so should be an industry wide decision at upstream.
Yet I do not expect to see that happen anytime soon - for that you'd want to have all windows iso/guests (maybe more others as well) to have virtio drivers, which I don't see coming.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hmm, as what do we mark this bug correctly.
Unless there is further input/discussion this might be "opinion" for now?

Changed in qemu (Ubuntu):
status: New → Opinion
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.