Jump to content

Gaming VM - "Cannot run under Virtual Machine" error when Launching game.


Recommended Posts

Hello guys. I hope you're all doing fine !
I have a quick question to make for someone who might have a solution !

 

- - - - - - - - - - - - - -

 

Some info:
I followed SpaceInvaderOne's guides (PRICELESS), and advice from other users, and posts in this forum, and I've put together my second UnRaid build with the intent to use it as a daily with Dual gaming VMs for me and my wife. 

Things are working GREAT. I've setup everything, and both VMs are running flawlessly with GPU Passthroughs. 

I even tried several games, and they seem to be working flawlessly as well. 
 


The Problem: 

I tried to launch a game called "RUST" today, (which by the way is the game me and my wife mostly play together), and when the anti-cheat software was "loading" I got the error message: "Cannot run under Virtual Machine".   
Which does make sense at first, but what drives me crazy, is that the game was launching perfectly fine up until yesterday, and I didn't notice any update to be honest.

 

My Question:

Does anyone know if we can somehow trick the software, into thinking it's running on a normal machine ? 


PS. Or is there possibly something wrong with MY VM ? Although I changed nothing since yesterday when it was working. :D 
I've also attached a photo with the error message.

rust.PNG

Link to comment

after a ton of research i have figured it out my man.

under <os> put

<smbios mode='host'/>

directly below that put this under <features>

<kvm>
  <hidden state='on'/>
</kvm>

under <cpu mode ='host-passthrough'....... put

<feature policy='disable' name='hypervisor'/>

 

and i also deleted any lines pertaining to hyper-v

 

now go forth and make some plays

Edited by shakinbacon
Link to comment
13 hours ago, shakinbacon said:

after a ton of research i have figured it out my man.

under <os> put

<smbios mode='host'/>

directly below that put this under <features>

<kvm>
  <hidden state='on'/>
</kvm>

under <cpu mode ='host-passthrough'....... put

<feature policy='disable' name='hypervisor'/>

 

and i also deleted any lines pertaining to hyper-v

 

now go forth and make some plays

 

Gonna Check this out right when I get home !
If this works I'm gonna buy you a beer ! ❤️

Link to comment
20 hours ago, shakinbacon said:

after a ton of research i have figured it out my man.

 

So !   [updates] 

1:  I've added those 3 lines in my XML, and by ONLY adding those 3, my VM "starts" but I get a black screen. It's not a passthrough problem, because I also get a black screen on my Remote Desktop app. I use "Parsec". What's strange though, is that parsec sees the computer as "online" seconds after it boots, as if it's working normally in the background. Strange. 

2:  Under <features> if I completely remove the following lines (since you said "and i also deleted any lines pertaining to hyper-v"):

<hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>

the VM boots up and works normally, but I can ONLY save the VM template in "XML View". If I switch to "Form View" and save, I get the error message: 

image.png.2508fcf4b2b15032e6cb2831332fb05e.png

 

3: If though, I only add the first two you suggested:

<smbios mode='host'/>

<kvm>
  <hidden state='on'/>
</kvm>

remove the <hyperv mode...> part, but keep the  

<feature policy='disable' name='hypervisor'/>

out of the XML as well, then I can switch back to form view, I can save, It boots, and the game works.

 

 

So my question is, do you actually now by any chance what this last line does ? It disables the "hypervisor" or something ? 
And if I skip adding it, will something bad happen ? 


plus, what about the whole part we had to delete ? Why is it there in the first place ? 
 

So many questions, so little knowledge I possess. :( 

Link to comment
2 hours ago, bonamin said:

I can ONLY save the VM template in "XML View". If I switch to "Form View" and save, I get the error message: 

Form view is sort of broken, it tries to ensure the XML code is valid, but it doesn't know all the acceptable entries, so if you make a change in XML that it doesn't understand, it wipes it out or errors. Stay in XML view once you customize a VM using XML.

 

Take a look at all the options and combinations available, and you'll have a sense of why things are as they are. Form view is there to give a good base, hopefully 90% of VM's can be run from there, but the customizations available in the raw XML are almost endless.

https://libvirt.org/formatdomain.html

Link to comment
5 hours ago, JonathanM said:

Form view is sort of broken, it tries to ensure the XML code is valid, but it doesn't know all the acceptable entries, so if you make a change in XML that it doesn't understand, it wipes it out or errors. Stay in XML view once you customize a VM using XML.

 

Oh I didn't know that. Thanks !

 

The only thing that made me "want" the Form View, is the fact that I can super easily change how many cores and RAM I have assigned to my machine. 

[ Quick Talk - Not important :D

I've built this box, only with Dual Gaming VMs in mind, for me and my wife, since it didn't make sense buying a whole separate PC for her. When my wife isn't gaming with me (on RUST 90%) she most likely listens to music, browses the web, watches a movie on Emby or Netflix or spends our money on eBay and clothes. :D
So the idea was, once we decide to game, Split the CPU and RAM in half, (or 60-40
:D) and play.
Once we are done, give her a couple of cores, and about 8-10Gigs of RAM, and give my VM the full power of that beefy CPU. 


Anyway, many many thanks for your advice guys. 
I REALLY hope that EAC doesn't figure out we are trying to hide the VM from it and bans us. :( 

Good Day everyone. ❤️
 Cheers. 

Link to comment
  • 2 weeks later...
  • 5 months later...
  • 3 months later...

Guys, an update for the anti-cheat battleye was released some time ago, this solution no longer works for it. battleye affects a decent number of games. You can select: DayZ, PlayerUnknown’s Battlegrounds, Escape from Tarkov, Fortnite Battle Royale, Mount & Blade II: Bannerlord, and also Tibia, Arma 2, PlanetSide 2, Arma 3, Rainbow Six Siege, Heroes & Generals, Ark: Survival Evolved, Unturned, Destiny 2, Z1 Battle Royale, PlanetSide Arena, Watch Dogs: Legion.

 

It would be nice to find some solution to hide the virtual machine from the anti-cheat.

Link to comment
  • 1 month later...
  • 1 month later...
On 8/28/2022 at 7:37 AM, shakinbacon said:

after a ton of research i have figured it out my man.

under <os> put

<smbios mode='host'/>

directly below that put this under <features>

<kvm>
  <hidden state='on'/>
</kvm>

under <cpu mode ='host-passthrough'....... put

<feature policy='disable' name='hypervisor'/>

 

and i also deleted any lines pertaining to hyper-v

 

now go forth and make some plays

This worked for me!

Link to comment
  • 2 months later...
On 9/3/2023 at 12:51 PM, guyverjab said:

This worked for me!

 

Hey there,

 

Confirming this also worked for me recently. Windowss 11 VM, GTX3070 Passthrough and can now play Fortnite successfully. Performance of the VM in general seems unaffected, so will incorporate this into my templates going forward.

 

Thank you for the tips here!

 

Regards,

 

Xav.

Link to comment
On 11/7/2023 at 8:46 PM, threatening-journeyman6134 said:

This no longer works as of today. EAC clears but you get kicked from the match with battleye

 

Yes! I know :( Loaded up the game to play with my son and was booted from the match about 45 seconds in - seems like the detection has been updated and the settings no longer work. Haven't been an avid gamer for years, and not kept up with it - why would running in a VM be an issue? Is this the way certain hacks/cheats are made? I'm just playing on a different setup and want to use the same hardware for different things!

 

The performance was great, the gametime was fun.

 

Guess I'm searching to beat BattleEye, or find another combination of setting that hides the VM status.

 

Regards,

 

Xav.

Link to comment
7 hours ago, xavierda said:

Is this the way certain hacks/cheats are made?

Yes

7 hours ago, xavierda said:

I'm just playing on a different setup and want to use the same hardware for different things!

I agree 100%, but stupid software houses don't understand this; instead of programming some serious anticheating software they only check if you're running the game in a vm.

Link to comment
  • 1 month later...
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...