How to determine if Mac OS X is running inside a virtual machine

I do not want my application to run on a virtual machine on a Mac. How can I detect it from my Mac application. The solutions for Windows and Linux are quite simple and are discussed in detail in other similar issues. I don't mind doing

system_profiler or ioreg

to find out. But what to look for? I am targeting Parallels, VMware Fusion and Virtual Box

+4
source share
1 answer

Search VirtualBox, Oracle, VMwareand Parallelsin the output of the following command does the job very well:

ioreg -l | grep -e Manufacturer -e 'Vendor Name'
+6
source

All Articles