Comment 7 for bug 1952599

Revision history for this message
Gauthier Jolly (gjolly) wrote :

Hi there,

I used this[0] script to test the different series. The most relevant parts of it are those parameters for qemu:

-smbios type=0,vendor='Hyper-V test',version=1.2.3 \
-smbios type=1,manufacturer=t1manufacturer,product=t1product,version=t1version,serial=t1serial,uuid=11111111-1111-1111-1111-111111111111,sku=t1sku,family=t1family \

You can read more about them here[1]. In short, it configures the DMI table as follows:

ubuntu@impish:~$ cat /sys/class/dmi/id/product_name
t1product
ubuntu@impish:~$ cat /sys/class/dmi/id/sys_vendor
t1manufacturer
ubuntu@impish:~$ cat /sys/class/dmi/id/bios_vendor
Hyper-V test
ubuntu@impish:~$ cat /sys/class/dmi/id/product_version
t1version

Thus, the old systemd should not detect any virt ("none") and the new one should detect "microsoft"[2].

Test results:

Bionic
======

ubuntu@bionic:~$ dpkg -l systemd ; systemd-detect-virt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================================================-================================-================================-=================================================================================================================
ii systemd 237-3ubuntu10.52 arm64 system and service manager
none
ubuntu@bionic:~$ sudo apt-get install -y systemd
...
ubuntu@bionic:~$ dpkg -l systemd ; systemd-detect-virt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================================================-================================-================================-=================================================================================================================
ii systemd 237-3ubuntu10.53 arm64 system and service manager
microsoft

Focal
=====

ubuntu@focal:~$ dpkg -l systemd ; systemd-detect-virt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-=================================
ii systemd 245.4-4ubuntu3.13 arm64 system and service manager
none
ubuntu@focal:~$ sudo apt-get install -y systemd
...
ubuntu@focal:~$ dpkg -l systemd ; systemd-detect-virt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-=================================
ii systemd 245.4-4ubuntu3.14 arm64 system and service manager
microsoft

Impish
======

ubuntu@impish:~$ dpkg -l systemd ; systemd-detect-virt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-==============-============-=================================
ii systemd 248.3-1ubuntu8 arm64 system and service manager
none
ubuntu@impish:~$ sudo apt-get install -y systemd
...
ubuntu@impish:~$ dpkg -l systemd ; systemd-detect-virt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-================-============-=================================
ii systemd 248.3-1ubuntu8.1 arm64 system and service manager
microsoft

[0] https://pastebin.canonical.com/p/WCqqyCK7Qj/
[1] https://gist.github.com/smoser/290f74c256c89cb3f3bd434a27b9f64c
[2] https://github.com/systemd/systemd/blob/main/src/basic/virt.c#L144-L193