Mount all datastores to all hosts from ncli

  • 13 June 2016
  • 2 replies
  • 3171 views

Userlevel 2
Badge +8
Hello

this might come in handy for anyone like me who has a large number of containers that they have to mount on all hosts when adding new nodes.

It is a quick and dirty way to do it

for i in `ncli container ls | grep "Name " | cut -d":" -f2 | cut -c2-`
do ncli datastore add ctr-name=$i
done

Hope this helps

2 replies

Badge +7
THANK YOU !!!

I was exactly looking for that.

Is there an equivalent for AHV?  When I try this under AHV I see:

 

only Hypervisor vmware supports creation of Nfs datastores

 

 

Reply