VMware Cloud Community
juriskrumins
Enthusiast
Enthusiast

VMware SRM 5.5 "Incompatible device backing specified for device."

I have 2 VmWare vCenters with SRM 5.5 installed.

I have MSFC out of 3 nodes with multiple RDM disks connected to machines using seconds SCSI controller in physical mode. Some RDM are replicated using NetApp snapmirror, some of them are not. So for those who are not, I use customized VM protection in order to connect LUN from recovery site NetApp system. I have vmdk mapping files on recovery site and those mapping files I defined in machine's protection configuration. LUN id's for the non-replicated devices on both sites are identical.

Unfortunately I constantly getting following error "Error - Incompatible device backing specified for device '0'." while testing SRM failover and I can't get over it.

I've tested things with non replicated VMDK file and it works. So maybe custom VM protection can't be done when using RDM, but I've searched documentation and KB and can't find any info about it.


Thanks in advance.

Tags (3)
0 Kudos
1 Reply
juriskrumins
Enthusiast
Enthusiast

Seems like SRM feature to reaplace non-replicated disks works correctly only with VMDK file, but not RDM. And by the way New-Harddisk cmdlet prom PowerCLI 5.8r1 also  can't connect RDM disk to machine when you already have RDM vmdk map file. Getting the same error.

So I've managed to overcome this problem using Pre-PowerOn custom script, that updated machine's configuration before we start machine after failover.

[OutputType([Int])]

Param

(

        [Parameter(Mandatory=$true,

                   Position=0)]

        [String]

        $VM,

        [Parameter(Mandatory=$true,

                   Position=1)]

        [String]

        $Server1,

        [Parameter(Mandatory=$true,

                   Position=2)]

        [String]

        $Server2,

        [Parameter(Mandatory=$true,

                   Position=3)]

        [String]

        $FileName1,

        [Parameter(Mandatory=$true,

                   Position=4)]

        [String]

        $FileName2,

        [Parameter(Mandatory=$true,

                   Position=5)]

        [String]

        $ControllerName,

        [Parameter(Mandatory=$true,

                   Position=6)]

        [Int]

        $UnitNumber,

        [Parameter(Mandatory=$true,

                   Position=7)]

        [String]

        $UserName,

        [Parameter(Mandatory=$true,

                   Position=8)]

        [String]

        $Password

)

Add-PSSnapin  Vmware.VimAutomation.Core

$ComputerSystem = Get-WmiObject Win32_ComputerSystem

$Server =  $ComputerSystem.Name + "." + $ComputerSystem.Domain

Connect-VIServer -Server $Server -User $UserName -Password $Password -Protocol HTTPS

$vmobj = Get-VM -Name $VM

$ControllerKey = ($vmobj | Get-ScsiController -Name "$ControllerName").ExtensionData.Key

switch -exact ($Server)

{

    $Server1 {$FileName = $FileName1;break}

    $Server2 {$FileName = $FileName2;break}

}

Write-Verbose -Message "Server: $Server"

Write-Verbose -Message "ControllerKey: $ControllerKey"

Write-Verbose -Message "FileName: $FileName"

Write-Verbose -Message "UnitNumber: $UnitNumber"

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec

$spec.DeviceChange += New-Object VMware.Vim.VirtualDeviceConfigSpec

$spec.deviceChange[0].operation = "add"

$spec.deviceChange[0].device = New-Object VMware.Vim.VirtualDisk

$spec.deviceChange[0].device.key = -100

$spec.deviceChange[0].device.backing = New-Object VMware.Vim.VirtualDiskRawDiskMappingVer1BackingInfo

$spec.deviceChange[0].device.backing.fileName = $FileName

$spec.deviceChange[0].device.backing.compatibilityMode = ""

$spec.deviceChange[0].device.backing.diskMode = "persistent"

$spec.deviceChange[0].device.connectable = New-Object VMware.Vim.VirtualDeviceConnectInfo

$spec.deviceChange[0].device.connectable.startConnected = $true

$spec.deviceChange[0].device.connectable.allowGuestControl = $false

$spec.deviceChange[0].device.connectable.connected = $true

$spec.deviceChange[0].device.controllerKey = $ControllerKey

$spec.deviceChange[0].device.unitNumber = $UnitNumber

Write-Verbose -Message "$spec"

$vmobj.ExtensionData.ReconfigVM($spec)

Disconnect-VIServer -Confirm:$false

0 Kudos