New Kernel 3.14.21-ZS and Hyper-V

Home Page Forums Network Management ZeroShell New Kernel 3.14.21-ZS and Hyper-V

This topic contains 10 replies, has 0 voices, and was last updated by  DreiIT 4 years, 8 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #44075

    DreiIT
    Member

    Hi.
    I just tried the new kernel 3.14.21-ZS which should contain the necessary kernel modules to run ZS as a guest under Microsoft Hyper-V 2012 R2. Sadly I’m still running into problems.

    After booting the new kernel, no disk storage device is detected any more, just the CD-ROM is shown by the kernel output. I think maybe there are a view modules missing in the initrd.img which are needed by the module hv_storvsc.

    Here is the output of lsmod from a Ubuntu Server running under HV with kernel 3.2.0-32-generic:


    Module Size Used by
    joydev 17693 0
    hid_hyperv 13164 0
    hid 99559 1 hid_hyperv
    psmouse 97443 0
    serio_raw 13211 0
    i2c_piix4 13301 0
    mac_hid 13253 0
    lp 17799 0
    parport 46562 1 lp
    hv_netvsc 22939 0
    hv_utils 13540 0
    hv_storvsc 17896 5
    hv_vmbus 34543 4 hid_hyperv,hv_netvsc,hv_utils,hv_storvsc
    floppy 70365 0

    A short look into the archive /boot/1/3.14.21-ZS/modules/10full.tgz lets me presume, the important module hv_netvsc, is missing, too.

    #53508

    DreiIT
    Member

    Update:

    I ran a shell out of a manipulated initrd.img and tried to load the module hv_storevsc.ko manually. This produced errors regarding missing vmbus symbols.
    Afterwards I added the module hv_vmbus into the initrd.img which loaded perfectly. This triggered the module hv_storevsc.ko and the system booted.

    Now just the module drivers/net/hyperv/hv_netvsc.ko is missing to use the native network adapters. Sadly this module is not found in 10full.tgz. It can be activated in the kernel config:

    Device Drivers > Network device support
    Microsoft Hyper-V virtual network driver
    #53509

    sierramike
    Member

    Hi,

    I managed some years ago to rebuild a kernel with Hyper-V drivers on an old Debian to work fine in Hyper-V. But I’m not so used to it so I forgot everything since last Linux Kernels have these drivers integrated for months !

    I’m surprised the last Zeroshell does not seem to have these drivers already integrated. I see you are doing this, could you post detailed instructions about how to do this ?

    Thanks !

    #53510

    DreiIT
    Member

    Hi sierramike.

    @sierramike wrote:

    I’m surprised the last Zeroshell does not seem to have these drivers already integrated. I see you are doing this, could you post detailed instructions about how to do this ?

    Just to clarify: I’m not working on the kernel config of Zeroshell, I was just testing the latest kernel release and it’s initrd.img. It should support Hyper-V, but is not completely working yet.

    Regards

    #53511

    sierramike
    Member

    Hi

    No mistake, I understood that was your personal work! I was just wondering if you could share your steps to reproduce!

    My remark regarding the Hyper-V support was more intended to the Zeroshell team because the drivers seem to be part of the Linux kernel for years now …

    #53512

    DreiIT
    Member

    Ok, I understand.

    What I did was quite simple, here a short summary:

    • Extract the initrd.img to a temporary directory
    • Edit the file init so that a shell is called before the boot process continues (almost at the end of the file).
    • Copy the missing kernel module hv_vmbus.ko to the modules directory.
    • Create a new newinitrd.img
    • Boot with the new created newinitrd.img: While seeing the grub-menu press ‘e’ to edit the menu-entry and change the filename. Boot with pressing F10.
    • The initrd will start a shell. Now you can load the kernel module hv_vmbus.ko manually and all the magic happens.
    • Continue booting through exiting the shell (Strg+D)
    #53513

    @dreiit wrote:

    Ok, I understand.

    What I did was quite simple, here a short summary:

    • Extract the initrd.img to a temporary directory
    • Edit the file init so that a shell is called before the boot process continues (almost at the end of the file).
    • Copy the missing kernel module hv_vmbus.ko to the modules directory.
    • Create a new newinitrd.img
    • Boot with the new created newinitrd.img: While seeing the grub-menu press ‘e’ to edit the menu-entry and change the filename. Boot with pressing F10.
    • The initrd will start a shell. Now you can load the kernel module hv_vmbus.ko manually and all the magic happens.
    • Continue booting through exiting the shell (Strg+D)

    As a native Microsoft guy, do you mind sharing the rebuild?

    About the hyper-v support:
    Do I understand these will be in the new kernel? does this include the drivers needed to support the native Hyper-v Nics?

    #53514

    DreiIT
    Member

    I didn’t do a rebuilt, I used the kernel Fulvio released at Oct, 12 to do the tests.

    The last statement of Fulvio lets me hope that in the next kernel release the problem with the initrd is solved and the missing kernel module for native HV-networking is available. We’re also waiting for it. 🙂

    #53515

    @dreiit wrote:

    I didn’t do a rebuilt, I used the kernel Fulvio released at Oct, 12 to do the tests.

    The last statement of Fulvio lets me hope that in the next kernel release the problem with the initrd is solved and the missing kernel module for native HV-networking is available. We’re also waiting for it. 🙂

    Still new to this, trying to build a layered network (Client, Server, Hyper-v, External). I’m having a hard time understanding the firewall rules..
    I keep locking myself out or allowing al servers to freely go surfing…..

    Care to help me out and get up to speed…..

    So to be sure:
    Running Zeroshell in Hyper-v
    Legacy Nic’s, VLAN not supported within zeroshell so you need to set it at NIC level. therefor basically limiting your zeroshell to max 4 networks?
    At least that way it is working for me…..

    Something else, is it me or is zeroshell capped at 100Mb/s, When I try to deploy a new VM from my serverlan to the Hyper-v host it will not go waster then 100 🙂

    #53516

    DreiIT
    Member

    So to be sure:
    Running Zeroshell in Hyper-v
    Legacy Nic’s, VLAN not supported within zeroshell so you need to set it at NIC level. therefor basically limiting your zeroshell to max 4 networks?
    At least that way it is working for me…..

    This is correct.

    Not ZS itself is limiting and causing the poor performance, it is the legacy adapter which causes a quite low throughput. The only way to run a linux machine under Hyper-V – without networking limitations – is by using the hv_net.ko module and not the legacy network adapter.

    #53517

    DreiIT
    Member

    Update:

    After Fulvio released the new kernel 3.14.21-ZS-HV (Add-On 48f00) tonight I installed it on my test machine running under Hyper-V. Luckily it booted and all native network adapters were available.
    Thank you Fulvio!

    While installing there were some errors, but I think they have other reasons than the kernel:


    ... no errors until here:

    Activating the package 48f00:Add-On ...
    Reading configuration ...
    --> Replacing files ...
    --> Patching files ...
    patching file /etc/group
    Hunk #1 FAILED at 11.
    1 out of 1 hunk FAILED -- saving rejects to file /etc/group.rej
    patching file /etc/fstab
    patching file /root/kerbynet.cgi/template.cfg/httpd.conf
    Hunk #1 FAILED at 304.
    1 out of 1 hunk FAILED -- saving rejects to file /root/kerbynet.cgi/template.cfg/httpd.conf.rej
    patching file /etc/httpd/conf/CapPortAS.conf
    Hunk #1 FAILED at 266.
    1 out of 1 hunk FAILED -- saving rejects to file /etc/httpd/conf/CapPortAS.conf.rej
    patching file /etc/httpd/conf/CapPortGW.conf
    Hunk #1 FAILED at 263.
    1 out of 1 hunk FAILED -- saving rejects to file /etc/httpd/conf/CapPortGW.conf.rej
    --> Running scripts ...
    Syncing filesystem... Done

    ...no more errors until end of process.

    For the future it would be better and much easier if this kernel would be part of the standard ZS release. It is a drawback if you want to install it under Hyper-V:

    • Install new ZS with at least one legacy network adapter
    • Configure temporary network settings
    • Receive a subscription
    • Install the new kernel

    Imho, it should not be necessary to have a subscription to make it natively usable under Hyper-V.

    #53518

    gordonf
    Member

    With Hyper-V and VMware support, this thing is turning into a really viable virtual appliance router!

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.