898a7107e7
configuration: unknown driver format value 'block' virtinst-xen-drive-type.patch - bnc#868200 - Unable to complete install: "NoneType' object has no attribute '__getitem__" virtinst-detect-suse-distros.patch - For Xen always have the arch expander expanded. - For Xen and KVM default to Network install if host was installed from the network - Default to a bridge with an actual inet address if available virtinst-modify-gui-defaults.patch - We are not supporting PV ISO installs with virt-install. Drop the following patches virtinst-allow-pv-iso-install.patch virtman-allow-pv-iso-install.patc - Upstream bug fixes 5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch 5321d3d0-virtinst-drop-parsing-of-cpu-features.patch 5321f256-virtinst-use-libvirt-getCPUModelNames.patch 532255b4-unselect_all-members-before-clear-model.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=152
72 lines
2.9 KiB
Diff
72 lines
2.9 KiB
Diff
Index: virt-manager-1.0.0/virtManager/create.py
|
|
===================================================================
|
|
--- virt-manager-1.0.0.orig/virtManager/create.py
|
|
+++ virt-manager-1.0.0/virtManager/create.py
|
|
@@ -337,7 +337,18 @@ class vmmCreate(vmmGObjectUI):
|
|
self.widget("method-local").set_active(True)
|
|
self.widget("create-conn").set_active(-1)
|
|
activeconn = self.populate_conn_list(urihint)
|
|
- self.widget("arch-expander").set_expanded(False)
|
|
+ if activeconn.is_xen():
|
|
+ self.widget("arch-expander").set_expanded(True)
|
|
+ else:
|
|
+ self.widget("arch-expander").set_expanded(False)
|
|
+
|
|
+ # Default to Network install if host was installed that way
|
|
+ host_instsrc = util.getHostInstallSource()
|
|
+ if host_instsrc is not None and \
|
|
+ host_instsrc.startswith('ftp:') or host_instsrc.startswith('http:') or \
|
|
+ host_instsrc.startswith('smb:') or host_instsrc.startswith('nfs:'):
|
|
+ self.widget("method-local").set_active(False)
|
|
+ self.widget("method-tree").set_active(True)
|
|
|
|
try:
|
|
self.set_conn(activeconn, force_validate=True)
|
|
Index: virt-manager-1.0.0/virtManager/netlist.py
|
|
===================================================================
|
|
--- virt-manager-1.0.0.orig/virtManager/netlist.py
|
|
+++ virt-manager-1.0.0/virtManager/netlist.py
|
|
@@ -174,10 +174,20 @@ class vmmNetworkList(vmmGObjectUI):
|
|
if nic.target_dev and nic.target_dev not in vnet_taps:
|
|
vnet_taps.append(nic.target_dev)
|
|
|
|
+ def check_for_inet(bname):
|
|
+ if bname is not None:
|
|
+ from subprocess import Popen, PIPE
|
|
+ p = Popen(['/sbin/ip', 'addr', 'show', bname], stdout=PIPE, stderr=PIPE)
|
|
+ stdout, stderr = p.communicate()
|
|
+ if stdout and 'inet' in stdout:
|
|
+ return True
|
|
+ return False
|
|
+
|
|
bridge_dict = {}
|
|
iface_dict = {}
|
|
hasShared = False
|
|
brIdxLabel = None
|
|
+ brIdxLabel_with_inet = None
|
|
skip_ifaces = ["lo"]
|
|
|
|
for name in self.conn.list_net_device_paths():
|
|
@@ -218,6 +228,11 @@ class vmmNetworkList(vmmGObjectUI):
|
|
if hasShared and not brIdxLabel:
|
|
brIdxLabel = label
|
|
|
|
+ # Default to a bridge that has an actual inet addr
|
|
+ if brIdxLabel_with_inet is None:
|
|
+ if check_for_inet(bridge_name):
|
|
+ brIdxLabel_with_inet = label
|
|
+
|
|
row = self._build_source_row(
|
|
nettype, bridge_name, label, sensitive, True,
|
|
key=br.get_name())
|
|
@@ -227,6 +242,9 @@ class vmmNetworkList(vmmGObjectUI):
|
|
else:
|
|
iface_dict[label] = row
|
|
|
|
+ if brIdxLabel and brIdxLabel_with_inet is not None:
|
|
+ brIdxLabel = brIdxLabel_with_inet
|
|
+
|
|
return bridge_dict, iface_dict, brIdxLabel
|
|
|
|
def _populate_network_list(self):
|