Orphaned VMDK..

Druva Simha Kolli
Druva Simha Kolli used Ask the Experts™
on
Hello,

I have seen the attached report from a colleague of mine saying that we have some orphaned vmdk's. I have a couple of questions

1. What is an orphaned vmdk?
2. How can we know that these are orphaned?
3. Does it mean that we can delete them?
4. I see that in the attachment I see that the so called orphaned vmdk's have been modified recently.
5. What is the best practice to not have orphaned VM's?

Thanks
Dhruva s Kolli
Orphaned-VMDK.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
1. What is an orphaned vmdk?

A vmdk which is no longer associated with a virtual machine, e.g. connected to a VM

2. How can we know that these are orphaned?

They are no longer connected to a VM. You could check and compare all your VMs, but the easiest way is to use PowerShell.

I would recommend using the following, also VMware recommends the use of PowerCLI, which is PowerShell interface with vSphere-specific additions.

http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli

One of the simplest PowerCLI examples, and something which is actually extremely useful on its own, is the Get-VM cmdlet. Which lists VMs.

PowerCLI can be a bit overwhelming to use,  But it can be enhanced with a nice toolset and a library of preconfigured scripts to jump-start your mass changes, which is possible with PowerGUI

http://powergui.org/index.jspa

and

VMware Community Pack

http://www.virtu-al.net/featured-scripts/vmware-powerpack/

3. Does it mean that we can delete them?

If not in use, yes you can delete them to recover datastore space, but Archive first, just in case you need them later! Once deleted, you cannot easily recover them!

4. I see that in the attachment I see that the so called orphaned vmdk's have been modified recently.

If it's been modified, may it's in use and not orhpaned!

5. What is the best practice to not have orphaned VM's?

Management, in usual circumstances, they do not become orphaned.
Druva Simha KolliSr. IT Systems Analyst

Author

Commented:
Thanks for the reply. What command will show me the summary of orphaned vmdk's
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
There is no command, you need to use scripts, and these scripts are included in the

http://www.virtu-al.net/featured-scripts/vmware-powerpack/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial