Is there a way to hide the fact that the guest OS is running on a virtual machine?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
N00bie_Programmer
Posts: 2
Joined: 21. Aug 2017, 17:50

Is there a way to hide the fact that the guest OS is running on a virtual machine?

Post by N00bie_Programmer »

I am trying to passthrough an NVIDIA GPU to a guest OS (Windows 10) from Linux host machine.

Although the passthrough was successful, the NVIDIA driver installed on the guest OS seems to detect that the OS is running on a virtual machine and prevent itself from running correctly (error code 43 appears on the NVIDIA driver).

When I was testing the same passthrough on QEMU/KVM, I was able to hide the fact that the OS is running on a VM environment by setting

Code: Select all

<kvm>
    <hidden state='on'>
</kvm>
to the virtual machine configuration (Hypervisor features section on libvirt Domain XML format documentation).

After that, the NVIDIA driver was working correctly.

Is there a feature in VirtualBox that does the similar work?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is there a way to hide the fact that the guest OS is running on a virtual machine?

Post by mpack »

N00bie_Programmer wrote: When I was testing the same passthrough on QEMU/KVM, I was able to hide the fact that the OS is running on a VM environment by setting

Code: Select all

<kvm>
    <hidden state='on'>
</kvm>
I don't know what that KVM option is doing, but if an application wants to detect a VM - and the programmer was halfway competent - then it's impossible to prevent it. Of course an individual app may do a poor job of VM detection, but there's no way for anyone here to know what checks your NVidia driver does. You'd have to ask NVidia.
N00bie_Programmer
Posts: 2
Joined: 21. Aug 2017, 17:50

Re: Is there a way to hide the fact that the guest OS is running on a virtual machine?

Post by N00bie_Programmer »

I did some research on what that code block does in QEMU/KVM.

It seems setting kvm's hidden state to 'on' adds 'kvm=off' option to '-cpu' command (https://www.redhat.com/archives/libvir- ... 00744.html).

When 'kvm=off' parameter is given, the KVM hypervisor signature is hidden from the guest so that the VM can pass the NVIDIA driver's VM detection algorithm.

This was the only change made in QEMU/KVM-based VM and the NVIDIA driver worked correctly in the guest OS.

Is there a similar method in VirtualBox to hide the hypervisor signature from the guest OS?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is there a way to hide the fact that the guest OS is running on a virtual machine?

Post by mpack »

I'm not even sure what a hypervisor signature is. You have control over various DMI strings which are passed to the guest, some of which may mention VirtualBox.
Post Reply