VMware Horizon Community
lawrencej
Enthusiast
Enthusiast
Jump to solution

Orphaned Disks?

Hi gurus,

We have what I believe is orphaned disks on our datastores for old VDI's that no longer exist. Is there a way to verify that these are in fact orphaned and safely remove them?

Thank you,

James.

1 Solution

Accepted Solutions
RanjnaAggarwal
VMware Employee
VMware Employee
Jump to solution

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 wheter this file is in the array. If it’s not, there you have a 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

Check these links for more info http://www.vladan.fr/how-to-find-orphaned-virtual-disks-in-your-esx-server-environement/

Find Orphaned VMDK's

Virtually Jason: Orphaned VMDK Files

Regards, Ranjna Aggarwal

View solution in original post

3 Replies
Gaurav_Baghla
VMware Employee
VMware Employee
Jump to solution

you can Double click the Folder name of the Virtual machine and see what disk it is. Number 2 you can also see the last touch date for them.

Have a look at this http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100504...

Regards Gaurav Baghla Opinions are my own and not the views of my employer. https://twitter.com/garry_14
RanjnaAggarwal
VMware Employee
VMware Employee
Jump to solution

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 wheter this file is in the array. If it’s not, there you have a 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

Check these links for more info http://www.vladan.fr/how-to-find-orphaned-virtual-disks-in-your-esx-server-environement/

Find Orphaned VMDK's

Virtually Jason: Orphaned VMDK Files

Regards, Ranjna Aggarwal
lawrencej
Enthusiast
Enthusiast
Jump to solution

Thanks guys,

This is more than enough info. It will certainly help to resolve the problem.

Much appreciated,

Regards,

James.

Reply
0 Kudos