From: mannu on
Hello,

Is there a way to know if solaris operating system is running as a
guest virtual machine on
a physical host ?

There is a utility "virt-what" from redhat that does the above job for
linux. Is there any
similar utility for solaris ?

Thanks and Regards,
Manish Singh.
From: webjuan on
On Apr 22, 8:21 am, mannu <manishsingh...(a)gmail.com> wrote:
> Hello,
>
> Is there a way to know if solaris operating system is running as a
> guest virtual machine on
> a physical host ?
>
> There is a utility "virt-what" from redhat that does the above job for
> linux. Is there any
> similar utility for solaris ?
>
> Thanks and Regards,
> Manish Singh.

There are several ways but the easiest is to log into the virtual (aka
Solaris Zone) and run:

# /usr/bin/zonename

If you get "global" then you are obviously on a global zone (physical
machine). If you get a hostname back, then you are on a virtual.
Keep in mind that the virtual (non-global) was purposely designed to
not know anything about the global.

juan martinez
From: mannu on
On Apr 22, 5:44 pm, webjuan <webj...(a)gmail.com> wrote:
> On Apr 22, 8:21 am, mannu <manishsingh...(a)gmail.com> wrote:
>
> > Hello,
>
> > Is there a way to know if solaris operating system is running as a
> > guest virtual machine on
> > a physical host ?
>
> > There is a utility "virt-what" from redhat that does the above job for
> > linux. Is there any
> > similar utility for solaris ?
>
> > Thanks and Regards,
> > Manish Singh.
>
> There are several ways but the easiest is to log into the virtual (aka
> Solaris Zone) and run:
>
> # /usr/bin/zonename
>
> If you get "global" then you are obviously on a global zone (physical
> machine).  If you get a hostname back, then you are on a virtual.
> Keep in mind that the virtual (non-global) was purposely designed to
> not know anything about the global.
>
> juan martinez

Hello juan,

Thankyou for the reply.

There are certain things that are not clear still:

1. In my solaris 8 non global zone (virtual machine), zonename command
is not present.
zonename command is present in the global zone (physical machine).
Hence there will
be difficulty to run zonename from virtual machine.

2. I need to know in general (not just confined to solaris zones),
regardless of any
virtualization software like vmware, xen, virtual pc, qemu,
solaris zones etc,...
whether operating system is running as a virtual machine on top of
a physical host.

Thanks and Regards,
Manish Singh.
From: mannu on
On Apr 23, 3:07 am, j...(a)sdsc.edu (Jeff Makey) wrote:
> The most portable and reliable way I have found to determine whether
> or not a process is in the global zone is to look for process 1 (with
> ps or in /proc).  If you can see PID 1 then you are in the global
> zone; if not you are in a non-global zone.
>
>                              :: Jeff Makey
>                                 j...(a)sdsc..edu
>
> Department of Tautological Pleonasms and Superfluous Redundancies Department

Hello,

Thankyou all for helpful insights.

I am not aware what is ACPI strings and how to get that ?

One of the ways as already been discussed is to get manufacturer list
of
hardwares of computer and grep for the virtual machine organization
names.

Issue is that how we can get list of manufacturers for hardwares of
computer
like cpu, disk, memory, and so on ?

One more possible way is if scsi inquiry on disk gives vendor
details including
name of manufacturer having virtual machine organization name. I have
verified this
on solaris x86 virtual machine running on vm ware ESX using format
command's
"inquiry" menu:

format> inquiry
Vendor: VMware
Product: Virtual disk
Revision: 1.0
format>


This brings up another issue, if disk is not scsi, let us say IDE,
SATA or other, then we cannot do inquiry to
get vendor information. Here in these cases, how to get vendor
information?


From: Chris Ridd on
On 2010-04-23 05:25:25 +0100, mannu said:

> On Apr 23, 3:07�am, j...(a)sdsc.edu (Jeff Makey) wrote:
>> The most portable and reliable way I have found to determine whether
>> or not a process is in the global zone is to look for process 1 (with
>> ps or in /proc). �If you can see PID 1 then you are in the global
>> zone; if not you are in a non-global zone.
>>
>> � � � � � � � � � � � � � � �:: Jeff Makey
>> � � � � � � � � � � � � � � � � j...(a)sdsc.edu
>>
>> Department of Tautological Pleonasms and Superfluous Redundancies Department
>
> Hello,
>
> Thankyou all for helpful insights.
>
> I am not aware what is ACPI strings and how to get that ?

On Solaris 10 and OpenSolaris you can run smbios to get this info. At
least it *looks* like this info; certainly it tells you about all the
manufacturer/product strings that are embedded in the BIOS. eg Solaris
10 inside VMware:

% smbios|grep VMware
Manufacturer: VMware, Inc.
Product: VMware Virtual Platform
Serial Number: VMware-56 4d 6d f3 ac d3 e0 20-df 74 70 9e 16 cf da bd
VMware SVGA II

--
Chris

 |  Next  |  Last
Pages: 1 2
Prev: Solaris 2.x?
Next: How to make image from HDD?