Hi,
I'm running powercli 5.0.1 build 581491 and i'm trying to write a powercli script to:
1) create an RDM
2) assign that RDM to VM1
3) assign the same RDM to VM2
I'm able to create the RDM and assign it to VM1, but I'm unable to use "New-HardDisk" to assign it to VM2. Using the following command i'm able to create the RDM and assign it to VM1.
New-HardDisk -VM VM1 -DiskType RawVirtual -DeviceName /vmfs/devices/disks/naa.60000970000192603729533030353531
While trying to assign it to VM2, i'm doing the following:
New-HardDisk -VM VM2 -DiskPath "[san-datastore:1] vm1/vm1_1.vmdk"
And i get the following error:
New-HardDisk : 6/6/2012 2:13:19 PM New-HardDisk Incompatible device backing specified for device '0'.
What i realized is that if i create a regular vmdk file, then use the New-HardDisk using the "-DiskPath" option, then the command works ok. So my question is, what's the command to add an existing RDM to a VM?
Thanks in advance.