From d5f84c1e229efc7bf7f4754454e67ef82088f241 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 10 May 2011 14:22:03 +0000 Subject: [PATCH] Add empty optical drive on mkvm for vmware guests git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9544 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 4f5a74a82..41c84ef70 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -2645,6 +2645,14 @@ sub build_cfgspec { } my @devices; $currkey=0; + my $opticalbacking = VirtualCdromRemoteAtapiBackingInfo->new(deviceName=>""); + my $opticalconnectable = VirtualDeviceConnectInfo->new(startConnected=>0,allowGuestControl=>1,connected=>0); + my $optical =VirtualCdrom->new( controllerKey => 201, + connectable=>$opticalconnectable, + backing=>$opticalbacking, + key => $currkey++, + unitNumber => 0, ); + push @devices,VirtualDeviceConfigSpec->new(device => $optical, operation => VirtualDeviceConfigSpecOperation->new('add')); push @devices,create_storage_devs($node,$dses,$disksize); push @devices,create_nic_devs($node,$netmap,$hyp); #my $cfgdatastore = $tablecfg{vm}->{$node}->[0]->{storage}; #TODO: need a new cfglocation field in case of stateless guest?