How to find out if a Solaris machine is virtualized or not?

Solution 1:

If Solaris is running in a container/zone/branded zone, the command "uname -v" will say "Generic_Virtual"

Solution 2:

It may depend on the virtualization used, but if you are using the "Oracle VM for SPARC" (previously known as LDOMs) the "virtinfo" tool (in the core SUNcsu package) provides the information you're after.

For example:

user@server1> virtinfo
Domain role: LDoms control I/O service root

user@server2> virtinfo
Domain role: LDoms guest

user@zone > virtinfo

virtinfo can only be run from the global zone

user@M4000 > virtinfo
Virtual machines are not supported

user@x3650 > virtinfo
command not found

Be aware that this command's Interface Stability is classified as "Uncommited" and might be subject to modifications to the next minor release.