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

Selenium firefox driver session fails with : Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location,

 Error: With Firefox driver /gecko driver Could not start a new session. Response code 500. Message: Expected browser binary location, but u...