www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

New Kernel 3.14.21-ZS and Hyper-V

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Tue Oct 14, 2014 12:15 pm    Post subject: New Kernel 3.14.21-ZS and Hyper-V Reply with quote

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:
Code:

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.
Back to top
View user's profile Send private message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Fri Oct 17, 2014 6:59 pm    Post subject: Reply with quote

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:
Code:
Device Drivers > Network device support
    Microsoft Hyper-V virtual network driver
Back to top
View user's profile Send private message
sierramike



Joined: 29 Oct 2014
Posts: 2

PostPosted: Wed Oct 29, 2014 11:17 am    Post subject: Reply with quote

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 !
Back to top
View user's profile Send private message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Wed Oct 29, 2014 6:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
sierramike



Joined: 29 Oct 2014
Posts: 2

PostPosted: Thu Oct 30, 2014 8:49 am    Post subject: Reply with quote

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 ...
Back to top
View user's profile Send private message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Thu Oct 30, 2014 11:51 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
Testnetwerk.nl



Joined: 05 Nov 2014
Posts: 2

PostPosted: Wed Nov 05, 2014 7:25 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Wed Nov 05, 2014 7:32 pm    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message
Testnetwerk.nl



Joined: 05 Nov 2014
Posts: 2

PostPosted: Wed Nov 05, 2014 8:55 pm    Post subject: Reply with quote

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. Smile


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 Smile
Back to top
View user's profile Send private message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Thu Nov 06, 2014 6:01 am    Post subject: Reply with quote

Quote:

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.
Back to top
View user's profile Send private message
DreiIT



Joined: 14 Oct 2014
Posts: 7

PostPosted: Fri Nov 07, 2014 6:46 am    Post subject: Reply with quote

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:
Code:

... 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.
Back to top
View user's profile Send private message
gordonf



Joined: 26 Feb 2012
Posts: 89

PostPosted: Fri Nov 07, 2014 3:19 pm    Post subject: Go Fulvio! Reply with quote

With Hyper-V and VMware support, this thing is turning into a really viable virtual appliance router!
--
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group