[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Orphaned VMDK..

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
0
Druva Simha Kolli
Asked:
Druva Simha Kolli
  • 2
1 Solution
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.
0
 
Druva Simha KolliAuthor Commented:
Thanks for the reply. What command will show me the summary of orphaned vmdk's
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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/
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now