Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Re: Attaching a RDM to VM. Can you please tell what am i missing here?

$
0
0

HI All

 

I am getting same error while add rdm to vm.

Same eror : Invalid Operation for device '0'

 

 

I didn't set the controller key,unitnumber and key in virtualdevice object.

Where i find those info in mob.

 

VirtualDiskRawDiskMappingVer1BackingInfo rdm = new VirtualDiskRawDiskMappingVer1BackingInfo();
rdm.setLunUuid(scsiDisk.get(0).getUuid());
rdm.setFileName("[RDM]");
rdm.setDiskMode("independent_persistent");
rdm.setDeviceName(scsiDisk.get(0).getDeviceName());
rdm.setDatastore(ds);
rdm.setCompatibilityMode(VirtualDiskCompatibilityMode._physicalMode);
VirtualDeviceConnectInfo vdcinfo = new VirtualDeviceConnectInfo();
vdcinfo.setAllowGuestControl(false);
vdcinfo.setStartConnected(true);
vdcinfo.setConnected(true);
VirtualDevice vd = new VirtualDevice();
vd.setBacking(rdm);
vd.setConnectable(vdcinfo);
VirtualDeviceConfigSpec vdConfSpec = new VirtualDeviceConfigSpec();
vdConfSpec.setOperation(VirtualDeviceConfigSpecOperation.add);
vdConfSpec.setFileOperation(VirtualDeviceConfigSpecFileOperation.create);
vdConfSpec.setDevice(vd);
VirtualMachineConfigSpec vmConf = new VirtualMachineConfigSpec();
vmConf.setDeviceChange(new VirtualDeviceConfigSpec[]{vdConfSpec});
VExecutor.getInstance().getServiceInstance().reconfigVM_Task(vm, vmConf);

Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>