I've noticed that, when renaming a VM via HyperV Manager :
- ElementName (got via Powershell) is accorded with this new name.
- partition name got via Perfmon HyperVisor Virtual Processor " counter is not changed ; the only way to change it to the new name value is to reboot the HyperV host !!!!
is it a feature , a bug ?
Is it a way to force partition name update to have consistency between both naming?
Did you close and re-open Perfmon in between?
Since the VM technically has a GUID to the system, the property of hte name would need to be refreshed by any application that is connected to it or has queried it in.
In the case of Perfmon, I would not expect it to re-query the properties of the objects as the names would not change frequently enough for it to be an issue. What would the performance impact be by Perfmon if it re-queried the names of all the objects you are viewing?
I would also expect a developer to bubble up the names of VMs, but when interacting with the VM use its "ID" in reference. This is most efficient through the WMI / CIM.
Learn. Apply. Repeat.
Disclaimer: Attempting change is of your own free will.
Thanks for answer.
I'm quite sure to have close/open perfmon to check if new name is reflected in partition name ;
it's reason why I found that only rebooting the host solve the issue.
I'm querying perfmon ( within an application not via GUI) every 20 seconds .
As my application displays these counters (cf. example below) in a structure related to VM name,
it's a problem to loose this relation when the VM name is changing.
As explained in Tony voellm's blog :
Virtual Processors (VP) are the unit of execution for a partition and each partition contains one guest virtual machine (VM). For each VP there is a set of counters. Perfmon.exe will let you view the counters separately or as an average for all VP’s called “_Total”. VP counters are prefixed with the name of the partition like this “WS08 Guest 1:” followed by the VP id like this “Hv VP 0”.
I run in the situation that VM Guest1:Hv VP 0 is the instance name in perfmon while related VM name is VM New-Guest.
I"ll check again tomorrow to confirm that I never see the name changing
by doing some powershell WMI query to get the VM name ( Class MSVMComputerSystem Property ElementName or Name I believe).
BTW , what's the easiest command line interface to get the perfmon counters ?
I rename via HypervManager a VM named "W2003-HYPERV" in "W2003-NEW-HYPERV"
Below is the result of WMI ElementName query :
> Get-WmiObject -Namespace root\virtualization Msvm_ComputerSystem | Format-Table ElementName
It looks fine "HYPER-V-HOST" is the root partition name and "W2003-NEW-HYPERV" accorded with the new name I just enter.
Then , run perfmon and look what's the partition's name for the Partition counters ; here is what I got :
<PARAM NAME="Counter00003.Path" VALUE="\Hyper-V Hypervisor Partition(W2003-HYPERV:HvPt)\2M GPA pages"/>
As i already checked that strange behavior, partition's name is the old one.( I re-run perfmon three times with the same result)
Only way to update it is to reboot the Host !!!!!
How may I be sure that it's not a bug or did I mis something?
Thanks for help.