-Have Xen plugin populate virtual disks from vm table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2047 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-08-20 16:48:23 +00:00
parent 6636fb1fca
commit d7d36bd23f

View File

@ -88,12 +88,22 @@ sub build_oshash {
}
sub build_diskstruct {
my @returns;
my @returns=();
my $diskhash;
$diskhash->{type}='file';
$diskhash->{source}->{file}="/vms/$node";
$diskhash->{target}->{dev}='hda';
push @returns,$diskhash;
my $currdev;
my @suffixes=('a'..'z');
my $suffidx=0;
if (defined $vmhash->{$node}->[0]->{storage}) {
my $disklocs=$vmhash->{$node}->[0]->{storage};
my @locations=split /\|/,$disklocs;
foreach (@locations) {
$currdev='sd'.$suffixes[$suffidx++];
$diskhash->{type}='file';
$diskhash->{source}->{file}=$_; #"/vms/$node";
$diskhash->{target}->{dev}=$currdev;
push @returns,$diskhash;
}
}
return \@returns;
}
sub getNodeUUID {