mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user