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 unlink a NIC from a esxi vSwitch

  List the vSwitches from ESXI using CLI:          esxcli network vswitch standard list  output example: vSwitch0    Name: vSwitch0    Class...