Skip to content

Conversation

@mika
Copy link
Member

@mika mika commented Sep 16, 2025

virt-what v1.27-1 as present in Debian/trixie might return both virtualbox and kvm when being invoked inside a VirtualBox VM (v7.1.12-dfsg-2 on Debian/trixie with kernel 6.12.43+deb13-amd64):

  # virt-what --version
  1.27

  # virt-what
  virtualbox
  kvm

virt-what reads /sys/firmware/dmi/tables/DMI to properly identify VirtualBox, but also executes /usr/libexec/virt-what-cpuid-helper, which reports KVMKVMKVM, and therefore seems to report both of them.

We don't have any actual automation for KVM usage, while all the VirtualBox support (e.g. for shared folders) isn't executed, because its reported as KVM VM, instead of VirtualBox. Adjust order of virt-what check accordingly to fix this.

@mika mika requested review from evgeni, jkirk and zeha September 16, 2025 12:28
Copy link
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me as a workaround

is there a bugreport against virt-what? returning two results seems counter-intuitive for the tool.

@github-actions
Copy link

🐳 Docker image for this PR is available:

docker pull ghcr.io/grml/grml-live:pr-435

@github-actions
Copy link

github-actions bot commented Sep 16, 2025

@mika
Copy link
Member Author

mika commented Sep 16, 2025

makes sense to me as a workaround

is there a bugreport against virt-what? returning two results seems counter-intuitive for the tool.

couldn't find one yet, will certainly try to report one, thanks :)

@guillemj
Copy link

I tried on a Debian trixie VM inside a Debian sid host (with VirtualBox 7.2.0-dfsg-3 running Linux 6.12.38+deb13-amd64). And I only get "virtualbox" as output, the cpuid helper returns nothing. That is even when running VirtualBox with kvm and kvm_intel and withouth either of those modules loaded in the host system.

Copy link
Member

@zeha zeha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the change wants a comment rederencing the PR and/or an explanation

@mika
Copy link
Member Author

mika commented Sep 17, 2025

Reported as https://bugs.debian.org/1115469 and even traced it further down, quoting myself from bug report towards Debian:

The Paravirtualization Interface configuration of the VM is set to "KVM" (with "Hardware Virtualization: [x] Enable Nested Paging"). When changing this setting to "Legacy", virt-what no longer reports both "virtualbox" and "kvm", but only "virtualbox".

@zeha
Copy link
Member

zeha commented Oct 10, 2025

@mika do you want to merge this?

virt-what v1.27-1 as present in Debian/trixie might return
both virtualbox *and* kvm when being invoked inside a VirtualBox
VM (v7.1.12-dfsg-2 on Debian/trixie with kernel 6.12.43+deb13-amd64):

  # virt-what --version
  1.27

  # virt-what
  virtualbox
  kvm

virt-what reads /sys/firmware/dmi/tables/DMI to properly identify
VirtualBox, but also executes /usr/libexec/virt-what-cpuid-helper, which
reports `KVMKVMKVM`, and therefore seems to report both of them.

We don't have any actual automation for KVM usage, while all the
VirtualBox support (e.g. for shared folders) isn't executed, because its
reported as KVM VM, instead of VirtualBox. Adjust order of virt-what
check accordingly to fix this.

See https://bugs.debian.org/1115469
@mika
Copy link
Member Author

mika commented Oct 10, 2025

@mika do you want to merge this?

yes, just polishing the commit message with the Debian BTS and will merge it then, thx! :)

@mika mika enabled auto-merge October 10, 2025 12:55
@mika mika added this pull request to the merge queue Oct 10, 2025
Merged via the queue into master with commit 8ec7758 Oct 10, 2025
37 checks passed
@mika mika deleted the mika/vbox branch October 24, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants