diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py index aa4a46cb..75054c1d 100644 --- a/virtManager/createinterface.py +++ b/virtManager/createinterface.py @@ -789,9 +789,14 @@ class vmmCreateInterface(vmmGObjectUI): ipv6 = None if not is_manual: - if copy_row[1] and copy_row[2]: - copy_name = copy_row[1].get_name() - proto_xml = copy_row[1].get_protocol_xml() + copy_vmmiface = copy_row[1] + copy_cancopy = copy_row[2] + if copy_vmmiface and copy_cancopy: + copy_name = copy_vmmiface.get_name() + # We always want the inactive protocol XML, which + # will list the on disk config, not the run time config, + # which doesn't list DHCP + proto_xml = copy_vmmiface.get_protocol_xml(inactive=True) else: # Build IPv4 Info diff --git a/virtManager/interface.py b/virtManager/interface.py index 685c8c06..56920e8a 100644 --- a/virtManager/interface.py +++ b/virtManager/interface.py @@ -157,5 +157,5 @@ class vmmInterface(vmmLibvirtObject): return [] return [proto.dhcp, proto.autoconf, ips] - def get_protocol_xml(self): - return self.get_xmlobj().protocols[:] + def get_protocol_xml(self, inactive=False): + return self.get_xmlobj(inactive=inactive).protocols[:]