From 20989e0c1144329bf48c96c8fd90b12392834cda Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 1 May 2011 12:55:00 +0000 Subject: [PATCH] Remember vm uuid after clone for dhcpv6 and the like git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9446 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 436d1c565..3a19af41f 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -2154,6 +2154,7 @@ sub clone_task_callback { foreach (keys %{$parms->{vment}}) { $tablecfg->{vm}->{$node}->[0]->{$_}=$parms->{vment}->{$_}; } + my @networks = split /,/,$tablecfg{vm}->{$node}->[0]->{nics}; my @macs = xCAT::VMCommon::getMacAddresses(\%tablecfg,$node,scalar @networks); #now with macs, change all macs in the vm to match our generated macs @@ -2161,6 +2162,8 @@ sub clone_task_callback { #have to do an expensive pull of the vm view, since it is brand new my $nodeviews = $conn->find_entity_views(view_type => 'VirtualMachine',filter=>{'config.name'=>$regex}); unless (scalar @$nodeviews == 1) { die "this should be impossible"; } + my $vpdtab=xCAT::Table->new('vpd',-create=>1); + $vpdtab->setAttribs({node=>$node},{uuid=>$nodeview->[0]->config->uuid}); my $ndev; my @devstochange; foreach $ndev ($nodeviews->[0]->config->hardware->device) {