-Add physical device support for xen (from Mike Lovell)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2433 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-10-31 13:30:00 +00:00
parent 564fd6d61f
commit 2b84fbbe3a

View File

@ -105,9 +105,17 @@ sub build_diskstruct {
my $disklocs=$vmhash->{$node}->[0]->{storage};
my @locations=split /\|/,$disklocs;
foreach (@locations) {
my $disk = $_;
my $disktype = substr($disk, 0, 3):
$currdev='hd'.$suffixes[$suffidx++];
$diskhash->{type}='file';
$diskhash->{source}->{file}=$_; #"/vms/$node";
if ($disktype eq "phy") {
my $diskdev = substr($disk, 4);
$diskhash->{type}='dev';
$diskhash->{source}->{dev}=$diskdev;
} else {
$diskhash->{type}='file';
$diskhash->{source}->{file}=$_;
}
$diskhash->{target}->{dev}=$currdev;
push @returns,$diskhash;
}