VMware Cloud Community
dkraut
Enthusiast
Enthusiast

Housecleaning of vcenter and datastores?

Curious if anyone has tips and tricks on how to clean and organize vcenter after years of neglect? For example, say you inherited a vcenter environment with a myriad of datastores that now contain many orphaned/mismatched directories. Many VM's were named incorrectly and now you have vm's with mismatched directories and vmx/vmdk files. This really hit home today when I had an ESX server crash with irrecoverable file corruption. Although it was a member of a cluster and the vm's were on a SAN, I had to remove the host from the cluster and move the vm's to other hosts to get them up and running while I worked on the ESX server. This didn't seem like such an awful task until I realized that I was missing about half of the vm's? They were actually all there, but the name of the vm did not match the name of the folder that they lived in. This made finding them like looking for a needle in haystack! I had to peruse many datastores and directory structures looking through numerous vmx files for the display name of the vm to match them up. Wow! there has to be an easier way to clean this up and also locate and remove orphaned folders that have not been used in years?

Reply
0 Kudos
4 Replies
Kahonu84
Hot Shot
Hot Shot

Aloha,

My first step would be to ensure that the display names of the VMs match up with their corresponding folders and files. To do this, copy the out-of-sync VMs to a different datastore. I would create a new datastore(s) to migrate these VMs to. Hopefully thru this process (and perhaps some additional shuffling), you could make some of the old datastores obsolete. Once going thru this process, it will be alot easier to separate the good from the garbage. This will be a good step towards making the system "yours" and a good step away from the mess it sounds like you inherited.

Bill

Reply
0 Kudos
FranckRookie
Leadership
Leadership

Hi Dkraut,

You can also have a look at RVTools . It can help you find orphaned and mismatched folders quicker than manually.

Good luck!

Regards

Franck

Reply
0 Kudos
rickardnobel
Champion
Champion

My first step would be to ensure that the display names of the VMs match up with their corresponding folders and files. To do this, copy the out-of-sync VMs to a different datastore.

When doing a copy will the destination folder be renamed to match the VM name? Or would you do that manual?

What about Storage vMotion, will that change the names or keep the names of the VM folders even if not matching the VM display name?

My VMware blog: www.rickardnobel.se
Reply
0 Kudos
dkraut
Enthusiast
Enthusiast

Ricnob, I believe what Kahonu84 is referring to is indeed storage vmotion. When you migrate a vm's storage to another datastore, it will change all the underlying filenames to match the vm name. This works well when operating in "proactive" mode, but in my situation I had already lost access to many disjointed vm's. I'll take a look at RVTools tomorrow Franck.

Thanks!

Reply
0 Kudos