locked
Setting IPs in linux VMs RRS feed

  • Question

  • Hello.
    I'm having the following problem.I want to set the IPs of a linux(centos 6.4) vm but i can't.
    I have  a)installed the 3.4 integration services b)used kernel 3.12.5 with hyper-v support.
    In both cases i always get in dmesg

    hv_utils: KVP: IP injection functionality not available
    hv_utils: KVP: Upgrade the KVP daemon
    hv_utils: KVP: user-mode registering done.


    Moreover i use the following in order to read :

    $VM = Get-WmiObject -Namespace 'root\virtualization\v2' -Class 'Msvm_ComputerSystem'  | Where-Object { $_.ElementName -eq "FooBar" }
    $VMSettings = $vm.GetRelated('Msvm_VirtualSystemSettingData') | Where-Object { $_.VirtualSystemType -eq 'Microsoft:Hyper-V:System:Realized' }    
    $VMNetAdapters = $VMSettings.GetRelated('Msvm_SyntheticEthernetPortSettingData')
    $VMNetAdapters

    I have also tried  $VMNetAdapters = $VMSettings.GetRelated('Msvm_EmulatedEthernetPortSettingData')  using a legacy card.
    The previous code was taken from http://www.ravichaganti.com/blog/?p=2766

    In a few words i would like to assign IPs in linux VMs.
    Thank you in advance!

    ps:I have now seen that 3.5 version of integration services has been released yesterday and it says that it supports static ip injection.So the previous versions didn't support ip injection at all?

    • Edited by tasoss Friday, December 20, 2013 11:01 AM
    Friday, December 20, 2013 9:44 AM

Answers

All replies

  • Static IP injection should work with CentOS 6.4.  We have some new documentation posted on TechNet here:  http://technet.microsoft.com/en-us/library/dn531030.aspx .  If you drilldown to the details on Red Hat/CentOS/Oracle Linux, you'll see IP injection listed as a feature, with the grid showing which versions support it.

    With CentOS 6.4, is the KVP daemon up-and-running in user space?  Do a "ps -el" command and grep the output to see if the kvp daemon is running.

    Also which version of Hyper-V are you running on?

    With regard to LIS 3.5, that is for older versions of CentOS 6.3 and earlier, and 5.8 and earlier.  If you look at the feature grid in the documentation, you'll see which versions use LIS 3.4 (or now, 3.5) and which have LIS built-in.


    Michael Kelley, Lead Program Manager, Open Source Technology Center

    Friday, December 20, 2013 6:08 PM
    Moderator
  • Merry Christmas and a happy new year.

    Sorry for the delay but i was on vacations.
    Regarding my problem.A default installation of CentOS 6.5 worked without any problems.I have chosen the "software development workstation" profile during installation and now i can use

    (Get-VMNetworkAdapter -VMName "Centos 6.5(64) tasos")[0] | Set-VMNetworkConfiguration -DNSServer @("8.8.8.8") -IPAddress @("192.168.0.65") -Subnet "255.255.255.0" -DefaultGateway "192.168.0.120"
    and change the IP etc...

    Unfortunately this doesn't work on CentOS 6.4.
    hv_kvp_dameon is running
    When running the same commands as the above i get http://pastebin.com/Z5VZ2F7v
    Any ideas please?

    ps: Set-VMNetworkConfiguration taken from http://vniklas.djungeln.se/2013/08/15/ which is a slight modified version of http://www.ravichaganti.com/blog/?p=2766

    Thursday, January 2, 2014 10:51 AM
  • Which version of Hyper-V are you using?  I think there might be an incompatibility with IP injection between the Red Hat/CentOS 6.4 release and Hyper-V 2012 R2, for which a fix is needed.  If you are running Hyper-V 2012 R2, I will need to investigate further on this potential incompatibility.

    Michael Kelley, Lead Program Manager, Open Source Technology Center

    Thursday, January 2, 2014 5:53 PM
    Moderator
  • Hello again.Sorry,i'm using Hyper-V 2012 R2.Please let me know what you need from me.

    Thanks!

    Thursday, January 2, 2014 5:58 PM
  • Any news?Do you need some help from my side?
    Tuesday, January 7, 2014 10:30 AM
  • Hi,

    Have you seen this post regarding this? http://vniklas.djungeln.se/2014/01/03/install-lis-3-5-on-centos-6-3-and-then-upgrade-to-6-5/ Might help you or not


    Microsoft Certified Trainer
    MCSE: Desktop, Server, Private Cloud, Messaging
    Blog: http://365lab.net

    Tuesday, January 7, 2014 11:01 AM
  • Hi there! As Michael mentioned this is a Red Hat 6.4 specific issue. We will need to get a fix from Red Hat. The issue is related to the following bug being tracked for RHEL 7.0 : https://bugzilla.redhat.com/show_bug.cgi?id=996355

    I have emailed Red Hat developers to see if they have already released a fix to address this issue. Please give us a day or two to get back to you.

    Thanks,

    Abhishek Gupta

    PM, Linux Integration Services

    Microsoft Corporation

    Wednesday, January 8, 2014 12:27 AM
  • Of course!Thank you both for replying and informing us.Happy new year too :)
    Wednesday, January 8, 2014 8:29 AM
  • Hi tasoss, Happy New Year to you too :)! Here is what Red Hat engineers provided me with. The issue has been fixed through the following Red Hat update: http://rhn.redhat.com/errata/RHBA-2013-1770.html

    Instructions to install the update are listed in the link.

    This update was made in response to the following bug:

    https://bugzilla.redhat.com/show_bug.cgi?id=1004661

    You may follow up with Red Hat if required.

    Please let me know if this resolves your problem. If not then let me know how may I help further.

    Thanks,

    Abhishek Gupta, Program Manager, Linux Integration Services.

    Wednesday, January 8, 2014 6:59 PM
  • Hello!

    Unfortunetaly i have no access to

    https://bugzilla.redhat.com/show_bug.cgi?id=1004661 although i have created an account in red hat bugzilla.

    Moreover if i use yum to update centos 6.4 then it works fine as i have already told you.I suppose the patch is included there.But it also upgrades to 6.5 which is not what i want and i'm trying to find a solution.If i find a solution ,the problem will be fixed.

    Thursday, January 9, 2014 11:35 AM
  • Hi tasoss,

    I did a little bit of research and unfortunately there are only two options for you:

    a) Either upgrade to CentOS 6.5

    or

    b) Apply the fix yourself.

    The following thread further attests to the above suggestions:

    https://www.centos.org/forums/viewtopic.php?f=13&t=44118

    If you'd like to compile the fix yourself then you should backport the following commits:

    1) Drivers: hv: util: Correctly support ws2008R2 and earlier

    http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/hv/hv_kvp.c?id=3a4916050ba2e0f1d114ef540abdf02b2b173e61

    2) Drivers: hv: remove HV_DRV_VERSION

    http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/hv/hv_kvp.c?id=cfc25993e81f3fa68481d062be634d33184d5eae

    3) Drivers: hv: util: Fix a bug in version negotiation code for util services

    http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/hv/hv_kvp.c?id=6741335bc7294548ac95cb1f4671991ff30da193

    Please let me know if you need more information.

    Thanks,

    Abhishek Gupta, Program Manager, Linux Integration Services

    • Marked as answer by tasoss Friday, January 10, 2014 8:46 AM
    Friday, January 10, 2014 12:09 AM
  • Thank you very much!

    You are very helpful!

    Friday, January 10, 2014 8:46 AM