Paresh Devalekar ??:
> Hi,
> 
> I have one requirement, where I have to check, whether machine is physical or 
> VM (virtual machine)?
> 
> Anyone have idea, how to know it? Is there is any command or function which 
> can give me this info?
> 
> Regards,
> Paresh

This is what I used a while ago to check regular Solaris vs. xVM. Hope 
it still works and helps.
As for VirtualBox, as someone else stated, not so easy.


    Step 1: issue "uname -i".
      For regular Solaris or hvm_domU, it shows "i86pc". Go to Step 2.
      For Dom0 or pv_domU, it shows "i86xpv". Go to Step 3.

    Step 2: Regular Solaris vs. hvm_domU.
      Issue "prtconf -D | grep xpv".
      For hvm_domU (since snv_89), it shows something like
             pci5853,1, instance #0 (driver name: xpv)
         xpvd, instance #0 (driver name: xpvd)
      For regular Solaris, it shows nothing.

    Step 3: Dom0 vs. pv_domU.
      Issue "prtconf -D | grep xnb" or "grep xdb".
      xnb is "network backend driver", and xdb "disk backend driver".
      For Dom0, it shows something like
        xnb, instance #0 (driver name: xnbo)
        xnb, instance #1 (driver name: xnbo)
        xnb, instance #2 (driver name: xnbo)
      or
        xdb, instance #0 (driver name: xdb)
     For pv_domU (and regular Solaris), it shows nothing.

Thanks.
--
Huafeng
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to