Suppose I have logged in through sshto a given Linux machine, knowing nothing about it.
How can I quickly check what virtual environment (VMWare, VirtualBox, LXC, etc., if any) is currently running on this machine?
Suppose I have logged in through sshto a given Linux machine, knowing nothing about it.
How can I quickly check what virtual environment (VMWare, VirtualBox, LXC, etc., if any) is currently running on this machine?
If you're logging into a Virtual Machine, some of the hardware listed should be related to that Virtual Machine. Using a command like dmidecode | grep VMware should let you see if you're logged into a VM from VMware.
If you're not sure about what VM are you looking for, you could use just dmidecode | head -n 40 just to take a look at the system manufacturer, which should be a VM name if the system is running on one.
There are multiple ways to test it.
1) dmesg |grep -i hypervisor detected ==> Hypervisor detected: VMware
2) dmidecode -s system-product-name ==> VMware Virtual Platform
These should work on most of the linux kernels