Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of machines and want to know how to find out if a given machine is virtualized or not. Any commands?

share|improve this question
Do you know what kind of virtualization technology they would be running on? – Chris S Jun 21 '10 at 12:40

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

share|improve this answer

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

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

share|improve this answer

For zones Only:

Top of the heap

[ "`/usr/bin/zonename`" = 'global' ] && echo "im global"

In a zone

[ ! "`/usr/bin/zonename`" = 'global' ] && echo "im in a zone"

More general purpose

If you want something more full-featured, something like this (please help with edits/feedback/flames for other hypervisors; and yes, currently many edge-cases)....

/usr/sbin/prtconf -dv | /usr/bin/egrep -i '(vmw|qemu|xen|hyper-v|openvz|virtualbox|oracle vm|parallels|virtuoso)' >/dev/null


share|improve this answer

use the prtdiag command. If you are in a zone you can see the error message prtdiag can only buy run in the global zone

if the command works you are in a real machine (real or ldom)

share|improve this answer

Does Solaris have something like lspci or /proc/cpuinfo?

Here are some examples of how other tools solve the detection:

share|improve this answer
On my KVM Solaris 10 VM, facter gets the "virtual" fact totally wrong. It does report manufacturer and productname as "Bochs", not sure how reliable that is. – Not Now Oct 12 '11 at 0:23
prtconf -dv ... see also answer of yours truly. – Barry Oct 16 '12 at 1:49

There is no single way to figure out if you are running a virtualized Solaris or not. Solaris can run on various kinds of containers (native or branded zones) regardless of the architecture. On x86/x64, Solaris can also run at least on top of VirtualBox, VMware, Xen, Parallels and probably several more. On SPARC, LDOMs on T series and Physical domains on M series

share|improve this answer

Have a look at this Perl library:

If you want to dive into the assembly way of detecting it:

And this overview of things to look for when doing it manually: .


share|improve this answer

psrinfo will give you some answers about your processor:

$ psrinfo -v
Status of virtual processor 0 as of: 07/09/10 10:41:32
  on-line since 06/01/04 13:30:59.
  The sparcv9 processor operates at 1002 MHz,
        and has a sparcv9 floating point processor.

Check out this link, it may give you more informations.

share|improve this answer
Most hypervisors pass the CPU through directly to the VM, so it would report a normal processor either way. – Chris S Jul 12 '10 at 22:19
damn! solaris is a bit new to me, and I though this could help... – petrus Jul 12 '10 at 22:30

The cfgadm command works on all Solaris systems EXCEPT non-global Zones:

cfgadm > /dev/null 2>&1

if [ $? -ne 0 ]; then
#cfgadm command failed, must be a non-global zone:
echo "This is a non-global zone".
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.