Thursday, September 1, 2011

Working with OpenNebula CLI ( OpenNebula CLI is available only on front-end )

1) Adding a new Host to compute cluster 

onehost create 

Note that im_mad, vmm_mad, tm_mad in our case should be im_kvm, vmm_kvm and tm_nfs respectively as we have configured them in /etc/one/oned.conf 

Also note that Information manager needs to collect resource availability ( CPU and Memory ) information for the host we have added. This requires: 

• oneadmin user on front-end should be able to ssh to host without entering password ( test this using sudo -u oneadmin ssh oneadmin@ on front-end ) 
• Inorder for this to work copy the contents of /var/lib/one/.ssh/id_rsa.pub on front-end to /var/lib/one/.ssh/authorized_keys on host 

Type onehost list to check the status: 

Notice the value of STAT attribute. If the attribute has a value of 'on' then the host has been successfully added to compute cluster: 

ID NAME RVM TCPU FCPU ACPU TMEM FMEM STAT 
0 192.168.155.127 0 200 198 198 1800340 1341620 on 


Look into /var/log/one/oned.log on front-end for debugging 
Once a host has been successfully added use onehost disable/enable to toggle its status. 


2) Submitting a new Virtual Machine job 

In order to provision a Virtual Machine in the compute cluster we need to construct a template and submit it using 

onevm create