vSphere Storage Appliance

 View Only
  • 1.  SQL to determine 'mapped raw lun' by VM_ID ??

    Posted Aug 17, 2010 08:03 PM

    Can anyone help me determine this: http://screencast.com/t/MTJkODZhYWIt

    I have searched google, this forum. I simply cannot find out how to tell from the DATABASE via TSQL what the 'mapped raw lun' is for a particular VM_ID.

    Any help is greatly appreciated.



  • 2.  RE: SQL to determine 'mapped raw lun' by VM_ID ??

    Broadcom Employee
    Posted Aug 17, 2010 08:19 PM

    This information is available in the vSphere API, though it may not be in the actual VCDB. In general, you should use the vSphere API to extract information from your environment versus going directly to the vCenter database as the schemas/tables may change. The other issue is how the SQL statements are crafted, you may cause an infinite loop which can degrade performance on your vCenter system if not potentially introducing an outage.

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware scripts and resources at:

    Twitter: @lamw

    Getting Started with the vMA (tips/tricks)

    Getting Started with the vSphere SDK for Perl

    VMware Code Central - Scripts/Sample code for Developers and Administrators

    VMware Developer Community

    If you find this information useful, please award points for "correct" or "helpful".



  • 3.  RE: SQL to determine 'mapped raw lun' by VM_ID ??

    Posted Aug 17, 2010 08:23 PM

    Thanks for your time, but I did not ask for a programming lesson, nor did I ask is this the best way to do it.

    I fully understand what I am doing, but thank you so much for taking the initiative to 'watch my back.' I can take care of this myself though, thanks!!

    Any other answers?



  • 4.  RE: SQL to determine 'mapped raw lun' by VM_ID ??

    Broadcom Employee
    Posted Aug 17, 2010 08:34 PM

    When I "used" to query info from the db, I just fired up a DbVisualizer and started exploring the tables to figure out the mapping. You should be able to identify whether this information is in the database or not, the tablenames are pretty straight forward and probably good place to start is the VPX_VMS

    Good Luck

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware scripts and resources at:

    Twitter: @lamw

    Getting Started with the vMA (tips/tricks)

    Getting Started with the vSphere SDK for Perl

    VMware Code Central - Scripts/Sample code for Developers and Administrators

    VMware Developer Community

    If you find this information useful, please award points for "correct" or "helpful".



  • 5.  RE: SQL to determine 'mapped raw lun' by VM_ID ??

    Posted Aug 17, 2010 08:37 PM

    I appreciate the response.

    I have done this, exhastively. I didn't post here as a first resort.

    Any others have ideas?

    Thanks!!