{
VirtualDeviceConfigSpec cdSpec = new VirtualDeviceConfigSpec();
cdSpec.setOperation(VirtualDeviceConfigSpecOperation.add);
VirtualCdrom cdrom = new VirtualCdrom();
VirtualCdromIsoBackingInfo cdDeviceBacking = new VirtualCdromIsoBackingInfo();
DatastoreSummary ds = findDatastoreSummary(vm, dsName);
cdDeviceBacking.setDatastore(ds.getDatastore());
// cdDeviceBacking.setFileName( isoName);
cdDeviceBacking.setFileName("[" + dsName +"] "+ isoPath);
VirtualDevice vd = getIDEController(vm);
cdrom.setBacking(cdDeviceBacking);
cdrom.setControllerKey(vd.getKey());
cdrom.setUnitNumber(vd.getUnitNumber());
cdrom.setKey(-1);
cdSpec.setDevice(cdrom);
return cdSpec;
}