2014-03-24 16:05:15 +01:00
|
|
|
Index: virt-manager-1.0.1/virtManager/create.py
|
2014-03-19 16:18:34 +01:00
|
|
|
===================================================================
|
2014-03-24 16:05:15 +01:00
|
|
|
--- virt-manager-1.0.1.orig/virtManager/create.py
|
|
|
|
+++ virt-manager-1.0.1/virtManager/create.py
|
|
|
|
@@ -337,7 +337,18 @@ class vmmCreate(vmmGObjectUI):
|
2014-03-19 16:18:34 +01:00
|
|
|
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)
|
2014-03-24 16:05:15 +01:00
|
|
|
+ if activeconn and activeconn.is_xen():
|
2014-03-19 16:18:34 +01:00
|
|
|
+ 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 \
|
2014-03-19 23:29:53 +01:00
|
|
|
+ (host_instsrc.startswith('ftp:') or host_instsrc.startswith('http:') or \
|
|
|
|
+ host_instsrc.startswith('smb:') or host_instsrc.startswith('nfs:')):
|
2014-03-19 16:18:34 +01:00
|
|
|
+ self.widget("method-local").set_active(False)
|
|
|
|
+ self.widget("method-tree").set_active(True)
|
|
|
|
|
|
|
|
try:
|
|
|
|
self.set_conn(activeconn, force_validate=True)
|
2014-03-24 16:05:15 +01:00
|
|
|
Index: virt-manager-1.0.1/virtManager/netlist.py
|
2014-03-19 16:18:34 +01:00
|
|
|
===================================================================
|
2014-03-24 16:05:15 +01:00
|
|
|
--- virt-manager-1.0.1.orig/virtManager/netlist.py
|
|
|
|
+++ virt-manager-1.0.1/virtManager/netlist.py
|
2014-03-19 16:18:34 +01:00
|
|
|
@@ -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):
|