I want to develop an appplication to take snapshot of the LUN on which a particular VM is present. How can i identify the LUN. i am using vi java api.
I have tried doing this by matching the canonical name of the scsi luns listed with the host an the datastore of the VM but canonical names are not unique and hence i can't be 100% sure if thats the correct lun.
Please help.
Hi,
Are u using the iscsi LUN or FC LUN, in case of FC u can use WWN number & in case of iscsi u can use iqn name. Both remains constant for a LUN.
Did you not make a consistent naming scheme between the Target name and the name in vSphere? Go to your Host, click Storage Views, then Maps at the top, check Virtual Machine and SCSI Target on the right, and click update view. That should show you VM to SCSI Target. Hope this helps.
Can u guide me how to get the WWN number or IQN name of the LUN using vi java. Also are these numbers unique even if i have multiple storage devices each having multiple LUNs? Can we somehow use UUID of the LUN to associate it with either the VM or datastore?