15 March 2012 Jarret Lavallee

ESXi

Register all VMs on a single datastore.

~ # find /vmfs/volumes/<datastorename>/ -maxdepth 2 -name '*.vmx' -exec vim-cmd solo/registervm "{}" \;

Register all VMs on all datastores.

~ # find /vmfs/volumes/ -maxdepth 3 -name '*.vmx' -exec vim-cmd solo/registervm "{}" \;

ESX

Register all VMs on a single datastore.

~ # find /vmfs/volumes/<datastorename>/ -maxdepth 2 -name '*.vmx' -exec vmware-cmd -s register "{}" \;

Register all VMs on all datastores.

~ # find /vmfs/volumes/ -maxdepth 3 -name '*.vmx' -exec vmware-cmd -s register "{}" \;

blog comments powered by Disqus