Reputation: 4882
Is there a way to find out if the (linux) system that I'm logging into is a host or a VM? Any symptoms that I can look at via the shell or any other utility (of a VM)?
Upvotes: 1
Views: 163
Reputation: 473
you can use the perl module Sys::Detect::Virtualization here
use Sys::Detect::Virtualization;
my $detector = eval { Sys::Detect::Virtualization->new() };
if( $@ ) {
print "Detector may not be supported for your platform. Error was: $@\n";
}
my @found = $detector->detect();
if( @found ) {
print "Possible virtualized system. May be running under:\n";
print "\t$_\n" for @found;
}
Upvotes: 0
Reputation: 31274
there's a number if scripts available, that try to detect the presence of virtualisation. e.g. virt-what, but i guess there is no generic solution for your problem.
Upvotes: 1
Reputation: 6729
You can check the Drivers which has been loaded incase of full Virtualization environemnt such as VMware. using lspci,lsmod, ... etc. or you can use dmesg to get this kind of information.
Upvotes: 1