File virtinst-set-default-nic.patch of Package virt-manager.20216

References: bsc#1172356, bsc#1177620
Libvirt doesn't accept "Hypervisor default" as a model name

Index: virt-manager-3.1.0/virtinst/devices/interface.py
===================================================================
--- virt-manager-3.1.0.orig/virtinst/devices/interface.py
+++ virt-manager-3.1.0/virtinst/devices/interface.py
@@ -284,6 +284,9 @@ class DeviceInterface(Device):
             return "e1000e"
         if not guest.os.is_x86():
             return None
+        if guest.conn.is_xen() and guest.os.is_hvm():
+            # Let libvirt decide the default
+            return None
 
         prefs = ["e1000", "rtl8139", "ne2k_pci", "pcnet"]
         supported_models = guest.osinfo.supported_netmodels()
openSUSE Build Service is sponsored by