Finding ISOs mounted by Virtual Machines in vSphere

Well, I’ve never really gotten around to find a good answer on how to find which virtual machine has an ISO mounted. This has been problematic whenever moving the ISO storage, since it will just fail without telling you which VM is using the ISO(haven’t found anything in the logs on the ESX host or vCenter itself either). Google seems to have no answer so I figured something out myself, if you have a better method then please let me know!

Since the .vmx files are locked in vSphere by the host running the virtual machine, you’ll have to run this command on each ESX host if you’re using FC/iSCSI storage. If you have NFS you might be able to at least find which host has the file opened on the NFS-server.

  • for i in `vmware-cmd -l` ;do egrep -iH “fileName.*iso” $i ;done

PS. You can only do this in ESX unfortunately, ESXi does not have vmware-cmd and while you can run it from the VMA you cant execute find for obvious reasons.





This entry was posted in VMware and tagged , , , , . Bookmark the permalink.

2 Responses to Finding ISOs mounted by Virtual Machines in vSphere

  1. Casper says:

    You can also use this RVTools:

  2. Peter Junior says:

    Very handy tool… thank you 🙂

Comments are closed.