Archive for August, 2008

PowerAlarm Manager Script

August 31, 2008

Check out Shyam’s entry in the (now closed) VI Toolkit for Windows Scripting Contest, PowerAlarm Manager. It allows you to create alarms on any item in the VC inventory based on any perf metric. This is way cool – I’ve never quite understood why this functionality is not natively available. The Ready Time metric for example, is very useful as I’m sure anyone reading this blog knows. But we’ve never been able to create alarms based on it until now, thanks to Shyam!

So here’s hoping he gets a placing in the top 3, although with some very good entries in there it will be tough. We’ll post back any results as they come to hand, but in the meantime you should check it out and please report any bugs back to us!

Statelesx 1.1.0 Released!

August 13, 2008

Yes yes, hard to believe but we have had a great response from the initial release from people all over the globe, including some improvements that we thought should go in straight away!

In this release, we have added:

– hosts that contact the appliance via the python script now are placed into an “unregistered hosts” section, making it very easy to add them to clusters (ie no more typing in hostname and UUID)

– hosts that are defined in clusters can be configured via a single button click in the web UI, so no python script is needed on the host. Yes, that means you can now configure ESXi boxes. You still need VirtualCenter though, and it’s obviously not a completely hands off process since you still need a single button click to initiate the configuration, but we’re working on that.

– web interface now located at http://%5BIP.Address.of.Appliance%5D/

Credentials are the same as the initial release (root / root for console, statelesx / statelesx for web interface). The new md5 sum is:

98aaea31137048338a547a56dd2a65c2 statelesx-1.1.0-ovf.zip

The python script also has a minor update, now 2 parameters are sent across:

#!/usr/bin/python
import socket
import re
import sys
#Open esx.conf, read only
esxconf = open(“/etc/vmware/esx.conf”, “r”)
#Define regular expressions
getName = re.compile(“/adv/Misc/HostName.=.(.*)”)
getUUID = re.compile (“/system/uuid.=.(.*)”)
#Search esx.conf for matches
for line in esxconf.readlines():
    hostname = getName.findall(line)
    for name in hostname:
        name = name.strip(‘”‘)
    UUID = getUUID.findall(line)
    for uuid in UUID:
        uuid = uuid.strip(‘”‘)
#Close esx.conf
esxconf.close()
#Define statelesx server address, port and msg
host = sys.argv[1]
port = 1974
msg = name + “:” + uuid
#Open socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Connect socket
s.connect((host,port))
#Send msg
print “Sending ” + msg
s.send(msg)
# Close socket
s.close()

We hope you enjoy this release, feel free to mail us with any feature requests / bug reports or leave them in comments section of this post!

Statelesx Initiator Script

August 10, 2008

In all our anxiousness to get the statelesx 1.0.0 appliance out, we totally forgot to post up the client initiator script! So here it is:

#!/usr/bin/python
import socket
import sys
import re
#Open esx.conf, read only
esxconf = open(“/etc/vmware/esx.conf”, “r”)
#Define regular expressions
getUUID = re.compile (“/system/uuid.=.(.*)”)
#Search esx.conf for matches
for line in esxconf.readlines():
        UUID = getUUID.findall(line)
        for uuid in UUID:
                uuid = uuid.strip(‘”‘)
#Close esx.conf
esxconf.close()
#Define statelesx server address (from argument), port and msg
host = sys.argv[1]
port = 1974
msg = uuid
#Open socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Connect socket
s.connect((host,port))
#Send msg
print “Sending ” + msg
s.send(msg)
# Close socket
s.close()

Just drop that onto your fat ESX 3.5 box and run it as one of the last startup scripts.

VirtualCenter 2.5 Update 2 Database Changes

August 8, 2008

After my previous postings on the VirtualCenter upgrade process, I had some correspondence with VMware devs that was proxied by John Troyer from the VMTN Blog. During the course of that correspondence, I lamented the generic names given to the stats rollup SQL agent jobs. SQL agent jobs are created per-instance and thus having generic names would be problematic in a shared SQL environment – effectively, you’d need a SQL instance per VC database, instead of a single SQL instance with many VC databases. Not exactly an optimal use of resources on the SQL box.

But surprise surprise – today I installed VC 2.5 Update 2, and guess what I saw

As you’ve probably guessed, ‘server1_vcdb’ is the name of my VC database. Sure, they probably meant to put a space in between ‘rollup’ and [databasename], but don’t I feel just a little bit special ^_^. Thanks guys.

Download statelesx 1.0.0 now!

August 6, 2008

A big thanks to all those who responded with offers of help for the hosting, the first of who was Dan Milisic over at DesktopECHO who of course has an appliance of his own! Jeff O’Connor from VMware Australia was hot on his heels with some bandwidth too, thanks for that mate 🙂

Hit the download links over on the right, the details you need to know for the appliance are:

md5sum: 4e3c8b29d2069ff52afe97b910451595 statelesx-1.0.0-ovf.zip
IP Address: DHCP
Root password: root
Statelesx Web Interface: http://%5BIP address of appliance]/statelesxWI
statelesxWI username: statelesx
statelesxWI password: statelesx

Please send all bug reports / feature requests to vinternals@gmail.com, and for anyone in London lookout for us at the next VMware User Group meeting on August 14th!