PowerCLI

 View Only
  • 1.  How to get the iSCSI and RDM disk information

    Posted Jul 11, 2011 01:29 PM

    Hi All,

    I am a newbie to Vsphere CLI.

    I manage a VM Infrastructre where there are number of VMs which have iSCSI drives and RDM drives  from a NetApp Filer.

    Can we get the iSCSI/RDM  Drive information from the power cli from each VM?

    Regards,



  • 2.  RE: How to get the iSCSI and RDM disk information

    Posted Jul 11, 2011 01:50 PM

    Since you didn't specify which information you want to capture in the report, you can start with a simple line

    Get-VM | Get-Harddisk | Select *

    This should already give quite a bit of info.

    Let us know which specific info you're after.



  • 3.  RE: How to get the iSCSI and RDM disk information

    Posted Jul 11, 2011 02:47 PM

    Hi,

    Thanks for the reply.

    If i Say

    [vSphere PowerCLI] D:\Program Files\VMware\Infrastructure\vSphere PowerCLI> (Get-VM "VM-Name")  | Get-Harddisk

    it lists the vmdk files which are on the NFS

    But there also an iSCSI Disk connected to VM, that information is not displayed.It is not a RAW Lun. it connected to the Guest VM from iscsi-initiator on Guest VM and managed via snapdrive

    Is it possible to fetch the information ?

    Regards,



  • 4.  RE: How to get the iSCSI and RDM disk information

    Posted Jul 11, 2011 03:27 PM

    If I understand this correctly, you connect to the iSCSI share from within the guest OS.

    In that case, vSphere will have no knowledge of that connection.

    You can use the Get-WMI cmdlet inside the guest OS to retrieve iSCSI information from the MSiSCSI_PortalInfoClass for example.

    If you are using the MS iSCSI Target v3.3 inside your guest OS, you can use the cmdlets that come with iSCSI.

    You can launch such a PowerShell script inside your guest OS with the Invoke-VMScript cmdlet.