Hi,
I'm making a workflow in Orchestrator to automatically add a new datastore to a cluster.
This all works but I have to set the Multipath settings for this specific LUN to Round Robin on each host.
I created code that sets all the LUNs to Round Robin, but it only has to be for this specific LUN only.
Can somebody help me out with this?
This is the current code I have:
var mpp = new VcHostMultipathInfoLogicalUnitPolicy() ; mpp.policy = "VMW_PSP_RR"; for each (var host in hosts) { for each (var lun in host.config.storageDevice.multipathInfo.lun) { var id = lun.id; host.configManager.storageSystem.setMultipathLunPolicy(id, mpp); } }
I have the "naa", so I can do the check, but I can't get the "naa" from the multipathInfo.
I tried to use:
lun.lun.displayName
lun.lun.canonicalName
lun.lun.deviceName
But it gives "undefined" as output
Output example:
[2013-12-27 11:12:18.346] [D] LUN.id: 020003000060050768018086e430000000000003f1323134352020
[2013-12-27 11:12:18.346] [D] LUN.LUN: key-vim.host.ScsiDisk-020003000060050768018086e430000000000003f1323134352020
[2013-12-27 11:12:18.346] [D] LUN.LUN.displayName: undefined
[2013-12-27 11:12:18.346] [D] LUN.LUN.canonicalName: undefined
[2013-12-27 11:12:18.346] [D] LUN.LUN.deviceName: undefined