From e868a37ff0f41aa75cb2678d2293fe03eed4d279 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 19 Mar 2010 17:19:43 +0000 Subject: [PATCH] -Implement scsi model storage for vmware guests git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5533 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 884d88b92..9f10b48f5 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -1435,6 +1435,10 @@ sub create_storage_devs { my $disksize = shift @sizes; unless (scalar @sizes) { @sizes = ($disksize); } #if we emptied the array, stick the last entry back on to allow it to specify all remaining disks $disksize = getUnits($disksize,'G',1024); + $disktype = 'ide'; + if ($storeloc =~ /=/) { + ($storeloc,$disktype) = split /=/,$storeloc; + } $storeloc =~ s/\/$//; (my $method,my $location) = split /:\/\//,$storeloc,2; (my $server,my $path) = split/\//,$location,2; @@ -1454,16 +1458,19 @@ sub create_storage_devs { $idecontrollerkey++; $unitnum=0; } - push @{$disktocont{$idecontrollerkey}},$currkey; + unless ($disktype eq 'ide') { + push @{$disktocont{$scsicontrollerkey}},$currkey; + } my $controllerkey; if ($disktype eq 'ide') { $controllerkey = $idecontrollerkey; } else { $controllerkey = $scsicontrollerkey; + $havescsidevs=1; } $dev =VirtualDisk->new(backing=>$backingif, - controllerKey => $idecontrollerkey, + controllerKey => $controllerkey, key => $currkey++, unitNumber => $unitnum++, capacityInKB => $disksize); @@ -1477,7 +1484,7 @@ sub create_storage_devs { foreach(0..$scsicontrollerkey) { $dev=VirtualLsiLogicController->new(key => $_, device => \@{$disktocont{$_}}, -# sharedBus => VirtualSCSISharing->new('noSharing'), + sharedBus => VirtualSCSISharing->new('noSharing'), busNumber => $_); push @devs,VirtualDeviceConfigSpec->new(device => $dev, operation => VirtualDeviceConfigSpecOperation->new('add')); @@ -1866,6 +1873,7 @@ sub validate_datastore_prereqs { push @storage,$tablecfg{vm}->{$node}->[0]->{cfgstore}; } foreach (@storage) { + s/=.*//; #remove device type information from configuration s/\/$//; #Strip trailing slash if specified, to align to VMware semantics if (/:\/\//) { ($method,$location) = split /:\/\//,$_,2;