VMware Cloud Community
CODETL19
Enthusiast
Enthusiast

Adding RDM Disks to first VM New-HardDisk Incompatible device backing specified for device '0'

Hi,

When using the New-HardDisk cmdlet in an attempt to map an RDM disk to a VM, it fails with the below error:

- "Incompatible device backing specified for device '0'."

I have mapped a disk from an external IBM storage unit to he ESXI hosts. The disk shows on the ESXI hosts in the cluster.

Here is an example of my script:

[hashtable]$unassignedDisks = @{
    1Disk = "naa.600507681081001BA8000000000006FC";
    2Disk = "naa.600507681081001BA8000000000006F8";
    3Disk = "naa.600507681081001BA8000000000006F9";
    4Disk = "naa.600507681081001BA8000000000006FA";
    5Disk = "naa.600507681081001BA8000000000006FB"
}

$vm = Get-VM "VM1"

        $SCSIControllers = Get-ScsiController -VM $vm

        $SCSIController1 = $SCSIControllers | Where-Object {$_.ExtensionData.BusNumber -eq 1}

        $SCSIController2 = $SCSIControllers | Where-Object {$_.ExtensionData.BusNumber -eq 2}

        $SCSIController3 = $SCSIControllers | Where-Object {$_.ExtensionData.BusNumber -eq 3}

        Write-Host "Creating Disk and SCSI Controller 1"

New-HardDisk -VM $vm -DeviceName "/vmfs/devices/disks/$($UnassignedDisks.1disk)" -Datastore "MY_DATASTORE" -DiskType RawPhysical -Controller $SCSIController1

 

Not quite sure where I am going wrong here, all the parameters look to be correctly set, yet it always fails with the error listed above.

I have seen that this may be a bug with PowerCLI, is it still the case now?. Those posts were years old.
I also saw a reference to a lucd fix by using the add-hd function, but it still returns the same error regarding the incompatible device backing.

Here is my attempt to use add-hd

add-HD -VMName $vm -DSname "MY_DATASTORE" -Filename "/vmfs/devices/disks/$($UnassignedDisks.1disk)" -SCSIcntrl $SCSIController1
 

I would greatly appreciate some guidance here. Thanks!

 

22 Replies
tekerjerbs
Contributor
Contributor

wow thank u for this, i was losing it when this wasn't working for me. much appreciated

wetnose88
Enthusiast
Enthusiast

This is very interesting, just to my curiosity, where does the UPPERCASE naa number come from?

If I remember correctly, I haven't never seen UPPERCASE naa number in storage device Identifier.

Reply
0 Kudos
LucD
Leadership
Leadership

I have seen both versions, upper- and lower-case.
It seems that some vendors insist that canonical names are case-sensitive, while others use case-insensitive names.

Not sure if there is an RFC that stipulates what it should be.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference