C
C#•11mo ago
JimmahDean

How can I detect if my app is being run on a VM?

I have an app for gathering various system information from hardware to event logs to assist in troubleshooting for the Reddit /r/TechSupport discord server. Occasionally, people run it on a VM which gives unreliable information and it is not immediately recognizable it's a VM. Is there a way to determine if the app is being run on a virtual machine?
4 Replies
Denis
Denis•11mo ago
CodeProject
Detect if your program is running inside a Virtual Machine
An article showing how you can programmatically check if your code is running inside a virtual machine (such as VPC or VMWare).
Denis
Denis•11mo ago
Here is what I've found what is not relying on a powershell script Question is whether you need this to be cross platform or windows only
jcotton42
jcotton42•11mo ago
I would personally just have a "are you running in a VM? and if so which one" question
JimmahDean
JimmahDeanOP•11mo ago
this is wild and i love it thanks 🙂 it's generally assumed that the people we're helping are either not smart enough to run a vm, or smart enough to know the potential problems with vm's. it's not very common that people run it on vm's but it's happened enough that it would be helpful for the app to recognize it
Want results from more Discord servers?
Add your server