[vi-admin@vima-primp-industries ~]$ ./vmwareHealthCheck.pl
Required command option 'type' not specified.
Synopsis: ./vmwareHealthCheck.pl OPTIONS
Command-specific options:
--cluster
The name of a vCenter cluster
--datacenter
The name of a vCenter datacenter
--logcount
The number of lines to output from hostd logs
--report
The name of the report to output
--type (required)
Type: [vcenter|datacenter|cluster|host|detail-hosts]
Common VI options:
--config (variable VI_CONFIG)
Location of the VI Perl configuration file
--encoding (variable VI_ENCODING, default 'utf8')
Encoding: utf8, cp936 (Simplified Chinese), iso-8859-1 (German), shiftjis (Japanese)
--help
Display usage information for the script
--passthroughauth (variable VI_PASSTHROUGHAUTH)
Attempt to use pass-through authentication
--passthroughauthpackage (variable VI_PASSTHROUGHAUTHPACKAGE, default 'Negotiate')
Pass-through authentication negotiation package
--password (variable VI_PASSWORD)
Password
--portnumber (variable VI_PORTNUMBER)
Port used to connect to server
--protocol (variable VI_PROTOCOL, default 'https')
Protocol used to connect to server
--savesessionfile (variable VI_SAVESESSIONFILE)
File to save session ID/cookie to utilize
--server (variable VI_SERVER, default 'localhost')
VI server to connect to. Required if url is not present
--servicepath (variable VI_SERVICEPATH, default '/sdk/webService')
Service path used to connect to server
--sessionfile (variable VI_SESSIONFILE)
File containing session ID/cookie to utilize
--url (variable VI_URL)
VI SDK URL to connect to. Required if server is not present
--username (variable VI_USERNAME)
Username
--verbose (variable VI_VERBOSE)
Display additional debugging information
--version
Display version information for the script
./vmwareHealthCheck.pl --server VC_SERVER --username VC_USERNAME --password VC_PASSWORD --type vcenter
./vmwareHealthCheck.pl --server VC_SERVER --username VC_USERNAME --password VC_PASSWORD --type datacenter --datacenter DATACENTER_NAME
./vmwareHealthCheck.pl --server VC_SERVER --username VC_USERNAME --password VC_PASSWORD --type cluster --cluster CLUSTER_NAME
./vmwareHealthCheck.pl --server ESX_ESXi_SERVER --username ESX_ESXi_USERNAME --password ESX_ESXi_PASSWORD --type host
./vmwareHealthCheck.pl -server VC_SERVER --username VC_USERNAME --password VC_PASSWORD --type detail-hosts
./vmwareHealthCheck.pl -server VC_SERVER --username VC_USERNAME --password VC_PASSWORD --type detail-hosts --logcount 20
I'm not sure why you're seeing that error. You should be able to just import the latest VIMA virtual appliance into your VMware Infrastructure and use the script, so long as you satisfy the basic requirements. If you have any issues with VIMA, I would suggest posting in the VIMA forums: http://communities.vmware.com/community/developer/vima
William:
Shall do. It is the latest VIMA version and it seems to be pulling data correctly using other scripts. I'm also going to try the script directly from the Perl Toolkit under Windows. As I said, I'm absolutely new to all of this so I'm proabbly doing something boenheaded stupid right up front.
Robert
Good Luck. Btw, the script was developed purely in VIMA and on the VI Perl Toolkit under VIMA ... I make no claims it'll be 100% functional in the Windows VI Perl Toolkit, though it should but could see some differences if their active Perl doesn't contain certain modules I use.
Hi,
I'm using it with the latest VIMA (downloaded today) but the script terminates with the following message:
"Can't call method "val" on an undefined value at ./vmwareHealthCheck.pl line 442"
Report file has been written but it was cut in the "Virtual Machines" section at the second VM.
daniel
Great script!
But somehow the data in an array gets screwed up under the section "#advconfigs". It gets sorted somehow which is causing the table not to show the right values.
Alternatively i changed:
<th>LVM.EnableResignature</th><th>LVM.DisallowSnapshotLun</th><th>Disk.UseDeviceReset</th><th>Disk.UseLunReset</th>
Into:
<th>Disk.UseDeviceReset</th><th>Disk.UseLunReset</th><th>LVM.EnableResignature</th><th>LVM.DisallowSnapshotLun</th>
and now the table is showing the right (expected) values.
Also to be more clear in the report i changed "YES" : "NO" into "Enabled (1)" : "Disabled (0)" for these four items.
I've got one error:
D:\Downloads>vmwareHealthCheck.pl --server server --username user --password pass --type vcenter
Generating VMware Health Report "report.html" (this can take a few minutes depending on environment size. Get a cup of c
offee/tea and come back) ...
Can't call method "ntpConfig" on an undefined value at D:\Downloads\vmwareHealthCheck.pl line 992.
End Disconnect
without that ntp stuff the script is running fine. thanks...
Hi pfuhili,
Thanks for the catch, there are certain params/configs that if not defined will cause this error. I've tried to catch and check all variables prior to printing but there are some that I've probably missed. I'll make sure that line gets fixed in the next release tonight.
Hi bosma115,
I noticed a similar issue while adding an additional parameter, the logic for that section will be fixed as it matches the keys in alphabetical order and should follow that with the table printout. I'll get a fix for this and hopefully in tonight's new release of the script.
Hi s.buerger,
As mentioned in the reply to pfuhli, I'll check the value prior to printing and hopefully get that fix in tonight's release.
Hi lamw,
I don't know if you've seen this script, but it might give you a few good ideas:
http://sourceforge.net/projects/esxhealthscript
Thanks for all the hard work so far, Forbes.
Forbes Guthrie
http://www.vreference.com
Hi forbes,
Yes, Mr. Duncan Epping has made me aware of that script. I've yet to fully dissect what is really useful out of that output as you can see it's very extensive. I don't know if that is the level of detail most consultants or end users going into a new or existing environment would like to see? I know in past work for legacy migrations, some of that data is useful and I've taken what I had to extract in the past and integrate into my report. Also not all information from that health report which is actually executed on the ESX 3.x+ w/Service Console (no support for ESXi if I recall) is available in the API.
I'm interested in feedback from those that have been able to execute the script on what information is useful or would be nice to have as a high level report.
Thanks for the comments and I'll have an update for some fixes/enhancements later this evening, look out for that.
I like that particular script for 2 reasons:
forbes,
Thanks for the input. I'll definitely take a look to see what I can collect, though one issue I'm starting to face is performance of the script. I've been given some options to help speed things up which is related to searching for orphan snapshots.
I agree with reason #1, but #2 should be easy if you use a scripted install process. I've supported a pretty large environment in the past and even deploying 20+ host at a given moment and if you have all those changes within say a kickstart, then keeping the hosts consistent should be trivial. It does require you to keep up to date with all the scripts, as new releases or patches are introduced into the environment. Though with careful subversion control and lots of Q/A, keeping builds consistent is definitely possible even for the small or large enterprises.
I know VMware is introducing host profiles in the next VI release, and it won't solve all issues it will help mitigate some of the basic issues like vswitch/portgroup/cluster configurations. I agree, as an Admin, I do like to see the details of the server. Though ... the days of the SC will only last for so long, at least it's been said it'll stay in the next VI release ![]()
VIMA is really where the next level of management will be at and using remote tools like the RCLI or VI Perl Toolkit, whether we like it or not. I think it's definitely a great idea and I'm all for it, so long as the environment of the SC is replicated as closely as possible.
Hello,
thanks for the great work. I've tested the script and it works very good.
I've one question: Which permissions are required in VirtualCenter to collect the informations.
It would also be nice to be abled to view output like you get from esxcfg-mpath -l to see information about paths and settings.
I believe read-only should work but you'll have to verify. I've been using my admin account to run the reports.
Great - you keep up the good work!!
It runs through w/o errors.
some suggestions for nice-2-haves ![]()
v0.6 just released.
I'm interested to all those that have tried the script, how long it took the script to execute and approx. how large is your environment (hosts/vms).
Hi William,
we have 2 VC instances. Here are the numers:
VC2:
v0.6 don't work on win32 anymore:
my $todays_date =`date +\%Y-\%m-\%d`;
with this line perl opens a new process cmd.exe... that don't close...
Thanks for your great work, William!
But the Cluster ressources aren't correct.
effectiveMemory/CPU is not the actual usage. Thats the amount of the ressources wich is usable for VMs.
You have to use the quickStats from all hosts in the cluster.
esxcfg-mpath -l is a good idea for upcomming releases.
Thanks for the info, also I see you're using the old v0.5, the additional vendor information should be fixed in v0.6 so you should not see that error regarding that print statement anymore.
Sorry to hear the new version v0.6 is not compatible with Windows, again this was more of a surprised that it worked on Windows but no guarantees are put in place to ensure it'll continue to operate on Windows. I've developed the script fully on VMware VIMA which is a RHEL environment and I'm using the default Perl environment that's been setup which I assume should match pretty close to the active state Perl installed on Windows but I can't say 100%. I would encourage you to give VMware VIMA a try and it's pretty easy to get up and running as a virtual appliance not only this report but for other CLI management utilities that are not available on Windows.
You have the option of using VIMA or if you choose to continue on Windows, your only option is to continue using v0.5 or comment the following lines out: 761-785
Regarding your NTP conflict, I've tested this on a newly build ESXi 3.5u3 with no NTP configurations and I did not run into this issue, I'll take another look but is there any reason why you don't have NTP configured? It's probably a good idea to keep proper time sync with regards to authentication, proper event logging, etc.
Thanks for the confirmation, I had a hunch it was not listing the actual consumption, hence it was noted as a possible issue. I'll have those stats removed/reworded in the next release as I don't get into the hosts info until after I retrieve the cluster statistics, in which I do provide quickStats information pertaining to each hosts.
Yep your right, the cluster stats runs first.
To make that work i've made a new helper function
who asks for the mem und cpu usage through quickstats.
It's a bit dirty but works. I've also added the number of VM's in the cluster
to my report.
Again, great work!
I forgot to mention, can you try making the following modification to the script to see if it fixes your NTP issue:
Change the following line to:
line 1113:
if($local_host->config->dateTimeInfo)
Let me know if that works
v0.7 released.
This update has some major new features, check it out and let me know if you run into any issues.
Hi William,
we have two VC instances. I want to run the script against these both at the same time. Therefore it would be fine if the reportname could be specified by a param or if the file would be named by the script to something related to the VC instance.
Do you think it would be possible to implement that?
Regards,
daniel
BTW: performance has been improved a lot!!
VC1:
I have managed to get the script to run ok, however...
The output *.html gets produced and gets as far down as ESX/ESXiDatastore(s): of which I have around 10.
The report outputs 3 and on the 4th one it stops. The script keeps running however it is oviously outputting nothing and running the cpu at 90% on the machine im running the viperltoolit on.
The output in the report gets to the "free" collum and outputs the following: 416.47 GB</
Its seems like it has output some code that it shoudlnt "</".
Has anyone else seen this?
Ive tried looking at the code my self but im a beginner programmer and am stuggling to pick it out.
pfuhli, actually if you take a look at the usage options you'll see that you have an option to specify the report name. If you're looking to loop through say 20 vCenter instances (lets just say you have that many), you can quickly write a quick shell/perl script and just change the name of the report based in the input of your vCenter server.
So yes, this is possible (e.g.)
./vmwareHealthCheck.pl --server VC_SERVER --username VC_USERNAME --password VC_PASSWORD --type vcenter --report my_report_vcenter_name.html
Hard to say what the issue could be. I actually ran into an issue myself while trying to access a datastore that was not accessible as it was under some maintenance which I ended up fixing. I would just check to make sure your datastore's are accessible. Usually the script will error/warn if it can't reference a specific VI object, if it continues to process then perhaps it was not able to extract the data.
Also double check that you're running the latest VI Perl Toolkit, are you executing this on a Windows or Linux system? If you have some time, could you try using VIMA to execute this? Curious if the issue lies in the release of VI Perl Toolkit or if there's some exception I'm not catching.
Evening,
v0.8 just released. This update was mainly for performance and added Hostd logs output.
Let me know what you guys think or if you run into any issues
it's a lot faster, it used to take over an hour for 50+ hosts, now only 20 minutes!
That's awesome to hear Duncan! I'm really happy I learned about those property filters (wish it was documented in the guides), definitely cuts back on the amount of information transferred and just gives me exactly what I want.
As it happens im already using the latest VIMA. So that should have the most up to date viperltoolkit. I have even downloaded your latest version of the script and still it halts at the exact same point. I have created my own script that pull data from all datastores in the datacentre and it seems to work without any issue.
I know its not much help without a error message but im just not seeing anything come back. It seems to have gotton its self into a loop somehow as it is still doing somthing. I left it overnight to see if it was just taking a long time on my system but still nothing.
Would it be possible in one of your next releases to build in a debug switch so I could see exactly were the script is getting confused?
disregard my last comment. it is working with the new version. thanks
Really great script!
I found some log errors on a esxi host (3.5.0 143129) while running the scripts, is this something i should worry about??
thanks in advance
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.943 'Vmomi' 114696 info Activation N5Vmomi10ActivationE:0x189494c8 : Invoke done queryVirtualDiskFragmentation on vim.VirtualDiskManager:ha-vdiskmanager
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.943 'Vmomi' 114696 info Throw vim.fault.FileFault
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.943 'Vmomi' 114696 info Result:
Feb 23 09:39:55 Hostd: (vim.fault.FileFault) { dynamicType = <unset>, file = "Device or resource busy", msg = "" }
Feb 23 09:39:55 Hostd:
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.948 'BaseLibs' 65541 info DISKLIB-VMFS : "/vmfs/volumes/4990037b-0b5444fb-3fe9-00151780605d/oracle2/oracle2_1-flat.vmdk" : failed to open (1048585): AIOMgr_Open failed. Type 3
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.948 'BaseLibs' 65541 info DISKLIB-DSCPTR: Failed to open extents for descriptor file in normal mode
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.949 'BaseLibs' 65541 info DISKLIB-LINK : "/vmfs/volumes/4990037b-0b5444fb-3fe9-00151780605d/oracle2/oracle2_1.vmdk" : failed to open (Device or resource busy).
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.949 'BaseLibs' 65541 info DISKLIB-CHAIN : "/vmfs/volumes/4990037b-0b5444fb-3fe9-00151780605d/oracle2/oracle2_1.vmdk" : failed to open (Device or resource busy).
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.949 'BaseLibs' 65541 info DISKLIB-LIB : Failed to open '/vmfs/volumes/4990037b-0b5444fb-3fe9-00151780605d/oracle2/oracle2_1.vmdk' with flags 0x6 (Device or resource busy).
Feb 23 09:39:55 Hostd: 2009-02-23 09:39:55.949 'VdisksvcPlugin' 65541 warning Failed to open '/vmfs/volumes/4990037b-0b5444fb-3fe9-00151780605d/oracle2/oracle2_1.vmdk' : Device or resource busy (1048585).
Thanks for the great script
May have found a bug when reporting snapshot deltas. If 18 VMs are found with snapshots and each of those VMs have 2 deltas older than the defined number of days I would expect 36 entries in the delta info table. The current script v.08 only displays information for 18 deltas in the delta info table.
Also, I am a Perl novice, how are you populating the vm_delta_warn array?
No you should be fine, I assume you either used host or the undocumented vmfrag option? In any case, this was something I was playing around with but realized the VMDK fragmentation is only available on sparse VMDK(s). Also this information can only be queried while the VM is powered off, hence you're seeing those errors in the hostd.log when it runs the "queryVirtualDiskFragmentation* function. I may or may not be removing this in a future update as it's only pertaining to sparse files, not sure how useful it would be. So nothing you need to worry about
Hm, I'll have to do some investigation, I'll try changing the yellow warning of 1day and take two snapshots and see if it's listing properly. You should also be able to see your two snapshots in the table above? I would just double check that the actual captured time is indeed beyond the defined number of days.
If you take a look at line starting at 998, you'll see how I'm extracting the information. This is using the datastore browser and creating a search spec for files that end with *-delta.vmdk, you can always find more information looking at the VI API, it's definitely a fun task to go through if you have some time.
Actually, come to think of it, we do have a test VM that has two snapshots taken on the same day and it is listing properly. I would definitely take a look at the timestamp of the snapshots to ensure they're beyond the defined days.
Hi William, I double checked timestamps this morning, there are several deltas from 2007 that are not displaying. Also, some of the VMs have up to 7 vmdks. One VM has a delta over 20GB in size (I have only just started working on this environment), not sure the size may cause an issue. I will do some further testing this afternoon.
Yea, I'm not too sure, this data is being returned by the API. You can always take a look at the section on where it retrieves all the *-delta.vmdk and print them out to see if it's seeing them initially. This should help determine if it's the logic in checking the dates or the API isn't seeing the deltas at all.
I am using host option, thanks a lot for the very detailed answer!
max
I'm a newbie at this. when I run the script: ./vmwareHealthCheck.pl --server server_name --username server_username --password server_password --type vcenter datacenter_name, it only reports on who is logged into Virtual;Center, no data on the datacenter n question.
Please take a look at the usage samples, if you're looking at drilling down into datacenter you need to use the following flags:
I don't have any of our esx hosts in a cluster. So, I will not be able to extract any data then?
No data will be extracted, usually with a cluster you have the finest level of granularity and carving of your resources. If you still want information, you can run the --host which allows you to look at an individual host and you can run the report on each individual host.
You're more than welcome to modify the script so it doesn't output cluster information if you're looking at the datacenter, but that'll be something you'll need to modify to fit your environment. If you don't want to take advantage of DRS/HA/DPM within a cluster, you can just create a cluster and disable all those features. The cluster would just act as a logical grouping, it will not affect your hosts in any way unless you enable features within the cluseter.
Sorry if I'm a bit confused - perhaps I should just try the script and see what happens...
Do I evoke this from my Windoze PC with PowerShell?
Do I copy this to the VIMA and evoke it there? (preferred)
How do I get the nifty HTML output pages referenced on the scripts homepage? (seems that it's inherent - but just wondering if I evoke it on the VIMA where the files end up)
I'd also add - it would be a nice touch for the HTML output to include the command syntax that was used to generate the file.
Please take a close look at the documentation, that is what it's there for. It'll describe the requirements and how to execute the script.
This script uses the VI Perl Toolkit, it's not a Powershell script. You can install VI Perl Toolkit on both Windows or Linux or use VMware VIMA virtual appliance which as described is a RedHat Linux system. I in no way claim this will function in VI Perl Toolkit on Windows but you can try it and let us know, I know it's worked in the past revisions and I've tried my best to keep it within the default environment of the VI Perl Toolkit (e.g. not using packages not installed by default with VITK).
If you're so inclined to include command syntax, you can customize the script to do so, but it's unnecessary in my opinion. The source is there for any further customization you may require in your operating environment.
OK, a couple quick tests yields one success and a couple failures.
This is on a freshly imported and configured VIMA
vCenter check:
./vmwareHealthCheck.pl --server 192.168.2.110 --username Administrator --password xxxx --type datacenter --datacenter DemoNet --report test.html
This worked as expected - got details on my vCenter version, licenses, and current connections
So I try to get more data:
./vmwareHealthCheck.pl --server 192.168.2.110 --username Administrator --password xxxx --type detail-hosts --report test.html
And I get:
No clusters found.
Which is no surprise as I have no clusters defined (or at least no clusters as I understand the concept)
I thought this was the syntax to get the "detailed data" as displayed in the sample pages....
As mentioned before, if you're using any options other than --type host, you'll be required to have a cluster defined for the information to be extracted, if you don't you can modify the script or add a cluster. It looks like in your first execution you have a cluster under your datacenter DemoNet that is why that one was successful. When you run --type detail-hosts it'll just provide further details for your entire vCenter so there should be cluster's defined for this to properly function.
In terms of your last use case, you probably don't have something defined and I did not check and it errors out. I'll take a look at what information is being extracted at line 1091 but it's letting you know that it's trying to access an undefined array reference.
Also are you using the latest version of this script, v0.8? I'm looking at line 1091 and it references the LUN's seen on your system and even if you don't have external FC/iSCSI LUN's presented to the host it should still seen the internal SCSI LUNs.
OK - this set-up is using NFS, so there's no FC/SCSI/iSCSI
vi-admin@vima ~$ ./vmwareHealthCheck.pl --version
VI Perl Toolkit version: 1.6
Script 'vmwareHealthCheck.pl' version: 3.5 Update 2
That returns the version of the VI Perl Toolkit, if you look in the source or the generated report it should give you a version number. (e.g. v0.8)
Also it's fine if you're using NFS, but the local storage should still be seen as a SCSI LUN.
Neat, I never looked into their internal versioning variable. I'll need to add that in a future release.
If you add the following:
$Util::script_version = $version;
It'll allow you to print out the version of the script. That's good to know for future troubleshooting.
I ran a healthcheck today (v.9) against three ESX 3.5.3 hosts and in the section "ESX/ESXi State" for the column marked "VMOTION ENABLED" all 3 of them show as "NO". However, the hosts are, in fact, enabled for VMotion via vSwitch0, and it (VMotion) works just fine.
I tried to poke through the script to understand what was being called to garner that value, but I'm just too new to this to make much sense of it (and frankly I have no intention of becoming an exert in perl scripting)
Can you please explain why I might be seeing this value in this point of the healthcheck report? The VMotion is enabled on vSwitch0 but the VMs all reside on vSwitch2, which does not have VMotion enabled.
TIA
Don
So I'm retrieving the flag that determines if vMotion is enabled using the managed object HostSystem at: http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.host.Summary.ConfigSummary.html
hostSystem->summary->config->vmotionEnabled
This property will return either a boolean of true or false and I just modify it to print either YES or NO. You can find the exact line in v0.9 @ 1413
On how it determines this is in the underlying implementation of the API, it could be that if you have two vMotion networks that it's picking the first, I'm not exactly sure.
William,
Excellent work. I was wondering if the older versions are available anywhere. I looked around here and on your website but didn't find anything. Can you post them either here or on your website?
Sorry, the latest version contains fixes/enhancements/updates from the previous releases. Previous version will not be supported, any reason why you're looking at older releases?
I was looking to find a version that didn't have the cluster requirement to report on an entire Virtual Center environment. I have a few environments that are not in a cluster and can't put into a cluster without a ton of red tape.
I took a peek at 0.9 to see if I could figure out how to remove the cluster requirement as you've mentioned but its way beyond my Perl skills.
All versions of the script end up at the cluster level for data extraction. If you're looking for any other level, you'll need to make modifications to the script and remove some of the cluster specific attributes that's extracted. I suggest taking a look at the VI API reference guide and understanding how the object model works: http://www.vmware.com/support/developer/viperltoolkit/doc/perl_toolkit_appliance_idx.html
You can also look at the VI API community forums for snippets of code or if you have further question. In general, clusters allow for DRS/HA configurations, so that's why the data starts at that level. If you're running vCenter, it does not hurt to create a cluster and just disable those functions if you want them enabled. Good luck
Also note - for ALL my VMs in the "Virtual Machine" section - the "# of vNIC(s)" shows as zero.
And - one of the hosts has 5 VMs, yet the "VM(s) VMDK Disk Information:" has nothing in the table other than the header. The only thing unique to this host is the fact that it has a couple of Vista VMs (all others being Win2k/Win2k3)
Not sure about the NICs, I have VMs that have VMware Tools installed and some that don't and they all report perfectly fine. In terms of the VMDK Disk Information, that was really an "experimental" feature, I was playing with the option of extracting fragmentation information via the API but realized that was only pertinent to VMDK's that were in the 2gb sparse format, it should print "N/A" under fragmentation if the disk is not of the 2gbsparse format. The reason why it's not printing is if the VMDK is powered on, the fragmentation info will not be available. This information may not end up being too useful, I'm still considering if I should remove it from a future update as discussed in my release notes.
One thing I would double check is that all your hosts are running at least ESX(i) 3.5u2+, else the data being extracted may not be supported.
Evening everyone,
Just released a update 0.9.4 that adds a few enhancements and primarily fixes an issue with hosts being miss-reported in the "portgroups" section. I've had few individuals help me test the new fix, so hopefully you won't see the issue again.
Motivated by Scott Lowe's recent post about cdp I've gone ahead an added that information and also Hardware health sensor information via CIM.
Give the new script a run and let me know if you guys/gals run into any issues.
Feature request:
Would it be hard to add data for configured/connected Floppy/CD/Serial devices? It's good to know what's connected for VMotion capability
Floppy & CD-Rom is already being captured, Serial devices should not be hard but not sure when I'll have the free cycles to implement and test. You're more than welcome to update the script ![]()
This is a very valuable script. If you have a lot of RDMs, this gives you a clear mapping of what VMs are using what RDMs. This allowed us to reclaim a few unused RDMs once we saw proof from the report. The manual process of checking VMs for RDMs is not nearly as effective.
One tip, you might want to leave the password argument out of the command line. This keeps it out of the history and also ensures any special characters in your password get passed through correctly to authenticate with VC.
This script is wonderful, thank you! We have an ESX 3.5 farm added to VC 2.5 on which this script runs well. We also have a smaller farm for hosting legacy Windows operating systems on ESX 3.0.2 with VC 2.0.2. I would like to know if there is a similar script that will give the same details on ESX 3.0.2 as well.
When I run the script, I receive a SOAP Fault "An error occurred while communicating with the remote host" and the report ends after having recorded the the ESX/ESXi Datastore table header. The cluster I'm targeting has 6 nodes sharing 8 luns (7fc, 1 nfs). I commented out printHostDataStoreInfo and it failed in the same place place. I commented out printPG and the same...
It seems as though I need my virtual center connection reestablished after the ESX/ESXi LUN table is created. Any ideas?
... edit ...
I don't speak perl, but I did find that when I comment out printHostDatastoreInfo, it is now completing on another cluster.
I am getting the same error as cmcalvin-
SOAP Fault:
Actually, you need to be using the vSphere version of the script since fileOwner is a new property in vSphere: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.DatastoreBrowser.FileInfo.Details.html#fileOwner
This is why you're seeing the error.
Hi William,
Thanks so much for your fast response and direction to the right script!
This healthcheck script is great - I wasn't sure what I would do if it didn't work in vSphere.
I am going to make a video about it now.
All the best to you,
David
np. Let me know if you run into any other issues. Don't forget you'll need to use either vSphere SDK for Perl or vMA 4.0 as (VIMA 1.0 and VI Perl Toolkit) will not work with vSphere vCenter or ESX(i) hosts
Looking forward to the video ![]()
Is it possible to add to the virtual machines table? I'd like to see the HD size and the total disk consumption with snapshots. Thanks.
I prefer it on as a separate table, the VM table is getting quite crammed and I hate for users to keep scrolling as that is something I don't enjoy in reports ![]()
You're more than welcome to adjust it to fit your environment.
I agree, but there is some data I can live without in that table. I've only used PowerShell and I wasn't sure if using Perl it was possible to get those two data points and how. Thanks.
As I mentioned, the data is there, but I won't be updating the script to cram everything down within that table. You're more than welcome to display the results how ever you like but this is more of a cosmetic request than functionality and everyone will want the report to look a certain way. So unfortunately I will not be able to fulfil this request. If you take the time to understand how the data is being extract, then you'll find it pretty easy to re-arrange the data points.
Hello
Some time ago I set up my VIMA Appliance with ghettoShutdown.pl and vmwareHealthCheck.pl and they have been working perfectly for the past several months. Now for some reason the vmwareHealthCheck.pl has stopped working. The other one, I do not want to try at least during work hours but the commands sudo vifp addserver esxiserver.domain.com and sudo vifp removeserver esxiserver.domain.com work fine so there does not seem to be a firewall issue. I at this time have opted to stay at VMWare ESXi Server 3i, 3.5.0, 123629 so as to take advantage of being able to use these scripts as we do not yet have the budget to move to the full licensed version of ESX.
The only thing I haven't done yet to to try and resolve the issue is reboot my ESXi Server. Any ideas as to why I would get the error - SOAP request error - possibly a protocol issue: 500 SSL read timeout: ?
Command:
/home/vi-admin/reports/vmwareHealthCheck.pl --server esxiserver --username root --password abc123 --type host --logcount 10 --report /home/vi-admin/reports/esxiserver.html
Error:
SOAP request error - possibly a protocol issue: 500 SSL read timeout:
Environment Info:
VMWare ESXi Server 3i, 3.5.0, 123629
vmwareHealthCheck.pl
VMware Health Report v0.9.4
Actually I've seen this personally and I'm not sure why this occurs either. I suspect perhaps the host might be busy or vMA/VIMA is not able to fully established a connection. I've only seen this a handful of times and generally when I connect to vCenter and not to an individual host which makes a little more sense, since vCenter might be busy processing other requests.
Unfortunately I can't shed much more light and it's pretty rare when i do see the problems so can't comment on why this occurs. I would just double check to see what else might be occurring during the time the report is executed.
William: I'm probably dumber than a post but I've just started using VIMA and I've downloaded your script to VIMA. When I execute it on VIMA I get a "cannot load Win32::OLE: Can;t locate Win32/OLE.pm in @ INC" error thrown by the VIMA PERL setup. Am I missing something?