I don't want my app to be run inside a virtual machine on Mac. How can I detect it from my Mac app. The solutions for Windows and Linux are pretty simple and discussed in details in other similar questions. I don't mind executing
system_profiler
or ioreg
to find it out. But what to look for? I am targeting Parallels, VMware Fusion and Virtual Box
To boot and run macOS in a VM, you must first install a macOS image onto the new VM. Installing macOS in a new machine requires the following steps: Obtain a restore image. Set up a compatible VM configuration.
In macOS Spotlight Search Spotlight Search indexes all the files on your Mac including virtual machine bundles. Find its icon in the right top corner to begin with. Type in pvm (Parallels virtual machine) or just the machine's name.
Searching for VirtualBox
, Oracle
, VMware
and Parallels
in the output of following command does the job very well:
ioreg -l | grep -e Manufacturer -e 'Vendor Name'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With