Paresh Devalekar wrote:

>Hi,
>
>I have one requirement, where I have to check, whether machine is physical or 
>VM (virtual machine)?
>  
>

 From my use of various VM's (vmware, virtualbox), the most obvious giveaway
is the name of the physical disk devices.

On my desktop, I see:
gda: [ID 243001 kern.info] Disk1:     <Vendor 'Gen-ATA ' Product 
'ST3250823AS     '>

e.g. if Solaris was running under VMWare, the vendor changes as does the 
product,
even if the entire physical device is given to the VM.

The next most obvious way, if you're running in the kernel, is to try and
execute a VM-privleged operation and see whether or not it works or
you get a trap.  But that only works with CPUs that support such operations.

Inside a zone is easy - zonename won't be "global".

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to