locked
Find Host VHD File correlation to Guest Partition RRS feed

  • Question

  • Hello everybody,

    i have a simple question but couldn't find an answer on my own:

    I have a Hyper-V Cluster with several guests, all VHDs are stored in one folder on the Cluster Shared Volume (C:\ClusterStorage).

    I installed a SQL-Server (Guest) and added additional 4 VHD-Files all equal in size. I named the VHDs like SQL-Data, SQL-Log, SQL-temp, SQL-Backup.

    I could find the 4 Volumes in the guest OS. But unfortunately because they are all the same in size, i cannot identify them - i want to be sure that the SQL-Data Files are stored on the VHD called SQL-Data and not on the one called SQL-Log.

    I could find the SCSI-Number in the Settings of the VM and i also find a LUN-Number on the guest at the properties of the disks in disk Manager.

    Is this the correlation or how can i find that info?

    Thank you,

    Tom

    Tuesday, February 17, 2015 1:50 PM

Answers

  • Hi Tom,

    I assume that you are using window8/server8 and later .

    Based on this situation , I would suggest you to connect VHDs to only one SCSI controller .

    Then please run powershell command in VM to get the disk number and controller location :

    get-disk | fl number,objectid

    For IDE controller you can get the controller number within objectid ( the number like "X.X.X" , first is controller , second number is location )

    For SCSI you still can get the location number within objectid (such as "SCSI\DISK&VEN_HGST&PROD_HTS545050A7E680\4&335E6C8B&0&000000")

    Best Regards,

    Elton Ji


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com .


    • Edited by Elton_Ji Wednesday, February 18, 2015 11:12 PM
    • Proposed as answer by Elton_Ji Friday, March 6, 2015 8:59 AM
    • Marked as answer by Elton_Ji Sunday, March 8, 2015 1:47 AM
    Wednesday, February 18, 2015 11:11 PM
  • There is a simple step I take to ensure my VM information is all stored in the same directory.  I know it's too late now, but for future reference.  For each node in the Hyper-V cluster, I set the Hyper-V settings to default to C:\ClusterStorage\Volumex. Then when I create a VM in the cluster, I ALWAYS select to store the disk in a different location, but I do not change the default location. By make the selection to store in a different location, Hyper-V will create a subdirectory in C:\ClusterStorage\Volumex with the name of the VM. Under that subdirectory you will have two subdirectories - Virtual Machines and Virtual Hard Disks. By default, the disks get place in the Virtual Hard Disks subdirectory under the VM's directory.

    But even then you can still have the issue you are describing.  So I always assign a volume label to the virtual disk when I format it.  I also name the vhdx file the same as the volume name.  Never have an issue identifying my hard disks.

    Again, too late for you.  So, easiest way to identify is to take them offline one-by-one.  Then you can see which disk is going offline.


    . : | : . : | : . tim

    • Proposed as answer by Elton_Ji Friday, March 6, 2015 8:59 AM
    • Marked as answer by Elton_Ji Sunday, March 8, 2015 1:46 AM
    Thursday, February 19, 2015 12:09 AM

All replies

  • Hi Tom,

    I assume that you are using window8/server8 and later .

    Based on this situation , I would suggest you to connect VHDs to only one SCSI controller .

    Then please run powershell command in VM to get the disk number and controller location :

    get-disk | fl number,objectid

    For IDE controller you can get the controller number within objectid ( the number like "X.X.X" , first is controller , second number is location )

    For SCSI you still can get the location number within objectid (such as "SCSI\DISK&VEN_HGST&PROD_HTS545050A7E680\4&335E6C8B&0&000000")

    Best Regards,

    Elton Ji


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com .


    • Edited by Elton_Ji Wednesday, February 18, 2015 11:12 PM
    • Proposed as answer by Elton_Ji Friday, March 6, 2015 8:59 AM
    • Marked as answer by Elton_Ji Sunday, March 8, 2015 1:47 AM
    Wednesday, February 18, 2015 11:11 PM
  • There is a simple step I take to ensure my VM information is all stored in the same directory.  I know it's too late now, but for future reference.  For each node in the Hyper-V cluster, I set the Hyper-V settings to default to C:\ClusterStorage\Volumex. Then when I create a VM in the cluster, I ALWAYS select to store the disk in a different location, but I do not change the default location. By make the selection to store in a different location, Hyper-V will create a subdirectory in C:\ClusterStorage\Volumex with the name of the VM. Under that subdirectory you will have two subdirectories - Virtual Machines and Virtual Hard Disks. By default, the disks get place in the Virtual Hard Disks subdirectory under the VM's directory.

    But even then you can still have the issue you are describing.  So I always assign a volume label to the virtual disk when I format it.  I also name the vhdx file the same as the volume name.  Never have an issue identifying my hard disks.

    Again, too late for you.  So, easiest way to identify is to take them offline one-by-one.  Then you can see which disk is going offline.


    . : | : . : | : . tim

    • Proposed as answer by Elton_Ji Friday, March 6, 2015 8:59 AM
    • Marked as answer by Elton_Ji Sunday, March 8, 2015 1:46 AM
    Thursday, February 19, 2015 12:09 AM
  • Hi Tom,

    I would like to check if you need further assistance.

    Best Regards,

    Elton Ji


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com .

    Friday, March 6, 2015 9:02 AM