devices: interface: Have x86 fallback model be e1000

libvirt will use rtl8139, but the qemu default changed a while
ago to e1000, and libvirt has diverged. e1000 is more modern and
considered the better default here, so use it
This commit is contained in:
Cole Robinson 2018-09-29 14:31:55 -04:00
parent 627bfabc32
commit 97ea737386
22 changed files with 33 additions and 1 deletions

View File

@ -49,6 +49,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -22,6 +22,7 @@
<controller type="usb" index="0" model="none"/>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>

View File

@ -31,6 +31,7 @@
</controller>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>
@ -67,6 +68,7 @@
</controller>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>

View File

@ -40,6 +40,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
@ -98,6 +99,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -52,6 +52,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
@ -120,6 +121,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -64,6 +64,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
@ -145,6 +146,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -55,6 +55,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
@ -127,6 +128,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -37,6 +37,7 @@
</controller>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<memory model="dimm" access="private">
@ -101,6 +102,7 @@
</controller>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<memory model="dimm" access="private">

View File

@ -31,6 +31,7 @@
</controller>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>
@ -67,6 +68,7 @@
</controller>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>

View File

@ -51,6 +51,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -45,6 +45,7 @@
<controller type="usb" index="0" model="none"/>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>
@ -94,6 +95,7 @@
<controller type="usb" index="0" model="none"/>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
</devices>

View File

@ -60,6 +60,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
@ -137,6 +138,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -32,6 +32,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<input type="tablet" bus="usb"/>

View File

@ -44,6 +44,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -50,6 +50,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -49,6 +49,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -49,6 +49,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -49,6 +49,7 @@
<interface type="bridge">
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">

View File

@ -70,6 +70,7 @@
<interface type="network">
<source network="default"/>
<mac address="22:22:33:44:55:66"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<input type="tablet" bus="usb"/>

View File

@ -69,6 +69,7 @@
<interface type="network">
<source network="default"/>
<mac address="22:22:33:44:55:66"/>
<model type="e1000"/>
</interface>
<console type="pty"/>
<input type="tablet" bus="usb"/>

View File

@ -42,6 +42,7 @@
<interface type="network">
<source network="default"/>
<mac address="1A:2A:3A:4A:5A:6A"/>
<model type="e1000"/>
<address type="spapr-vio"/>
</interface>
<watchdog model="i6300esb" action="reset"/>

View File

@ -297,13 +297,15 @@ class DeviceInterface(Device):
return "virtio"
if guest.os.is_q35():
return "e1000e"
if not guest.os.is_x86():
return None
prefs = ["e1000", "rtl8139", "ne2k_pci", "pcnet"]
supported_models = guest.osinfo.supported_netmodels()
for pref in prefs:
if pref in supported_models:
return pref
return None
return "e1000"
def set_defaults(self, guest):
if not self.type: