none
Hyper-V performance counter to retreieve VHD data

    Question

  • Hello All,

    I see Get-VHD command is used to retrieve the information from all VM's on host. Below are my queries

    1. Whether do we have any Hyper-V counter to retrieve the required VHD data from VM's ?

    2. I see like there is no direct way to retrieve the logical disk information from VM's in Hyper-V system through perfmon counters so in such cases whether can we make use of VHD information to calculate logical disk information?

    ComputerName            : HYPER-V
    Path                    : C:\Users\Public\Documents\Hyper-V\Virtual hard disks\RHEL_6.8.vhdx
    VhdFormat               : VHDX
    VhdType                 : Dynamic
    FileSize                : 6916407296
    Size                    : 107374182400
    MinimumSize             : 107374182400
    LogicalSectorSize       : 512
    PhysicalSectorSize      : 4096
    BlockSize               : 33554432

    In above o/p whether Size parameter can be considered to calculate the logical disk size of the VM. Would like to hear some comments on the same and appreciate your response.

    Thanks & Regards,

    Dinesh Kumar

    Wednesday, April 19, 2017 12:58 PM

All replies

  • What sort of information are you looking for?  Please be specific.

    If you are looking for performance data on the disk, you can obtain it from within the operating system of the VM, just like you do on a physical server.

    At the host level, there are also a set of Hyper-V perfmon counters that you can obtain on a per VM basis.

    Use your favorite search engine to search for 'hyper-v performance counters' and you will find a number of TechNet articles and blog posts about the various counters that exist and how to use them.  It's easier for you to look through the already published information rather than trying to replicate it all here in a forum reply.


    tim

    Wednesday, April 19, 2017 2:09 PM
  • I am looking how to retrieve the logical disk information of VM's present in Hyper-V. I have made some searches with regard to the topic and I see as of now there is no direct perfmon counter exists with Hyper-V to retrieve the expected data. Some or other way I was looking whether there is any alternate way to collect the required data from the Hyper-V. To my surprise I came across with the VHD command retrieving the data for each VM's present in the Hyper-v. When I executed the command in the server I have came across the above o/p that I have posted out in my earlier post. Hope till now am clear with the points.

    To be in specific, what I would require is whether "Size" data retrieved out with the help of VHD command can be considered for calculating the logical disk detail. My next query is like whether we have any perfmon counter exists with Hyper-V to retrieve out the VHD information of VM's.

    Also, after making an extensive search on logical disk information and VHD have decided to post in MSDN to get the support from you guys.

    I would require the comments from your end on the above queries.

    Thanks,

    Dinesh

    Thursday, April 20, 2017 7:15 AM
  • "I am looking how to retrieve the logical disk information of VM's present in Hyper-V. I have made some searches with regard to the topic and I see as of now there is no direct perfmon counter exists with Hyper-V to retrieve the expected data. "

    Your terminology is confusing me.  Logical disk information and perfmon counters mean two completely different things to mean.  Logical disk information means the sort of information would can get from Get-VHD or diskpart or disk properties.  Perfmon counters have to do with performance.

    "what I would require is whether "Size" data retrieved out with the help of VHD command can be considered for calculating the logical disk detail. "

    I think it can (again not clear on your end goal.  Get-VHD will get logical information about the allocation of a disk and some other information like that, just as you saw when you ran the command.  The provides information about the disk from outside the operating system.  If you perform things like diskpart or other WMI calls from within the OS of the VM that owns the VHD, you will be able to retrieve additional logical/physical information.

    "My next query is like whether we have any perfmon counter exists with Hyper-V to retrieve out the VHD information of VM's."

    This is where your terminology is confusing me again.  Perfmon counters are performance counters, not logical information.  This would be things like total IOs per second, number of read IOs per second, number of write IOS per second, etc.  You can get that information from using the Hyper-V host Hyper-V perfmon counters for a specific VM that owns the target VHD.  Or, again, you can go into the operating system of the VM that owns the VHD and run similar perfmon counters.

    "to post in MSDN to get the support from you guys."

    I think I understand what you are implying here, but just to make sure.  TechNet forums are not support mechanisms.  They are sources for information sharing from people similar to yourself who volunteer their time and expertise.  They are not official support vehicles.  If you want support, you must open a case with Microsoft support.


    tim

    Thursday, April 20, 2017 1:59 PM
  • In general, I have used the word support (kind of help or technical expertise) moving forward I would be using the terminology like expertise in the tech net forums. Your technical expertise on my query is really appreciated and was able to take few things out from here and apply for my new design.

    Thanks,

    Dinesh

    Friday, April 21, 2017 11:17 AM