|
|
Since VMware ESX is an operating system, I would not judge a server's group membership by the presence of an rpm, rather than by the kernel, but thats just me.
You are right, uname does not output what I stated in the previous email, it reports Linux and the vmnix kernel.
"VMware ESX Server 2.1.2 Kernel 2.4.9-vmnix2 on an i686" is actually what is in /etc/issue and I imagine what cfengine is looking for to determine if it is an ESX server, and what version. Thanks for pointing that out, I was a little hasty.
now that we got that straightened out, why does your machine register as an ESX box? Well if cfengine is truly just running 'stat' on the /etc/issue then everything is going to be an ESX server. So that begs the question, what is in your /etc/issue ?
the actual ESX version function is as follows (according to my source http://eternity.iu.hio.no/viewcvs/trunk/src/misc.c?rev=207 )
int ESX_version(void)
{ FILE *fp; char buffer[CF_BUFSIZE];
if ((fp = fopen("/etc/issue","r")) == NULL)
{ return 1; }
fgets(buffer,sizeof(buffer), fp); AddClassToHeap(CanonifyName(buffer));
So is there anything weird in your /etc/issue?
On 3/10/06, Littlefield, Larry <larry.littlefield@xxxxxxxxxxxx
> wrote:If you are looking to determine if you are in the instance of a VMware,
the only thing I can find are 2 processes running: root 704 1 0 Feb28 ? 00:01:33 [vmmemctl] root 722 1 0 Feb28 ? 00:35:40 /usr/sbin/vmware-guestd --background /var/run/vmware-
guestd.pid And a status command that returns stuff: root@wvdcfe01 # /usr/sbin/vmware-checkvm VMware software version 6 (good)
If your looking for a host that makes VMware available, then finding the
rpm may help. Inside the instance (that's all I have access to) does not show an rpm. Larry
-----Original Message----- From: bug-cfengine-bounces+larry.littlefield=
cingular.com@xxxxxxx [mailto:bug-cfengine-bounces+larry.littlefield=cingular.com@xxxxxxx] On Behalf Of Jamie McKnight Sent: Friday, March 10, 2006 5:12 PM
To: Scott Lackey Cc: bug-cfengine@xxxxxxx Subject: Re: 2.1.19p1 misidentifies if server is VMWare ESX
Scott,
In our VMware ESX 2.5.1 environment, we do show a VMware-esx rpm
installed and rpm -q --qf %{VERSION} VMware-esx returns 2.5.1. Possibly something added between 2.1.2 and 2.5.1?
I don't have access to any of those systems from where I am at the current time or I could check the uname -a output on ESX
2.5.1. I am about 75% certain that it doesn't print out anything like "VMware ESX". I do remember that the kernel version does have "vmnix" in it. It will be Monday at the earliest before I can verify that for you.
Jamie
On Fri, 2006-03-10 at 18:09 -0500, Scott Lackey wrote: > Wow, yeah that looks a little weird. I'm going to see if I can > reproduce that. > There really is no ESX rpm though, if its an ESX server, it should be
> checking for the Vmware kernel. like > "VMware ESX Server 2.1.2 Kernel 2.4.9-vmnix2 on an i686" > as output of uname -a or something of that nature. > > -Scott Lackey > cfengine support
> > > On 3/6/06, Jamie McKnight <warthog@xxxxxxxxxxxxxxxxxxxx> wrote: > > During testing of 2.1.19p1 I noticed that the class VMWare_ESX
> was defined > on a machine that was not an ESX image or server. Looking at > misc.c, it > appears that if you can stat /etc/issue, cfengine defines the > VMWare_ESX
> class. > > src/misc.c: > > 836 if (stat("/etc/issue",&statbuf) != -1) > 837 { > 838 Verbose("\nThis appears to be a VMWare ESX system.\n");
> 839 AddClassToHeap("VMWare_ESX"); > 840 ESX_version(); > 841 } > > Shouldn't that be checking for the existence of the VMware-esx > rpm, or the
> existence of the /etc/vmware directory, and not relying on > stat'ing > /etc/issue? We drop /etc/motd and /etc/issue files on every > host that > print out a big warning banner.
> > If I need to provide more info please let me know. > > > Jamie > > > > _______________________________________________ > Bug-cfengine mailing list
> Bug-cfengine@xxxxxxx > http://lists.gnu.org/mailman/listinfo/bug-cfengine >
> > > -- > -Scott
_______________________________________________ Bug-cfengine mailing list Bug-cfengine@xxxxxxx
http://lists.gnu.org/mailman/listinfo/bug-cfengine
-- -Scott
|
|