Update: There is an excellent freeware application available with many different other cool options to look at your virtual infrastructure including how-to find orphaned virtual disks. The RVTools freeware is cool and together with many free software tools which can be found on my Free tools page. How-to find orphaned Virtual disks in your ESX server environement with an RVTools is today's post.
The RVTools is also capable to find old snapshots, but also VMs that have CD ROM or iso image connected. Many pieces of information about your virtual infrastructure, vSwitches, HBAs, hosts, VMs, VMware tools etc…
What's new in the latest release of RVtools?
- On vInfo tabpage new field: Resource pool
- On vInfo tabpage new field: Consolidation needed.
- On vCPU tabpage new field: Number of cores per socket
- New tabpage with resource pool information
- On vNetwork tabpage new column: Switch name
- On vNetwork tabpage new column: Starts Connected
- On vTools tabpage new column: required version
- On vHost tabpage new columns: custom fields
RVTools is getting updated on regular basis. It ist a must-have utility of every IT admin which manages VMware environment. It works for VMware ESXi Free (or paid) versions. You can connect directly to your vCenter server (or vCSA) or directly to your ESXi host.
There is a time when you need to check for a space remaining on your SAN or shared storage. Why? Because if you run out of space you will not be able to Vmotion for example because vMotion need some space to run. Orphaned VMDK files are actually virtual hard disks which are not connected to some virtual machine.
They are left there and they are taking valuable disk space. Sometimes people when removing the virtual machine from the inventory they simply forget to delete the vmdk file afterwards. So how-to simply check for an orphaned VMDK files.
I found 2 ways check the infra for orphaned VMDK files:
1. There is a PowerShell script which can do the work for you. This script asks the virtual center what the disk are of each VM and puts this into an array. After this, it reads all files on all datastores. If the file is a vmdk file, it will check whether this file is in the array. If it's not, there you have an orphaned vmdk which can be safely deleted. The output of the script is written to a file. You can get the script here.
2. You can directly type at the console this command and you'll see the response on the screen.
Here is the command: find -iname
What's my favorite? Possibly “Zombie VMDKs”…
Update: As I said, the tool is evolving in every release. Here is an overview of new functions which are now part of the tool.
Version 3.9.5 (April, 2017)
- Bug fix: Unhandled System.Security.SecurityException in CLI
- Bug fix: Export vLicence tabpage not working in CLI
- Bug fix: Export from CLI creates tabpage.xls.xlsx files. Now changed to tabpage.xlsx files
- Bug fix: dvSwitch tab page has two ‘Name' fields. One is renamed now
Version 3.9.3 (March, 2017)
- Bug fix: unhandled exception in decrypt function solved
Version 3.9.2 (February, 2017)
- Migrated RVTools to use .NET Framework version 4
- Migrated RVTools to use NPOI 126.96.36.199
- Support for vSphere 6.5
- Improved logon performance
- RVTools will no longer write messages to the Windows eventlog
- All VM related tab pages now have a new column: OS according to the VMware Tools
- All tab pages now have a new column: VI SDK Server
- All tab pages column vCenter UUID renamed to VI SDK UUID
- vInfo tab page: new column VI SDK API version
- Export to Excel will now use xlsx format
- Export to Excel all columns are now auto sized
- Excel worksheet names will use same name as the tab page names
- Annotations fields can now be excluded! See preference window
- vPartition tab page new column: Consumed MB
- vHealth _replica directories are excluded for zombie checks
- *_sesparse.vmdk files are excluded for zombie checks
- New tab page with license information
- New PasswordEncryption application added with which you can encrypt your password
- RVTools command line interface accepts now encrypted passwords
- Bug fix: URL Link to online version info issue solved.
You can easily export as csv file. In fact you can export the active TAB, or All tabs. Usually it is preferable to export just what you need but there might be situations, during audits, where you need to gather as much as informations, as possible, about the environment you're working with. As you have only limited time when On-site, you'll probbably “explore” the exported file once you get to your office.
More from ESX Virtualization:
- Free Tools
- What is VMware Enhanced vMotion Compatibility (EVC)
- What is VMware CPU Ready?
- What is VMware Instant Clone Technology?
- VMware Virtual Hardware Performance Optimization Tips
- What is VMware Snapshot?
- What is VMware vMotion?