/ #automation #vmware 

RVTools: Use it and Automate it

Normally, RVTools doesn’t need to be introduced: for people having VMware infrastructures to administer, RVTools is like a swiss knife. This tool is able to display a lot of information about your VMware infrastructure and allows you to export the result (in CSV or Excel). If I quote the RVTools author’s website, RVTools is able to:

[...] list information about VMs, CPU, Memory, Disks, Partitions, Network, Floppy drives, CD drives, Snapshots, VMware tools, Resource pools, Clusters, ESX hosts, HBAs, Nics, Switches, Ports, Distributed Switches, Distributed Ports, Service consoles, VM Kernels, Datastores, Multipath info and health checks.

RVTools: login Windows

With RVTools, you are able to search information, dig for inconsistencies in environments or just to export the results to keep an inventory of the infrastructure’s state: the result is available in the form of an array with multiple tabs.

RVTools: informations about your VMware infrastructure

Where I want to get is that people often use RVTools in one shot but a quite nice feature of RVTools is the possibility to launch it in command line. You can find an example in the RVTools installation directory:

rem #########################
rem Name	RVToolsBatch
rem By		RobWare
rem Date	November 2013
rem Version	3.6
rem #########################

rem =====================================
rem Include robware/rvtools in searchpath
rem =====================================
set path=%path%;c:\program files (x86)\robware\rvtools

rem =========================
rem Set environment variables
rem =========================
set $VCServer=
set $SMTPserver=
set $SMTPport=
set $Mailto=
set $Mailfrom=
set $Mailsubject=<subject, example="" "rvtools="" batch="" report"="">
set $AttachmentDir=
set $AttachmentFile=

rem ===================
rem Start RVTools batch 
rem ===================
rvtools.exe -passthroughAuth -s %$VCServer% -c ExportAll2xls -d %$AttachmentDir% -f %$AttachmentFile%

rem =========
rem Send mail
rem =========
rvtoolssendmail.exe /smtpserver %$SMTPserver% /smtpport %$SMTPport% /mailto %$Mailto% /mailfrom %$Mailfrom% /mailsubject %$Mailsubject% /attachment %$AttachmentDir%\%$AttachmentFile%

A possible use case would be a scheduled task that would launch it regularly, exports the results with the date in the export filename. The command line parameters are well documented and described in the documentation. You can find the documentation here or in RVTools installation directory.

RVTools latest release is version 3.6 (February 2014) version 3.7 (March 2015) and supports the following versions and products:

ESX Server 3.5, VirtualCenter 2.5, ESX Server 3i, ESX Server 4i, VirtualCenter 4.x, ESX 4.x, VirtualCenter 5.0, VirtualCenter Appliance, ESX 5.0, VirtualCenter 5.1, ESX 5.1, VirtualCenter 5.5 and ESX 5.5.

The changes covered in this version are the following:

  • VI SDK reference changed from 5.0 to 5.5

  • Extended the timeout value from 10 to 20 minutes for really big environments

  • New field VM Folder on vCPU, vMemory, vDisk, vPartition, vNetwork, vFloppy, vCD, vSnapshot and vTools tabpages

  • On vDisk tabpage new Storage IO Allocation Information

  • On vHost tabpage new fields: service tag (serial #) and OEM specific string

  • On vNic tabpage new field: Name of (distributed) virtual switch

  • On vMultipath tabpage added multipath info for path 5, 6, 7 and 8

  • On vHealth tabpage new health check: Multipath operational state

  • On vHealth tabpage new health check: Virtual machine consolidation needed check

  • On vInfo tabpage new fields: boot options, firmware and Scheduled Hardware Upgrade Info

  • On statusbar last refresh date time stamp

  • On vhealth tabpage: Search datastore errors are now visible as health messages

  • You can now export the csv files separately from the command line interface (just like the xls export)

  • You can now set a auto refresh data interval in the preferences dialog box

  • All datetime columns are now formatted as yyyy/mm/dd hh:mm:ss

  • The export dir / filenames now have a formated datetime stamp yyyy-mm-dd_hh:mm:ss

  • Bug fix: on dvPort tabpage not all networks are displayed

  • Overall improved debug information

Author

Romain

Staff II Technical Product Manager, technologist with 18+ years of Networking and Security experience in Data Center, Public Cloud & Virtualization (VMs and Containers). He is a double VCDX (DCV and NV, #120), VCDX panelist, frequent VMUG/VMworld speaker and contributor to the community via this blog or social media (follow him on Twitter @woueb).