-Assure that the vm.master field is set after clonevm tethers a vm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7327 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-08-31 20:02:12 +00:00
parent 45dc77072e
commit 9eed4ac10f

View File

@ -1580,6 +1580,9 @@ sub promote_vm_to_master {
$mastertabentry->{storage}=$directory;
$mastertabentry->{vintage}=localtime;
$mastertabentry->{originator}=$requester;
unless ($detach) {
$udatetable->{vm}->{$node}->{master}=$mastername;
}
$updatetable->{vmmaster}->{$mastername}=$mastertabentry;
$updatetable->{kvm_masterdata}->{$mastername}->{xml} = $parsedxml->toString();
}
@ -1666,6 +1669,7 @@ sub clone_vm_from_master {
} else {
my $newbasexml="<volume><name>$filename</name><target><format type='$format'/></target><capacity>0</capacity><backingStore><path>$srcfilename</path><format type='$format'/></backingStore></volume>";
$newvol = $destinationpool->create_volume($newbasexml);
$updatetable->{vm}->{$node}->{master}=$mastername;
}
my $newfilename=$newvol->get_path();
$disk->findnodes("./source")->[0]->setAttribute("file"=>$newfilename);