ONED Configuration 4.4
The OpenNebula daemon oned
manages the cluster nodes, virtual networks, virtual machines, users, groups and storage datastores. The configuration file for the daemon is called oned.conf
and it is placed inside the /etc/one
directory. In this reference document we describe all the format and options that can be specified in oned.conf
.
MANAGER_TIMER
: Time in seconds the core uses to evaluate periodical functions. MONITORING_INTERVAL cannot have a smaller value than MANAGER_TIMER.MONITORING_INTERVAL
: Time in seconds between each monitorization.MONITORING_THREADS
: Max. number of threads used to process monitor messagesHOST_PER_INTERVAL
: Number of hosts monitored in each interval.HOST_MONITORING_EXPIRATION_TIME
: Time, in seconds, to expire monitoring information. Use 0 to disable HOST monitoring recording.VM_PER_INTERVAL
: Number of VMs monitored in each interval.VM_MONITORING_EXPIRATION_TIME
: Time, in seconds, to expire monitoring information. Use 0 to disable VM monitoring recording.SCRIPTS_REMOTE_DIR
: Remote path to store the monitoring and VM management script.PORT
: Port where oned will listen for xml-rpc calls.DB
: Vector of configuration attributes for the database backend.server
(MySQL only): Host name or an IP address for the MySQL server.user
(MySQL only): MySQL user's login ID.passwd
(MySQL only): MySQL user's password.db_name
(MySQL only): MySQL database name.VNC_BASE_PORT
: VNC ports for VMs can be automatically set to VNC_BASE_PORT
+ VMID
. Refer to the VM template reference for further information.VM_SUBMIT_ON_HOLD
: Forces VMs to be created on hold state instead of pending. Values: YES or NO.LOG
: Configure the logging systemSYSTEM
: Can be either file
(default) or syslog
.DEBUG_LEVEL
: Sets the level of verbosity of the log messages. Possible values are:
DEBUG_LEVEL | Meaning |
---|---|
0 | ERROR |
1 | WARNING |
2 | INFO |
3 | DEBUG |
Example of this section:
#******************************************************************************* # Daemon configuration attributes #******************************************************************************* LOG = [ system = "file", debug_level = 3 ] #MANAGER_TIMER = 30 MONITORING_INTERVAL = 60 MONITORING_THREADS = 50 #HOST_PER_INTERVAL = 15 #HOST_MONITORING_EXPIRATION_TIME = 43200 #VM_PER_INTERVAL = 5 #VM_MONITORING_EXPIRATION_TIME = 14400 SCRIPTS_REMOTE_DIR=/var/tmp/one PORT = 2633 DB = [ backend = "sqlite" ] # Sample configuration for MySQL # DB = [ backend = "mysql", # server = "localhost", # port = 0, # user = "oneadmin", # passwd = "oneadmin", # db_name = "opennebula" ] VNC_BASE_PORT = 5900 #VM_SUBMIT_ON_HOLD = "NO"
MAX_CONN
: Maximum number of simultaneous TCP connections the server will maintainMAX_CONN_BACKLOG
: Maximum number of TCP connections the operating system will accept on the server's behalf without the server accepting them from the operating systemKEEPALIVE_TIMEOUT
: Maximum time in seconds that the server allows a connection to be open between RPCsKEEPALIVE_MAX_CONN
: Maximum number of RPCs that the server will execute on a single connectionTIMEOUT
: Maximum time in seconds the server will wait for the client to do anything while processing an RPC#******************************************************************************* # XML-RPC server configuration #******************************************************************************* #MAX_CONN = 15 #MAX_CONN_BACKLOG = 15 #KEEPALIVE_TIMEOUT = 15 #KEEPALIVE_MAX_CONN = 30 #TIMEOUT = 15
NETWORK_SIZE
: Default size for virtual networks MAC_PREFIX
: Default MAC prefix to generate virtual network MAC addressesSample configuration:
#******************************************************************************* # Physical Networks configuration #******************************************************************************* NETWORK_SIZE = 254 MAC_PREFIX = "02:00"
The Storage Subsystem allows users to set up images, which can be operative systems or data, to be used in Virtual Machines easily. These images can be used by several Virtual Machines simultaneously, and also shared with other users.
Here you can configure the default values for the Datastores and Image templates. You have more information about the templates syntax here.
DATASTORE_LOCATION
: Path for Datastores in the hosts. It is the same for all the hosts in the cluster. DATASTORE_LOCATION
is only for the hosts and not the front-end. It defaults to /var/lib/one/datastores (or $ONE_LOCATION/var/datastores
in self-contained mode)DATASTORE_BASE_PATH
: This is the base path for the SOURCE attribute of the images registered in a Datastore. This is a default value, that can be changed when the datastore is created.DATASTORE_CAPACITY_CHECK
: Checks that there is enough capacity before creating a new imag. Defaults to Yes.DEFAULT_IMAGE_TYPE
: Default value for TYPE field when it is omitted in a template. Values accepted are OS
, CDROM
, DATABLOCK
.DEFAULT_DEVICE_PREFIX
: Default value for DEV_PREFIX field when it is omitted in a template. The missing DEV_PREFIX attribute is filled when Images are created, so changing this prefix won't affect existing Images. It can be set to:
Prefix | Device type |
---|---|
hd | IDE |
sd | SCSI |
xvd | XEN Virtual Disk |
vd | KVM virtual disk |
More information on the image repository can be found in the Managing Virtual Machine Images guide.
Sample configuration:
#******************************************************************************* # Image Repository Configuration #******************************************************************************* #DATASTORE_LOCATION = /var/lib/one/datastores #DATASTORE_BASE_PATH = /var/lib/one/datastores DATASTORE_CAPACITY_CHECK = "yes" DEFAULT_IMAGE_TYPE = "OS" DEFAULT_DEVICE_PREFIX = "hd"
This driver CANNOT BE ASSIGNED TO A HOST, and needs to be used with KVM or Xen drivers Options that can be set:
-a
: Address to bind the collectd sockect (defults 0.0.0.0)-p
: UDP port to listen for monitor information (default 4124)-f
: Interval in seconds to flush collected information (default 5)-t
: Number of threads for the server (defult 50)-i
: Time in seconds of the monitorization push cycle. This parameter must be smaller than MONITORING_INTERVAL, otherwise push monitorization will not be effective.Sample configuration:
IM_MAD = [ name = "collectd", executable = "collectd", arguments = "-p 4124 -f 5 -t 50 -i 20" ]
The information drivers are used to gather information from the cluster nodes, and they depend on the virtualizer you are using. You can define more than one information manager but make sure it has different names. To define it, the following needs to be set:
/usr/lib/one/mads/
/etc/one/
.For more information on configuring the information and monitoring system and hints to extend it please check the information driver configuration guide.
Sample configuration:
#------------------------------------------------------------------------------- # KVM Information Driver Manager Configuration # -r number of retries when monitoring a host # -t number of threads, i.e. number of hosts monitored at the same time #------------------------------------------------------------------------------- IM_MAD = [ name = "kvm", executable = "one_im_ssh", arguments = "-r 0 -t 15 kvm" ] #-------------------------------------------------------------------------------
The virtualization drivers are used to create, control and monitor VMs on the hosts. You can define more than one virtualization driver (e.g. you have different virtualizers in several hosts) but make sure they have different names. To define it, the following needs to be set:
/usr/lib/one/mads/
/etc/one/
For more information on configuring and setting up the virtualizer please check the guide that suits you:
Sample configuration:
#------------------------------------------------------------------------------- # Virtualization Driver Configuration #------------------------------------------------------------------------------- VM_MAD = [ name = "kvm", executable = "one_vmm_ssh", arguments = "-t 15 -r 0 kvm", default = "vmm_ssh/vmm_ssh_kvm.conf", type = "kvm" ]
The transfer drivers are used to transfer, clone, remove and create VM images. The default TM_MAD driver includes plugins for all supported storage modes. You may need to modify the TM_MAD to add custom plugins.
/usr/lib/one/mads/
For more information on configuring different storage alternatives please check the storage configuration guide.
Sample configuration:
#------------------------------------------------------------------------------- # Transfer Manager Driver Configuration #------------------------------------------------------------------------------- TM_MAD = [ executable = "one_tm", arguments = "-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph" ]
The configuration for each driver is defined in the TM_MAD_CONF section. These values are used when creating a new datastore and should not be modified since they define the datastore behaviour.
Sample configuration:
TM_MAD_CONF = [ name = "lvm", ln_target = "NONE", clone_target= "SELF", shared = "yes" ] TM_MAD_CONF = [ name = "shared", ln_target = "NONE", clone_target= "SYSTEM", shared = "yes" ]
The Datastore Driver defines a set of scripts to manage the storage backend.
/usr/lib/one/mads/
Sample configuration:
DATASTORE_MAD = [ executable = "one_datastore", arguments = "-t 15 -d dummy,fs,vmfs,lvm,ceph" ]
For more information on this Driver and how to customize it, please visit its reference guide.
Hooks in OpenNebula are programs (usually scripts) which execution is triggered by a change in state in Virtual Machines or Hosts. The hooks can be executed either locally or remotely in the node where the VM or Host is running. To configure the Hook System the following needs to be set in the OpenNebula configuration file:
/usr/lib/one/mads/
/etc/one/
Sample configuration:
HM_MAD = [ executable = "one_hm" ]
Sample configuration:
VM_HOOK = [ name = "on_failure_recreate", on = "FAILED", command = "/usr/bin/env onevm delete --recreate", arguments = "$ID" ] VM_HOOK = [ name = "advanced_hook", on = "CUSTOM", state = "ACTIVE", lcm_state = "BOOT_UNKNOWN", command = "log.rb", arguments = "$ID $PREV_STATE $PREV_LCM_STATE" ]
Sample configuration:
AUTH_MAD = [ executable = "one_auth_mad", authn = "ssh,x509,ldap,server_cipher,server_x509" ] SESSION_EXPIRATION_TIME = 900 #ENABLE_OTHER_PERMISSIONS = "YES" DEFAULT_UMASK = 177
Sample configuration:
VM_RESTRICTED_ATTR = "CONTEXT/FILES" VM_RESTRICTED_ATTR = "NIC/MAC" VM_RESTRICTED_ATTR = "NIC/VLAN_ID" VM_RESTRICTED_ATTR = "NIC/BRIDGE" #VM_RESTRICTED_ATTR = "RANK" #VM_RESTRICTED_ATTR = "SCHED_RANK" #VM_RESTRICTED_ATTR = "REQUIREMENTS" #VM_RESTRICTED_ATTR = "SCHED_REQUIREMENTS" IMAGE_RESTRICTED_ATTR = "SOURCE"
The following attributes will be copied from the resource template to the instantiated VMs. More than one attribute can be defined.
INHERIT_IMAGE_ATTR
: Attribute to be copied from the Image template to each VM/DISK.INHERIT_DATASTORE_ATTR
: Attribute to be copied from the Datastore template to each VM/DISK.INHERIT_VNET_ATTR
: Attribute to be copied from the Network template to each VM/NIC.Sample configuration:
#INHERIT_IMAGE_ATTR = "EXAMPLE" #INHERIT_IMAGE_ATTR = "SECOND_EXAMPLE" #INHERIT_DATASTORE_ATTR = "COLOR" #INHERIT_VNET_ATTR = "BANDWIDTH_THROTTLING" INHERIT_DATASTORE_ATTR = "CEPH_HOST" INHERIT_DATASTORE_ATTR = "CEPH_SECRET" INHERIT_DATASTORE_ATTR = "CEPH_USER" INHERIT_VNET_ATTR = "VLAN_TAGGED_ID"
Sample configuration:
ONEGATE_ENDPOINT = "http://192.168.0.5:5030"