Prev: Solaris 2.x?
Next: How to make image from HDD?
From: CH on 24 Apr 2010 20:38 "mannu" <manishsinghhyb(a)gmail.com> wrote in message news:48d2d884-139a-4ecc-86d7-10e5a4d2655c(a)n20g2000prh.googlegroups.com... 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. Uname -a or uname -m should give you all you ned in a Solaris 8 contrainer to know that it's is in fact a container versus a physical machine.
From: Ian Collins on 24 Apr 2010 20:59 On 04/25/10 12:38 PM, CH wrote: > > 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. Solaris 8 pre-dates most virtualisation technologies, so it isn't aware of them. So you can't expect a Solaris 8 system to have a direct means of determining this. > 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. Obvious question: why? -- Ian Collins
From: Richard L. Hamilton on 3 May 2010 05:25
In article <7b9362a1-4431-44ce-b7d7-7ee22f21afe6(a)c21g2000yqk.googlegroups.com>, webjuan <webjuan(a)gmail.com> writes: > On Apr 22, 8:21=A0am, 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 That's just a zone though - a lightweight thing, not full virtualization. One could also be running an LDOM on a CoolThreads box. Or on x86, running under Xen, VirtualBox, VMware, and probably others. In zones and paravirtualized environments, there would be something about the environment itself that would clearly give it away. Everything else, one would have to look at details of device attributes and such, on a pretty much case-by-case basis, I would think. So there's probably a separate way to tell for each different way of doing the virtualization, but no one way to answer that question for all of them. |