-ESX enhancements, clonevm works

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7480 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-09-16 19:28:25 +00:00
parent 7c313b96f4
commit 13978e61d0
2 changed files with 6 additions and 2 deletions

View File

@ -26,7 +26,7 @@ sub grab_table_data{ #grab table data relevent to VM guest nodes
if ($vpdtab) {
$cfghash->{vpd} = $vpdtab->getNodesAttribs($noderange,['uuid']);
}
$cfghash->{vm} = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','cfgstore','storage','storagemodel','memory','cpus','nics','nicmodel','bootorder','virtflags','master']);
$cfghash->{vm} = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','cfgstore','storage','storagemodel','memory','cpus','nics','nicmodel','bootorder','virtflags','datacenter','master']);
my $mactab = xCAT::Table->new("mac",-create=>1);
my $nrtab= xCAT::Table->new("noderes",-create=>1);
$cfghash->{mac} = $mactab->getAllNodeAttribs(['mac'],1);

View File

@ -1720,9 +1720,13 @@ sub clone_vms_from_master {
$destination=$masterent->{storage};
$vment->{storage}=$destination;
}
unless (defined $hyphash{$hyp}->{pool}) {
$hyphash{$hyp}->{pool} = $hyphash{$hyp}->{conn}->get_view(mo_ref=>$hyphash{$hyp}->{hostview}->parent,properties=>['resourcePool'])->resourcePool;
}
my $relocatespec = VirtualMachineRelocateSpec->new(
datastore=>$hyphash{$hyp}->{datastorerefmap}->{$destination},
diskMoveType=>"createNewChildDiskBacking",
#diskMoveType=>"createNewChildDiskBacking", #fyi, requires a snapshot, which isn't compatible with templates, moveChildMostDiskBacking would potentially be fine, but either way is ha incopmatible and limited to 8, arbitrary limitations hard to work around...
pool=>$hyphash{$hyp}->{pool},
);
my $clonespec = VirtualMachineCloneSpec->new(
location=>$relocatespec,