Perl Toolkit: NFS snapshot fix via rCLI

I dislike having to SSH into each host I am responsible for, and I detest having to enable SSH on ESXi (there should be NO reason for me to have to enable it). Because it’s difficult to script applying the NFS snapshot fix to a lot of hosts using the SSH method (and impossible if you don’t enable it on ESXi), I fooled around with the vifs.pl command that is provided with the rCLI.

I discovered that I can pull certain configuration files for the host using the command, modify them, then replace the configuration file…all without having to SSH to the host! vm-help.com has an excellent list of files available using this method.

All of the commands I use in the below script are available when the rCLI is installed (the rCLI also installs the perl toolkit, so all those “sample” scripts are available to us).

My windows scripting skills are non-existent, so I don’t know how to write a wrapper around the rCLI commands like I can with bash, but these same commands will work if you are using rCLI installed on Windows.

Continue Reading »

ESX
Perl
Scripting
VIMA
VMware

Comments (0)

Permalink

VIMA and ESX Password Complexity

A few days ago I posted about setting the password complexity and other items for ESX hosts. I generally don’t use VIMA for much, as I don’t have any scripts that require periodic execution without authentication, and the logging aspect of it holds no value for me (I have a syslog server for that…). For some reason (I don’t remember why now) I was fiddling with a script on my VIMA test VM and discovered a strange error…

[vi-admin@vima1 ~]$ sudo vifp addserver esx1
root@esx1's password:
Error: vmodl.fault.SystemError

One thing I’ve discovered about VIMA is that when a command fails (especially the vifp commands) they give entirely useless errors back. I checked the syslog server for entries regarding the ESX host I was trying to add and discovered the following:

[2009-01-05 11:44:36.159 'Vmomi' 32078768 info] Activation [N5Vmomi10ActivationE:0x99c8870] : Invoke
 done [updateUser] on [vim.host.LocalAccountManager:ha-localacctmgr]
[2009-01-05 11:44:36.159 'Vmomi' 32078768 info] Throw vmodl.fault.SystemError
[2009-01-05 11:44:36.159 'Vmomi' 32078768 info] Result:
(vmodl.fault.SystemError) {
   dynamicType = ,
   reason = "passwd: Authentication token manipulation error",
   msg = ""
}

Continue Reading »

VIMA

Comments (4)

Permalink