Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

CentOS 6.5 / Linux VM KVP IP can't be shown on Hyper-V Manager after querying its KVP/IP information on Hyper-V host several times

$
0
0

Hello

I am using a CentOS 6.5 VM (Linux kernel 2.6.32-431) with Hyper-V KVP daemon installed, and I periodically query its IP (via using WMI or Powershell to query its KVP information) to manage it.

However, after querying its IP (KVP) for several times, its IPcan’t be queried or shown on Hyper-V Manager anymore.

I attached a simple KVP query Powershell script as the follows, and this problem can be reproduced in couple minutes if you run two instances with this script at the same time.

$VMName = $args[0]
write-host "$VMName"

filter Import-CimXml
{
    $CimXml = [Xml]$_
    $CimObj = New-Object -TypeName System.Object
    foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY"))
    {
        if ($CimProperty.Name -eq "Name" -or $CimProperty.Name -eq "Data")
        {
            $CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE
        }        
    }
    $CimObj
    $CimObj = $null
}

for ($i=1 ; $i -le 10000 ; $i++) {    
    $a = Get-Date
    write-host "$i - Time: " $a.ToLocalTime()
    $vm = Get-WmiObject -Namespace root\virtualization\v2 -Query "Select * From Msvm_ComputerSystem Where ElementName='$VMName'"
    $vm.ElementName
    $vmkvp = Get-WmiObject -Namespace root\virtualization\v2 -Query "Associators of {$vm} Where AssocClass=Msvm_SystemDevice ResultClass=Msvm_KvpExchangeComponent"
    $vmkvp.GuestIntrinsicExchangeItems | Import-CimXml
}

By the way, I found the following patches and gave them a try, but the problem still remains (And the generation 2 Ubuntu 14.04 with Linux kernel 3.13 also has this problem).

 - Patch "Drivers: hv: util: Fix a bug in the KVP code" has been added to the 3.14-stable tree

 - Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code

P.S. Generation 2 CentOS 7 VM (Linux kernel 3.10.0-123) also has this problem, but Windows VM is ok

Thanks,

Paul


Viewing all articles
Browse latest Browse all 8743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>