[systemd-devel] [PATCH 1/2] detect-virt: detect in best-heuristic order

poma pomidorabelisima at gmail.com
Thu Nov 5 01:55:28 PST 2015


On 04.11.2015 14:52, Lennart Poettering wrote:
> On Wed, 04.11.15 15:54, Andrei Borzenkov (arvidjaar at gmail.com) wrote:
> 
>> 04.11.2015 00:04, Andrew Jones пишет:
>>> afaict, this will fix a regression caused by commit 75f86906c5.
>>> Where we used to report "kvm" before that patch, without this patch,
>>> we would only report "qemu".
>>
>> Are you sure it is regression? QEMU is a program (platform) while KVM is
>> technology. Modern VirtualBox can use KVM as PV interface but it still
>> remains VirtualBox. QEMU may use KVM as PV interface but it still remains
>> QEMU.
>>
>> Where does it matter? Is anything broken because of this change?
> 
> I am pretty sure that vbox should be reported as vbox even if it uses
> kvm as backend. qemu-kvm should be reported as kvm, and any other qemu
> as qemu.
> 
> Yeah, it's not fully symmetric, but I am pretty sure that's what most
> people would expect.
> 
> Lennart
> 


Comparing with 'virt-what' it is not symmetrical, yeah.

= QEMU =

- HOST:
# /usr/bin/qemu-system-x86_64 -m 2048 -smp 2 -drive file=/iso/Rawhide-Xfce-Live-1104.iso,format=raw

- GUEST:
# dmesg -t | grep DMI
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014

# systemd-detect-virt 
vm-other

# virt-what 
qemu

~~~~~~~~~~~~~

= QEMU-KVM =

- HOST:
# /usr/bin/qemu-system-x86_64 -machine accel=kvm -m 2048 -smp 2 -drive file=/iso/Rawhide-Xfce-Live-1104.iso,format=raw

- GUEST:
# dmesg -t | grep DMI
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014

# systemd-detect-virt 
kvm

# virt-what 
kvm

~~~~~~~~~~~~~

/proc/cmdline 
BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Rawhide-Xfce-Live-1104 rootfstype=auto ro rd.live.image console=ttyS0 console=tty0 3

SW:
kernel-core-4.3.0-1.fc24.x86_64
virt-what-1.15-2.fc23.x86_64
systemd-227-4.gita6bff4a.fc24.x86_64


Ref.
http://pkgs.fedoraproject.org/cgit/virt-what.git/tree/virt-what.spec#n37
http://people.redhat.com/~rjones/virt-what




More information about the systemd-devel mailing list