Chris Edillon wrote:
Mark Burgess wrote:

Ok - the approach I am setting on for now is to look for a
directory /etc/vmware. If this is found, look at /etc/issue and convert
the string contents to a classname. Anyone can then alias this long name
themselves with with own class.

Would someone please test this. I think this is the only generic way of
doing it - otherwise we'll need a different rule for each type.

 the problem i see with this approach, mark, is that the directory
/etc/vmware may also be present on GSX servers (a linux box running
VMware as an application) or VMware workstation clients.  these would
then be identified as ESX servers as well, which isn't the desired
effect.  if you want to keep with the idea of looking for an extant
file to determine ESX-ness instead of a system call out to rpm,
you might want to check for some other file.  when i get to work
tomorrow i'll look at some of our ESX boxes and see if something in
particular seems good (maybe /etc/vmware/devnames.conf, or a binary
like vmkpcidivy).  if you don't mind using a pattern match you could
glob /boot/* and look for 'vmnix'.  using the output of uname isn't
fully reliable as the ESX server may be booted into a kernel other
than the VMnix kernel for maintenance or patching.

chris

_______________________________________________
Bug-cfengine mailing list
[email protected]
http://cfengine.org/mailman/listinfo/bug-cfengine

Surely we want to identify not just ESX but also the other vmwares. THe ESX string should be in the appropriate file and should therefore allow identification? Please correct me if I am wrong. From what I can see there is no unique or generic way to identify ESX from the discussions

M
_______________________________________________
Bug-cfengine mailing list
[email protected]
http://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to