VMware Cloud Community
pavitb
Enthusiast
Enthusiast
Jump to solution

Old vmdk files

Hi

I have a few datastores which have a few folders with some old Virtual Machine names we used earlier in our infrastructure but don't exist now. These folders contain nothing else but some .vmdk files that are attached to other VMs and they are still in use (the modified date for the .vmdk files is from this week). The .vmdk file names are still based on the old Virtual Machines that used them earlier. My question is:

Is it possible to know what virtual machines are using those .vmdk files currently?

Pavit

0 Kudos
1 Solution

Accepted Solutions
cykVM
Expert
Expert
Jump to solution

Maybe this PowerCLI script helps: http://vniklas.djungeln.se/2011/12/05/virtual-machine-vmdk-file-report-with-powercli/

If you prefer some additional tool, RVTools might help.

View solution in original post

0 Kudos
5 Replies
cykVM
Expert
Expert
Jump to solution

Maybe this PowerCLI script helps: http://vniklas.djungeln.se/2011/12/05/virtual-machine-vmdk-file-report-with-powercli/

If you prefer some additional tool, RVTools might help.

0 Kudos
brunofernandez1
Jump to solution

i would use storage vmotion to rename the vmdk file and at the same time the vmdk file is moved to the same folder as the vmx and so on is...

------------------------------------------------------------------------------- If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards from Switzerland, B. Fernandez http://vpxa.info/
0 Kudos
pavitb
Enthusiast
Enthusiast
Jump to solution

Hi Bruno

That's what I plan to do also, but I first need to know what virtual machine is using those old .vmdk files. I'll try to modify the PowerCLI script cykVM pointed out to filter out the .vmdk files that I need information on and see how it goes.

Pavit

0 Kudos
brunofernandez1
Jump to solution

ou yes, you don't know whitch is the VM that holds the VMDK. my fault -.-

with the script you should solve your problem...

------------------------------------------------------------------------------- If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards from Switzerland, B. Fernandez http://vpxa.info/
0 Kudos
pavitb
Enthusiast
Enthusiast
Jump to solution

I modified the if statement a little like below and got the expected result:

if ($VMDK.Filename -like "*name.vmdk*")

Thanks guys.

Pavit

0 Kudos