diff --git a/perl-xCAT/xCAT/VMCommon.pm b/perl-xCAT/xCAT/VMCommon.pm index 6bb7d8d84..14907f2d7 100644 --- a/perl-xCAT/xCAT/VMCommon.pm +++ b/perl-xCAT/xCAT/VMCommon.pm @@ -18,7 +18,7 @@ sub grab_table_data{ #grab table data relevent to VM guest nodes $callback->({data=>["Cannot open vm table"]}); return; } - $cfghash->{vm} = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','storage','memory','cpus','nics','bootorder','virtflags']); + $cfghash->{vm} = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','cfgstore','storage','memory','cpus','nics','bootorder','virtflags']); my $mactab = xCAT::Table->new("mac",-create=>1); my $nrtab= xCAT::Table->new("noderes",-create=>1); $cfghash->{mac} = $mactab->getAllNodeAttribs(['mac'],1); diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 04337724d..ab6ce054c 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -1092,7 +1092,11 @@ sub register_vm_callback { sub getcfgdatastore { my $node = shift; my $dses = shift; - my $cfgdatastore = $tablecfg{vm}->{$node}->[0]->{storage}; #TODO: need a new cfglocation field in case of stateless guest? + my $cfgdatastore = $tablecfg{vm}->{$node}->[0]->{cfgstore}; + unless ($cfgdatastore) { + $cfgdatastore = $tablecfg{vm}->{$node}->[0]->{storage}; + #TODO: if multiple drives are specified, make sure to split this out + } $cfgdatastore =~ s/,.*$//; $cfgdatastore =~ s/\/$//; $cfgdatastore = "[".$dses->{$cfgdatastore}."]";