Issues seen while setting DHCP network configuration on Linux guest VM through KVP daemon RRS feed

  • Question

  • Hi all, 

    I am trying to set DHCP network setting on a CentOS 7.1 guest VM through KVP daemon as follows:

    $NetworkSettings[0].IPAddresses = @()
    $NetworkSettings[0].Subnets = @()
    $NetworkSettings[0].DefaultGateways = @()
    $NetworkSettings[0].DNSServers = @()
    $NetworkSettings[0].ProtocolIFType = 4096
    $NetworkSettings[0].DHCPEnabled = $true

    $Service = Get-WmiObject -Class "Msvm_VirtualSystemManagementService" -Namespace "root\virtualization\v2" -ComputerName <hostIP> -Credential $mycreds
    $setIP = $Service.SetGuestNetworkAdapterConfiguration($VM, $NetworkSettings[0].GetText(1))

    It is failing with job error code 32768 and error description as follows: 

    "The operation failed.

    The Hyper-V Virtual Machine Management service encountered an unexpected error: Provider is not capable of the attempted operation (0x80041024)."

    Within the VM, error is seen as follows: 

    "hypervkvpd: Determining IP information for eth0... failed.

    KVP: Failed to execute cmd '/usr/libexec/hypervkvpd/hv_set_ifconfig /var/lib/hyperv/ifcfg-eth0'; error: 2 No such file or directory"

    All the files /usr/libexec/hypervkvpd/hv_set_ifconfig, /var/lib/hyperv/ifcfg-eth0, /etc/sysconfig/network-scripts/ifcfg-eth0 are all present after powershell script is executed. But still "error: 2 No such file or directory" is thrown. 

    I am using built-in integration services and the version of KVP rpm is:


    This issue is seen intermittently and not every time.

    Has anyone faced this issue before and is there any solution for this issue? Any help is much appreciated. 




    Monday, April 8, 2019 11:24 AM