From e51c9843800cdeb5cf8e47c4f1f4f07b37ec532e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 28 Aug 2010 13:54:23 +0000 Subject: [PATCH] -Clear mac addresses when creating a master git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7295 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 8562313ed..77f750090 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -1463,6 +1463,9 @@ sub clonevm { $tmpnod = $parsedxml->findnodes('/domain/name/text()')->[0]; $tmpnod->setData($mastername); #name the xml whatever the master name is to be + foreach ($parsedxml->findnodes("/domain/devices/interface/mac")) { #clear all mac addresses + if ($_->hasAttribute("address")) { $_->setAttribute("address"=>''); } + } my $poolobj = get_storage_pool_by_url($directory); unless ($poolobj) { xCAT::SvrUtils::sendmsg([1,"Unable to reach $directory from hypervisor"], $callback,$node);