Hi Devs, (and CC'ed to the original post) I built a test genx86_64-vm image for Nick Mace to test, for the record here are his testing results ... ====== Dear Lonnie,
I got back from being away a little bit earlier than expected. I haven't wasted any time. I can tell you that it's a... ...success! It went like a breeze: upgrading the image was incredibly simple. I added 2 new network adapters to my virtual machine, then issued "modprobe hv_netvsc": asterisk ~ # dmesg | tail net eth0: Using EEPROM-set media 100baseTx-FDX hv_vmbus: Hyper-V Host OS Build:9600-6.3-16-0.16384 hv_netvsc: module is from the staging directory, the quality is unknown, you have been warned. hv_vmbus: registering driver netvsc hv_netvsc: hv_netvsc channel opened successfully hv_netvsc: hv_netvsc channel opened successfully netvsc vmbus_0_8: Device MAC 00:15:5d:xx:xx:x3 link state up hv_utils: Registering HyperV Utility Driver hv_vmbus: registering driver hv_util netvsc vmbus_0_9: Device MAC 00:15:5d:xx:xx:x5 link state up I was expecting this to load the other 2 modules as dependencies, as duly happened. I then removed the 2 legacy network adapters, added "hv_netvsc" to rc.modules and set my externally facing hyper-v network interface to the MAC address that the router expects. AstLinux started with the usual eth0/eth1 interfaces. "lsmod" gives: asterisk ~ # lsmod Module Size Used by dahdi 188505 0 hv_utils 3547 0 cn 3403 1 hv_utils hv_netvsc 12218 0 hv_vmbus 19673 2 hv_utils,hv_netvsc,[permanent] rtc 4584 0 I also got a side benefit I was hoping for: previously, when I selected the window showing the vm console, a message about the keyboard would appear, as if I had just connected a plug-and-play device. This no longer happens because it's using the hyper-v keyboard driver instead. Thanks again for your help. I'm really pleased with the results. Hopefully this can go into the next official release. Please let me know if you need any more testing. Finally, Nick kindly answered a few questions I had ... 1) Yes, the network interfaces registered as ethN: asterisk ~ # ip -o a 1: lo inet 127.0.0.1/8 scope host lo 2: eth0 inet 192.168.1.3/24 brd 192.168.1.255 scope global eth0 3: eth1 inet 192.168.2.1/24 brd 192.168.2.255 scope global eth1 2) I don't know how hv_utils got loaded! I was expecting it to be a dependency for hv_netvsc, but you say the only dependency is hv_vmbus. I took hv_netsvc out of rc.modules and restarted the VM. I then issued "modprobe hv_vmbus" and everything loaded, including the network drivers: hv_vmbus: Hyper-V Host OS Build:9600-6.3-16-0.16384 hv_utils: Registering HyperV Utility Driver hv_vmbus: registering driver hv_util hv_netvsc: module is from the staging directory, the quality is unknown, you have been warned. hv_vmbus: registering driver netvsc hv_netvsc: hv_netvsc channel opened successfully netvsc vmbus_0_8: Device MAC 00:00:00:00:00:01 link state up hv_netvsc: hv_netvsc channel opened successfully netvsc vmbus_0_9: Device MAC 00:15:5d:01:04:15 link state up I then tried again, starting with "modprobe hv_utils". The same thing happened. It seems that loading any 1 module is enough to cause all the others to load. 3) Yes, the only change I had to make to AstLinux was to add hv_netvsc to /etc/rc.modules. I changed the configuration of the vm in Hyper-V Manager: I added 2 "network adapters" and removed the 2 "legacy network adapters" that I had been previously using. I'd be delighted to put together some screenshots and some text. ====== Nick, the AstLinux Project greatly appreciates your help here. The next AstLinux Release (and pre-releases) will include the Hyper-V kernel modules. Here is a placeholder for future documentation. Guest Virtual Machines Hyper-V https://doc.astlinux-project.org/userdoc:guest_vm_hyperv Lonnie On Mar 19, 2017, at 10:21 AM, Lonnie Abelbeck <li...@lonnie.abelbeck.com> wrote: > Hi Nick, > > Thanks much for reporting your success. Cool it is working as a Hyper-V > guest. > > My common sense would say to leave it alone now :-) But we all like to learn > here ... > > I looked into the "project/astlinux/genx86_64/linux-smp-vm.config" and it > seems fairly straightforward. > > Kernel Config -> Device Drivers > > Base stuff: > CONFIG_HYPERV=m (builds modules: hv_timesource, hv_vmbus, hv_vmbus) > > Enables hv_utils: > CONFIG_CONNECTOR=m (builds module: cn, or =y to be built-in) > CONFIG_HYPERV_UTILS=m (builds module: hv_utils) > > Enables hv_netvsc: > CONFIG_STAGING=y (required for our current Linux Kernel 3.2) > CONFIG_HYPERV_NET=m (builds module: hv_netvsc) > > I'm not sure what advantages hv_utils would give you, though with these > kernel additions if you added "hv_netvsc" to your /etc/rc.modules file you > could have more efficient network interface access, which you would have to > select from your VM configuration somehow. Your network interface names > would change. > > If there is interest we could add the above kernel changes to the next > pre-release for the genx86_64-vm board type for testing and decide later if > it makes it to the final 1.2.10 release. > > Building extra kernel modules is a pretty safe thing to do, though I > personally don't have any way to test this. > > Lonnie > > > On Mar 19, 2017, at 5:52 AM, Nick Mace <n...@swm.me.uk> wrote: > >> Hello. Back in 2015, this mailing list was very helpful when I couldn't >> work out why my phones and AstLinux weren't talking to each other (the >> phones were misconfigured to use a VLAN). Fast-forward eighteen months >> and it's all very exciting! I have 5 phones which all work. >> Paging/intercom works. Voicemail works. Our POTS phone line currently >> redirects to our VoIP telephony provider, but I will shortly be porting >> the number. Thank you to everyone involved in AstLinux. >> >> Lonnie's advice from my last problem was to deploy AstLinux as a "router >> on a stick", with all the phones behind it. This seemed like good >> advice! I had other reasons for wanting to use virtualization, so I >> installed Hyper-V Server 2012R2 and went for it. It's been another steep >> learning curve - I now know a lot more about VLANs and virtual machines! >> I have installed the "vm" flavour of AstLinux, given it 2 virtual >> network cards and it works brilliantly. >> >> The crux of my email is to ask if it would be possible to include the >> Hyper-V kernel modules in the next build of AstLinux? I went as far as >> to spin up a new install of CentOS 7 to make a development server for >> AstLinux. I even got the source to compile! I can find tantalizing >> references to hv_utils, but I can't work out how to enable them. This is >> a long way outside my comfort zone! It all works without the kernel >> modules, but it would be nicer to have them. Thanks. >> >> Best wishes, >> >> Nick ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.