register VMs from all datastores where we have .vmx file

When you want to register all VMs from datastore use below script to register all VMs.


A) Register all Virtual Machine in a datastore
find /vmfs/volumes/<Datastore name>/ -type f -maxdepth 2 -name '*.vmx' -exec vim-cmd solo/registervm {} \;

 

B) Register all Virtual Machine in all datastore
find /vmfs/volumes/ -maxdepth 3 -name '*.vmx' -exec vim-cmd solo/registervm {} \;

No comments:

Post a Comment

How to increase ESXi webclient login user application timeout

 To increase the default 15min timeout to 2hr Login to the esxi webclient on the right top corner ->Click the User login tab Select "...