phreak2599
Contributor
Contributor

Any idea on why two different commands would come back with different results? (Related to latency sensitivity)

Jump to solution

Working with latency sensitivity, which recently bit us in the ass, we are developing a report to show all VMs that have a low latency sensitivity, but are a little confused with the results. Is there any reason why get-vm and get-view would show different results for specific VMs?

This VM specifically has the normal setting in the VMX file.

Get-VM vma | Select Name, @{N="CPU_Scheduler_Priority";E={($_.ExtensionData.Config.ExtraConfig | `where {$_.Key -eq "sched.cpu.latencySensitivity"}).Value}}

Name           CPU_Scheduler_Priority

----           ----------------------

vma normal

get-view -ViewType VirtualMachine -Filter @{"Name"="vma"} -Property Name,Config.LatencySensitivity | Select Name,@{N='Sensitivity Level';E={$_.Config.LatencySensitivity.Level}}

Name           Sensitivity Level

----           -----------------

vma               low

1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Ok, I just noticed, you are looking at 2 different properties.

The ExtraConfig entry is what was read from the VMX file.

This is not updated until you stop/start the VM.

The LatencySensitivity one is the actual value used by the VM.

I would suspect you changed the setting after the VM was powered on.

In short, the VMX value vs the actual value.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership

No, and the values shouldn't be different when you are looking at the same VM.

Does this also return different values?

Get-VM |

Select Name,

    @{N='LatencyExt';E={($_.ExtensionData.Config.ExtraConfig | `where {$_.Key -eq "sched.cpu.latencySensitivity"}).Value}},

    @{N='LatencyView';E={((Get-View -Id $_.ExtensionData.MoRef).Config.ExtraConfig | `where {$_.Key -eq "sched.cpu.latencySensitivity"}).Value}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

phreak2599
Contributor
Contributor

No running that shows the same results.

Get-VM vma | Select Name,@{N='LatencyExt';E={($_.ExtensionData.Config.ExtraConfig | `where {$_.Key -eq "s

ched.cpu.latencySensitivity"}).Value}}, @{N='LatencyView';E={((Get-View -Id $_.ExtensionData.MoRef).Config.ExtraConfig | `where {$_.Key -eq "sched.cpu

.latencySensitivity"}).Value}}

Name           LatencyExt LatencyView

----           ---------- -----------

vma normal     normal

0 Kudos
LucD
Leadership
Leadership

Ok, I just noticed, you are looking at 2 different properties.

The ExtraConfig entry is what was read from the VMX file.

This is not updated until you stop/start the VM.

The LatencySensitivity one is the actual value used by the VM.

I would suspect you changed the setting after the VM was powered on.

In short, the VMX value vs the actual value.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
phreak2599
Contributor
Contributor

Thanks LucD!

0 Kudos
phreak2599
Contributor
Contributor

So would this be accurate?

Get-View -ViewType VirtualMachine -Filter @{"Name"="vma"} | Select Name,@{N='RunningConfig';E={$_.Config.

LatencySensitivity.Level}},@{N='VMX';E={($_.Config.ExtraConfig | `where {$_.Key -eq "sched.cpu.latencySensitivity"}).Value}}

Name           RunningConfig VMX

----           ------------- ---

vma           low normal

0 Kudos
LucD
Leadership
Leadership

Yes.
And when you power off the VM the value in the VMX should be updated.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos