Hyper-V: enable all hv drivers and export them in the initramfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| initramfs-tools (Ubuntu) |
Medium
|
Andy Whitcroft | ||
| linux (Ubuntu) |
Medium
|
Andy Whitcroft |
Bug Description
As of kernel 3.2, all of drivers (except for the storage driver) required to be able to run Ubuntu as a guest image in a Microsoft Hyper-V environment have exited the staging tree of the kernel, and are now present in the following locations:
a. hv_timesource: Merged with general CPU detection code.
b. hv_vmbus: Moved to drivers/hv. Provides general vmbus functionality.
c. hv_utils: Moved to drivers/hv. Provides kvp, timesync, shutdown, and heartbeat.
d. hv_netvsc: Moved to drivers/net/hyperv. Provides synthetic network access.
e. hv_mouse: Moved to drivers/hid. Provides synthetic mouse access.
f. hv_storvsc: Still in drivers/staging/hv. Minor fixes still being hammered out (see http://
For the Ubuntu 12.04 kernel please ensure that:
1. Drivers are added to the install initrd so users have access to all synthetic devices during installation
2. Drivers are automatically installed by default in the installed initrd (so no rebuilding is necessary)
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-
ProcVersionSign
Uname: Linux 3.0.0-14-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
ArecordDevices:
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/pcmC0D0p: mab 1646 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
Card hw:0 'Intel'/'HDA Intel at 0xf0800000 irq 44'
Mixer name : 'Intel IbexPeak HDMI'
Components : 'HDA:10ec0272,
Controls : 24
Simple ctrls : 13
Date: Mon Jan 16 12:42:07 2012
HibernationDevice: RESUME=
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MachineType: System76, Inc. Lemur UltraThin
ProcEnviron:
LANGUAGE=en_GB:en
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.60
RfKill:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/17/2010
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: CALPELLACRB.
dmi.board.
dmi.board.name: Lemur UltraThin
dmi.board.vendor: System76, Inc.
dmi.board.version: lemu2
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: System76, Inc.
dmi.chassis.
dmi.modalias: dmi:bvnPhoenixT
dmi.product.name: Lemur UltraThin
dmi.product.
dmi.sys.vendor: System76, Inc.
CVE References
Changed in linux (Ubuntu): | |
status: | New → Triaged |
summary: |
- Add modules to kernel and (maybe) initramFS + Hyper-V: enable all hv drivers and export them in the initramfs |
Changed in linux (Ubuntu): | |
assignee: | nobody → Andy Whitcroft (apw) |
importance: | Undecided → Medium |
Andy Whitcroft (apw) wrote : | #2 |
Mike Sterling (mike-sterling) wrote : | #3 |
Can we get the drivers included in the initramfs? Without having them loaded, Ubuntu running on Hyper-V will be forced to install using the older non-PV drivers (for IDE) and not have access to SCSI or network unless specifically configured.
Additionally, as ata_piix is statically linked in Ubuntu 12.04, we are unable to control our root device with our hv_storvsc driver. On other distributions, we use modprobe rules to block the loading of ata_piix. As I see it, we have two options:
1. Build Hyper-V relevant storage driver as part of the kernel and we can fix the initialization ordering to ensure that our PV drivers control the root device when Ubuntu is running on a Hyper-V host. When not running on a Hyper-V host, our drivers will not successfully initialize and so will not have any effect. This would simultaneously address your need for fast boot while also addressing the performance issues on the root device when hosted on Hyper-V.
2. Modify the ata driver to recognize that when hosted on Hyper-V, it should not control the disks.
Let me know if either of those are options we can collaborate on.
Andy Whitcroft (apw) wrote : | #4 |
Ok I have pushed some initramfs-tools changes to the linked branch. This includes the hv_* modules in the initramfs by default.
Andy Whitcroft (apw) wrote : | #5 |
I have also pushed up a fix to the kernel to include them in the d-i virtio udeb for the alternate CDs.
Changed in initramfs-tools (Ubuntu): | |
assignee: | nobody → Andy Whitcroft (apw) |
importance: | Undecided → Medium |
Changed in linux (Ubuntu): | |
status: | Triaged → In Progress |
Changed in initramfs-tools (Ubuntu): | |
status: | New → In Progress |
Andy Whitcroft (apw) wrote : | #6 |
I have produced test initramfs-tools packages for testing. See the commentary on bug #929545 for these, as you need the updated kernels to match to test correctly.
Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package linux - 3.2.0-16.25
---------------
linux (3.2.0-16.25) precise; urgency=low
[ Andy Whitcroft ]
* d-i -- include the Hyper-V drivers in the virtio udeb
- LP: #917135
[ Felix Fietkau ]
* (pre-stable): ath9k_hw: fix a RTS/CTS timeout regression
- LP: #925602
[ Keith Packard ]
* SAUCE: drm/i915: Force explicit bpp selection for
intel_
- LP: #745112, #912387, #917330
[ Leann Ogasawara ]
* Fix typo in generic-pae description
- LP: #928448
* Rebase to v3.2.6
[ Upstream Kernel Changes ]
* procfs: parse mount options
- CVE-2011-4917
* procfs: add hidepid= and gid= mount options
- CVE-2011-4917
* proc: fix null pointer deref in proc_pid_
- CVE-2011-4917
* xhci: Remove warnings about MSI and MSI-X capabilities.
- LP: #929656
* xhci: Remove scary warnings about transfer issues.
- LP: #929656
* x86, mce, therm_throt: Don't report power limit and package level
thermal throttle events in mcelog
- LP: #930288
* rebase to v3.2.6
- LP: #924320
- LP: #918254
-- Leann Ogasawara <email address hidden> Mon, 13 Feb 2012 13:00:08 -0800
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Released |
Mathieu Simon (mathieu-simon) wrote : | #8 |
I'm afraid to tell that the mainline branch of Linux 3.2 has only the hv_vmbus and hv_utils moved out of staging. Only with 3.3 the biggest chunk of the Hyper-V drivers have left staging - except storvsc.
Although I see that most patches from 3.3 apply properly without problems (kinda' backporting) there are big chunks of bugfixes (possible memory leaks for hv_vmbus, kernel oops, hid-hyperv) and features (promiscuous mode and jumbo frame support) that are missing in mainline 3.2.x but present in 3.3.
How do you plan to handle this. - The 3.2 series have proven to be already quite stable but some fixes from upstream still show the drivers for network and storage have rough edges. - We don't need the quality of the HV modules as they were in 10.04 LTS (quite unstable)
Launchpad Janitor (janitor) wrote : | #9 |
This bug was fixed in the package initramfs-tools - 0.99ubuntu10
---------------
initramfs-tools (0.99ubuntu10) precise; urgency=low
* Add Hyper-V paravirtualised device drivers to the initramfs to allow
booting of stock images in a Hyper-V guest. (LP: #917135)
-- Andy Whitcroft <email address hidden> Fri, 10 Feb 2012 14:44:46 +0000
Changed in initramfs-tools (Ubuntu): | |
status: | In Progress → Fix Released |
Tim Miller Dyck (timmillerdyck) wrote : | #10 |
Hi,
I have success also with the -generic kernel image, but the -virtual kernel packages do not seem to include the hv_ drivers.
Tested with linux-image-virtual 3.2.0.17.17
# dpkg -l | grep linux-image-virtual
ii linux-image-virtual 3.2.0.17.17 Linux kernel image for virtual machines
# zcat /boot/initrd.
lib/modules/
lib/modules/
25562 blocks
==
Rebooted with the -generic kernel:
# dpkg -l | grep linux-image-generic
ii linux-image-generic 3.2.0.17.17 Generic Linux kernel image
# zcat /boot/initrd.
lib/modules/
lib/modules/
lib/modules/
lib/modules/
78921 blocks
==
Could the -virtual kernel packages get the same Hyper-V support?
Thanks,
Tim Miller Dyck
Marking as "confirmed" pending placement of the drivers into the virtual images.
Changed in linux (Ubuntu): | |
status: | Fix Released → Confirmed |
Changed in initramfs-tools (Ubuntu): | |
status: | Fix Released → Confirmed |
I've confirmed that this is in the latest kernel.
# zcat /boot/initrd.
lib/modules/
lib/modules/
lib/modules/
lib/modules/
Changed in initramfs-tools (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
hv_timesource: this is delivered by x86/kernel/ cpu/mshyperv. c and builtin HYPERV_ UTILS=m HYPERV_ MOUSE=m
hv_vmbus: delivered by hy_vmbus.ko and is modular; CONFIG_HYPERV=m
hv_utils: delivered by hy_utils and is modular; CONFIG_
hv_netvsc: delivered by hy_netvsc and is modular; CONFIG_HYPERV_NET=m
hv_mouse: delivered by hy_mouse and is modular; CONFIG_
hv_storvsc: delivered by hy_netvsc and is modular; CONFIG_HYPERV_NET=m
All of these are already enabled and available kernel side, and appear in a
completed install.
These however are not obviously included in either the default initramfs nor included in d-i.