-Support diskless guests by using the cfgdatastore attribute if defined allowing storage to be blank
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3758 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d086433fba
commit
e38a8fbe3c
@ -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);
|
||||
|
@ -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}."]";
|
||||
|
Loading…
Reference in New Issue
Block a user