Azure: Fix Azure vendor ID

Bug #2036600 reported by Tim Gardner
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
Medium
Tim Gardner
Focal
Invalid
Medium
Tim Gardner
Jammy
Invalid
Medium
Tim Gardner
Lunar
In Progress
Medium
Tim Gardner
Mantic
In Progress
Medium
Tim Gardner

Bug Description

SRU Justification

[Impact]

The linux-azure 6.2 kernel doesn't report a correct GUEST_ID

There is a mistake in the commit (https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/jammy/commit/?id=5dd24f2df3280d4354641f4687dbb36e418e7de8) :

Before the commit, the good guest_id is 0x8180000602100000.

With the commit, the generated guest_id is incorrect: 0x0080000602100000, i.e. the 0x81 from bit 56~63 are dropped.

See "include/asm-generic/hyperv-tlfs.h" for the definition of the bits:
* Bit(s)
* 63 - Indicates if the OS is Open Source or not; 1 is Open Source

* 62:56 - Os Type; Linux is 0x100 !!!!! Dexuan: this should be 0x1. I'll post a patch to LKML to fix this typo.

* 55:48 - Distro specific identification
* 47:16 - Linux kernel version number
* 15:0 - Distro specific identification

See https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/tlfs ("February, 2020: Released Version 6.0b", page 15)

As a result, the host thinks that the VM is not an open-source OS, and it's not Linux. Consequently, the "VM Availability" fron Azure portal is 0 (unhealthy): some users rely on the info to manage their VMs, e.g. if the VM is erroneously reported "unhealthy", the VM may be killed and re-created, and the new VM is still "unhealthy", and the VM may be killed and re-created again...

Please consider integrating the below fix ASAP. This affects regular VMs, and I think this affects CVMs as well.

The fix should be:

diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h
@@ -135,7 +135,7 @@ union hv_reference_tsc_msr {
*
*/

-#define HV_LINUX_VENDOR_ID 0x80 /* Canonical */
+#define HV_LINUX_VENDOR_ID 0x8180 /* Canonical */

[Test Plan]

Microsoft tested

[Regression Potential]

VMs could be misclassified.

[Other Info]

SF: #00368936

Tim Gardner (timg-tpi)
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 2036600

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Tim Gardner (timg-tpi) wrote :
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Focal):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Medium
status: New → In Progress
Changed in linux (Ubuntu Jammy):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Medium
status: New → In Progress
Changed in linux (Ubuntu Lunar):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Medium
status: New → In Progress
Changed in linux (Ubuntu Mantic):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Medium
status: Incomplete → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :
Changed in linux (Ubuntu Focal):
status: In Progress → Invalid
Changed in linux (Ubuntu Jammy):
status: In Progress → Invalid
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/6.2.0-1017.17 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-azure' to 'verification-done-lunar-linux-azure'. If the problem still exists, change the tag 'verification-needed-lunar-linux-azure' to 'verification-failed-lunar-linux-azure'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-azure-v2 verification-needed-lunar-linux-azure
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/6.5.0-1009.9 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-mantic-linux-azure' to 'verification-done-mantic-linux-azure'. If the problem still exists, change the tag 'verification-needed-mantic-linux-azure' to 'verification-failed-mantic-linux-azure'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-mantic-linux-azure-v2 verification-needed-mantic-linux-azure
Tim Gardner (timg-tpi)
tags: added: verification-done-lunar-linux-azure verification-done-mantic-linux-azure
removed: verification-needed-lunar-linux-azure verification-needed-mantic-linux-azure
Revision history for this message
Tord Liljeholm (tord-liljeholm) wrote :

We use the Ubuntu Server 22.04 LTS image from Azure Marketplace in several virtual machine scale sets. The vmss's are marked as Unhealthy due to the bug. The product id in Azure Marketplace is "0001-com-ubuntu-server-jammy" and I wonder if the patch being discussed here will apply to that image on Azure Marketplace? I get the impression that jammy version is excluded.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.