systemd-detect-virt can return qemu, which we support#1325
Conversation
TheRealFalcon
left a comment
There was a problem hiding this comment.
Nit: since there's formatting issues anyway, in "set of things" isn't a convention I've seen many times. Usually it's a list or tuple.
|
I'd expect that at least the commit message could say "Even once the detection fixed in systemd cloud-init treads emulated (TCG) virtualization the same way as virtualized (KVM) anyway. If systemd (see issue ...) decides to report this as something else then KVM/Qemu we'll need to extend our list of accepted types to include that as well". Furthermore since this discussion made me see the code - depending on my minimal understanding what you use Example: on s390x you define |
|
Oh and for this very purpose - maybe |
My personal feeling is that specific is better. When LXD runs a VMware guest you can add it here. That’s preferable to false-positive on a known invalid case now. And, hello @cpaelzer |
@cpaelzer: I think I captured your suggestion in the latest updated "commit message". Agreed, context in the git log is important here.
@cpaelzer: Thanks for noticing this discrepancy. I'll do some archeology and check if our assumptions are valid.
@cpaelzer @smoser I don't think we want to do this. We will still have to check for valid types with More importantly, [1] https://github.com/systemd/systemd/blob/main/src/detect-virt/detect-virt.c#L163 |
|
I'm going to merge this as-is. I'm creating an additional card in Jira to follow up on @cpaelzer 's questions. |
|
Update: Systemd was updated to report "kvm" with hv_passthrough in systemd/systemd#22945. No further changes should be necessary; the current code should continue to work. |
See:
https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go#L1268
systemd/systemd#22709