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
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 \ manufacturer= t1manufacturer, product= t1product, version= t1version, serial= t1serial, uuid=11111111- 1111-1111- 1111-1111111111 11,sku= t1sku,family= t1family \
-smbios type=1,
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 dmi/id/ sys_vendor dmi/id/ bios_vendor dmi/id/ product_ version
t1product
ubuntu@impish:~$ cat /sys/class/
t1manufacturer
ubuntu@impish:~$ cat /sys/class/
Hyper-V test
ubuntu@impish:~$ cat /sys/class/
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 Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ======= ======= ======= ======= ======= ==-==== ======= ======= ======= ======= -====== ======= ======= ======= =====-= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ======= ======= ======= ======= ======= ==-==== ======= ======= ======= ======= -====== ======= ======= ======= =====-= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= =======
Desired=
| Status=
|/ Err?=(none)
||/ 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=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii systemd 237-3ubuntu10.53 arm64 system and service manager
microsoft
Focal
=====
ubuntu@focal:~$ dpkg -l systemd ; systemd-detect-virt Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ====-== ======= ======= =-===== ======= -====== ======= ======= ======= ====== Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ====-== ======= ======= =-===== ======= -====== ======= ======= ======= ======
Desired=
| Status=
|/ Err?=(none)
||/ 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=
| Status=
|/ Err?=(none)
||/ 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 Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ====-== ======= =====-= ======= ====-== ======= ======= ======= ======= === Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ====-== ======= ======= -====== ======- ======= ======= ======= ======= =====
Desired=
| Status=
|/ Err?=(none)
||/ 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=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii systemd 248.3-1ubuntu8.1 arm64 system and service manager
microsoft
[0] https:/ /pastebin. canonical. com/p/WCqqyCK7Q j/ /gist.github. com/smoser/ 290f74c256c89cb 3f3bd434a27b9f6 4c /github. com/systemd/ systemd/ blob/main/ src/basic/ virt.c# L144-L193
[1] https:/
[2] https:/