Managing Hosts 3.2

In order to use your existing physical nodes, you have to add them to the system as OpenNebula hosts. You need the following information: * //Hostname// of the host or IP * //Information Driver// to be used to monitor the host, e.g. ''im_kvm''. These should match the Virtualization Drivers installed and more info about them can be found at the [[.:vmmg|Virtualization Subsystem guide]]. * //Virtualization Driver// to boot, stop, resume or migrate VMs in the host, e.g. ''vmm_kvm''. Information about these drivers can be found in [[.:vmmg|its guide]]. * //Storage Driver// to clone, delete, move or copy images into the host, e.g. ''tm_shared''. Information about these drivers can be found in [[.:sm|its guide]]. * //Networking Driver// to isolate virtual networks and apply firewalling rules, e.g. ''802.1Q''. Information about these drivers can be found in [[.:nm|its guide]].
:!: Before adding a host check that you can ssh to it without being prompt for a password
====== Scheduler Policies ====== Users can require their virtual machines to be deployed in a host that meets certain constrains. These constrains can be defined using any attribute reported by ''onehost show'' like the architecture (ARCH). A very convenient use of this feature is to divide the hosts using user-defined attributes, like 'CLUSTER'. To do so you can either [[.:img|create a probe in the host]], or update the host information with: ''onehost update '', adding a line containing ''CLUSTER=''. From this point, the newly created machines can use this cluster names as a [[.:template#placement_section | placement requirement]]: REQUIREMENTS = "CLUSTER = \"testing\"" ====== A Sample Session ====== Hosts can be added to the system anytime with the ''[[.:cli#onehost | onehost]]'' command. You can add the hosts to be used by OpenNebula like this: $ onehost create host01 im_kvm vmm_kvm tm_shared dummy $ onehost create host02 im_kvm vmm_kvm tm_shared dummy The status of the hosts can be checked with the ''[[.:cli#onehost | onehost list]]'' command: $ onehost list ID NAME RVM TCPU FCPU ACPU TMEM FMEM AMEM STAT 0 host01 7 400 290 400 3.7G 2.2G 3.7G on 1 host02 2 400 294 400 3.7G 2.2G 3.7G on 2 host03 0 400 312 400 3.7G 2.2G 3.7G off And specific information about a host with ''[[.:cli#onehost | show]]'': $ onehost show host01 HOST 0 INFORMATION ID : 0 NAME : host01 STATE : MONITORED IM_MAD : im_kvm VM_MAD : vmm_kvm VN_MAD : dummy TM_MAD : tm_shared HOST SHARES MAX MEM : 3921416 USED MEM (REAL) : 1596540 USED MEM (ALLOCATED) : 0 MAX CPU : 400 USED CPU (REAL) : 74 USED CPU (ALLOCATED) : 0 RUNNING VMS : 7 MONITORING INFORMATION ARCH=x86_64 CPUSPEED=2393 FREECPU=326.0 FREEMEMORY=2324876 HOSTNAME=rama HYPERVISOR=kvm MODELNAME="Intel(R) Core(TM) i5 CPU M 450 @ 2.40GHz" NETRX=0 NETTX=0 TOTALCPU=400 TOTALMEMORY=3921416 USEDCPU=74.0 USEDMEMORY=1596540 If you want not to use a given host you can temporarily disable it: $ onehost disable host01 A disabled host should be listed with ''STAT off'' by ''onehost list''. You can also remove a host permanently with: $ onehost delete host01
:!: Detailed information of the ''onehost'' utility can be found [[.:cli#onehost| in the Command Line Reference]]
====== Setting Custom Values ====== Values for a host are inserted by the monitoring probes that run from time to time on the nodes to get information but there are times that we want to manually set a special value for a host. To be able to do this there is a ''onehost'' command called ''update''. Calling this command with a host id as a parameter will fire up an editor (the one specified in ''EDITOR'' environment variable) and you will be able to add, delete or modify some of its values. $ onehost show 3 [...] MONITORING INFORMATION CPUSPEED=2.2GHz FREECPU=800 FREEMEMORY=16777216 HOSTNAME=ursa06 HYPERVISOR=dummy TOTALCPU=800 TOTALMEMORY=16777216 USEDCPU=0 USEDMEMORY=0 $ onehost update 3 [in editor, add VARIABLE=value] $onehost show 3 [...] MONITORING INFORMATION CPUSPEED=2.2GHz FREECPU=800 FREEMEMORY=16777216 HOSTNAME=ursa06 HYPERVISOR=dummy TOTALCPU=800 TOTALMEMORY=16777216 USEDCPU=0 USEDMEMORY=0 VARIABLE=value This feature is useful when we want to separate a series of hosts or marking some special features of different hosts. These values can then be used for scheduling the same as the ones added by the monitoring probes. ====== Using Sunstone to Manage Hosts ====== You can also manage your hosts using [[.:sunstone| Sunstone]]. Select the Host tab, and there, you will be able to create, enable, disable, delete your hosts in a user friendly way. {{ :documentation:rel3.2:sunstone:hosts_view.png?700 |}}