January 2010, CESGA Santiago de Compostela, Spain

Building Clouds with OpenNebula 1.4
Ruben S.Montero (rubensm@dacya.ucm.es) University Complutense of Madrid

Course Overview

Day one (January 18th, Moorning)

Introduction to Cloud Computing (FAST!!!) Installing OpenNebula 1.4 Configure OpenNebula 1.4 (storage, hypervisor and network) Administration of an OpenNebula Cloud (hosts, users) Basic usage (networks, VMs) More on usage (VMs, context and scheduling) Configuring an Hybrid Cloud with Amazon EC2 Public Cloud interfaces: The EC2 Query API Advance Topics: Adapt OpenNebula 1.4 to your datacenter
Private Cloud Hybrid Cloud

Day one (January 18th, Afternoon)
● ●

Day two (January 19th, Moorning)

Public Cloud

Building Clouds with OpenNebula 1.4

Ruben S. Montero

Course Overview

In this course you will learn to:

Describe the benefits and characteristics of virtual infrastructures and IaaS clouds Describe the characteristics and architecture of the different clouds that can be deployed with OpenNebula 1.4 Plan and architect a private cloud Design, Use applications) and Manage Virtual infrastructures (cloud

Build public and hybrid clouds Adapt OpenNebula 1.4 to your datacenter

This box contains interesting messages This is a console output, for hands on, checking configuration files... # This is the root prompt $ This is oneadmin prompt

Building Clouds with OpenNebula 1.4

Ruben S. Montero

January 2010, CESGA Santiago de Compostela, Spain

PART I: Building your Private Cloud
Ruben S.Montero (rubensm@dacya.ucm.es) University Complutense of Madrid

Cloud Computing in a Nutshell What Software as a Service On-demand access to any application Who End-user (does not care about hw or sw) Platform as a Service Platform for building and delivering web applications Developer (no managing of the underlying hw & swlayers) Infrastructure as a Service ᄎ Delivery of a raw computer infrastructure System Administrator (complete management of the computer infrastructure) In this course Physical Infrastructure Building Clouds with OpenNebula 1. Montero .4 Ruben S.

The IaaS Clouds a Four Point Check List ● Simple Interface Raw Infrastructure Resources ● ● ● Total control of the resources Capacity leased in the form of VMs Complete Service-HW decoupling A single user can not get all the resources ● ● Pay-as-you-go ● ● Elastic & “infinite” Capacity Building Clouds with OpenNebula 1.4 Ruben S. Montero .

The Anatomy of an IaaS Cloud VM Cloud API (web) VM Service VM VM VM Service VM Virtual Infrastructure Manager (VIM) Network Image Repositories (Storage) Physical Infrastructure Building Clouds with OpenNebula 1.4 Ruben S. Montero .

Why Virtual Infrastructure Manager a Virtual Infrastructure Manager? ● VMs are great!!.4 Ruben S... Montero . Network and Virtualization VM VM VM VM ● ● OpenNebula (VIM) hypervisor hypervisor hypervisor hypervisor Building Clouds with OpenNebula 1.but something more is needed ● ● ● Where did/do I put my VM? (scheduling & monitoring) How do I provision a new cluster node? (clone & context) What MAC addresses are available? (networking) ● Provides a uniform view of the resource pool Life-cycle management and monitoring of VM The VIM integrates Image.

. monitoring.) ● Modular components to interact with the cluster services ● Types: storage. virtualization and network ● The same host can be can be a the front-end and a node Building Clouds with OpenNebula 1.4 Provides physical resources to VMs ● Must have a hypervisor installed ● Ruben S. iSCSI. Montero .Planning the Installation: System Overview Executes the OpenNebula Services ● Usually acts as a classical cluster front-end ● Repository of VM images ● Multiple backends (LVM.

.4 Ruben S..) or selfcontained (under $ONE_LOCATION) Install software dependencies ● ● Runtime (also ssh and openssl) # apt-get install ruby # apt-get install sqlite3 # apt-get install libxmlrpc-c3 ● Development libraries and tools (only needed to build OpenNebula) # apt-get install libxmlrpc-c3-dev libsqlite3-dev libssl-dev # apt-get install g++ scons # apt-get install ruby-dev rubygems rake The following will give you a faster XML parser (faster CLI) # apt-get install libxml-parser-ruby1.Planning the Installation: Working in the Front-End . /etc.UTF-8" Building Clouds with OpenNebula 1...8 libxslt1-dev libxml2-dev # gem install nokogiri SET SYSTEM LOCALES TO ENGLISH (oneadmin should be enough.. ● Choose your installation mode: system wide (/usr. Montero ..) # cat /etc/default/locale LANG="en_US.

Need to be defined in OpenNebula We will use the /srv/cloud directory to place the OpenNebula software /srv/cloud/one will hold the OpenNebula installation /srv/cloud/images will do our image repository in the course ● ● Installation layout ● ● ● # tree /srv /srv/ `-. Users do not need a UNIX account in the nodes.SRC The oneadmin account must be created system wide (i. Montero . start VMs.g. move images. nor in the front-end... ● The Users of the private cloud: ● oneadmin: Account to run the daemons.). or a local account with the same ID's in all the hosts.images `-.e.Planning the Installation: Working in the Front-End . Building Clouds with OpenNebula 1.. manage the system and do all the low-level operations (e.cloud |-.4 Ruben S.one |-. front-end and all the nodes) you can use NIS.. Users: create and manage their own VMs and networks.

Planning the Installation: Working in the Front-End .... Montero .4 Ruben S. ● Hands on. # groupadd -g 3000 cloud # mkdir /srv/cloud # chmod g+ws cloud /srv/cloud # mkdir /srv/cloud/images # useradd -d /srv/cloud/one -g cloud -u 3000 -s /bin/bash -m oneadmin Create the file-system hierarchy with the oneadmin account $ id uid=3000(oneadmin) gid=3000(cloud) grupos=3000(cloud) $ mkdir /srv/cloud/images $ mkdir SRC We will place the OpenNebula source code in SRC Building Clouds with OpenNebula 1..

you will also want to store 10-15 master images so ~200GB for /srv/cloud/images. Building Clouds with OpenNebula 1. description files and VM disks Actual operations over the VM directory depends on the storage medium Should be shared for live-migrations You can go on without a shared FS and use the SSH back-end Defaults to $ONE_LOCATION/var/$VM_ID ● VM Directory: The home of the VM in the cluster node – – – – – Dimensioning the Storage. ● Image Repository: Any storage medium for the VM images (usually a high performing SAN) – – OpenNebula supports multiple back-ends (e. each VM will require an average of 10GB of disk space. So you will need ~800GB for /srv/cloud/one.4 Ruben S. Example: A 64 core cluster will typically run around 80VMs. LVM for fast cloning) The front-end must have access to the repository Stores checkpoints.Planning the Installation: Working in the Front-End .. Montero .g. A 1TB /srv/cloud will be enough for this example setup.... ● Preparing the storage for the private cloud...

4 Ruben S. Montero .. ● In this course we will use NFS to share the VM directories The Image Repository is /srv/cloud/images ● Building Clouds with OpenNebula 1.Planning the Installation: Working in the Front-End ..

● Hands on.d/nfs-kernel-server start Building Clouds with OpenNebula 1.XX..async.only need /srv/cloud/one/var .YY(rw.4 Ruben S.d/nfs-kernel-server stop # /etc/init.Planning the Installation: Working in the Front-End ..21.we also export $HOME of oneadmin for easy SSH key configuration . Montero .no_subtree_check.. # apt-get install nfs-kernel-server Export /srv/cloud to your nodes .No really need to export /srv/cloud/images # vi more /etc/exports /srv/cloud 84.no_root_squash) # /etc/init..

Montero . checkpoints).. Several NICs to support the VM traffic may be a good idea OpenNebula relies on bridge networking for the VMs ● ● ● Building Clouds with OpenNebula 1.Planning the Installation: Working in the Front-End . it does not require a performing NIC Image traffic. consider the typical requirements of your VMs. Dedicated storage links may be a good idea VM demands.4 Ruben S. ● Networking for the private cloud ● OpenNebula management operations uses a ssh connections. may require the movement of heavy files (VM images..

z.Planning the Installation: Working in the Nodes .rsize=32768.rw 0 0 Building Clouds with OpenNebula 1.intr..wsize=32768.. Montero .4 Ruben S.w:/srv/cloud /srv/cloud nfs soft. ● Install software dependencies ● We need SSH daemon running in the cluster nodes (check it!) Runtime dependencies: ● # apt-get install ruby ● Users ● Create the oneadmin account (use same UID and GID) # groupadd -g 3000 cloud # useradd -d /srv/cloud/one -g cloud -u 3000 -s /bin/bash oneadmin ● Storage ● Recreate the installation layout and configure NFS to mount the VM dirs # mkdir /srv/cloud # chmod g+ws cloud /srv/cloud # apt-get install nfs-common # vi /etc/fstab x.y.

4 Ruben S.yy You may need to exchange keys with the nodes (not here as we share /srv/cloud/one the oneadmin home.pub ~/. and so the ~/.Planning the Installation: SSH Configuration ● Enable password-less SSH access to cluster nodes for the oneadmin account: DO NOT PROTECT PRIVATE KEY WITH A PASSWORD $ ssh-keygen Generating public/private rsa key pair.ssh/config Host * StrictHostKeyChecking no TEST! $ ssh localhost $ ssh 84. Enter passphrase (empty for no passphrase): Enter same passphrase again: $ cp ~/.ssh/id_rsa.xx.21.ssh/authorized_keys Tell ssh client not to ask to add hosts to known_hosts (optional) $ cat /srv/cloud/one/.. . Montero ..ssh directory Building Clouds with OpenNebula 1.

169.xx Building Clouds with OpenNebula 1.xx Ruben S.168.Planning the Installation: The Hypervisor .xx 192. This course applies to KVM and Xen Refer to the hypervisor documentation for additional (and better information) on setting up them.168.170.168.168.169..21.xx.xx 192.4 .21. ● Installing the Hypervisor ● OpenNebula supports KVM. Montero VM VM 192.xx. the physical NIC Physical Host eth0 (bridge) eth0 (bridge) 84.170.yy 84.yy VM VM 192. Xen and Vmware (even simultaneously).. Install the packages ● ● Setting up KVM and libvirt (Ubuntu Karmic) ● #apt-get install qemu libvirt-bin kvm ● The network set up in this course peth0.

xml #ifconfig virbr0 down #brctl delbr virbr0 Set up the network for the course (equivalent to a Xen setup) .. Montero .sh #vi /etc/init. then log_daemon_msg "Starting $DESC" "$NAME" /etc/libvirt/set_up_bridge.sh #chmod +x /etc/libvirt/bridge..Execute it in the libvirt-bin start script #vim /etc/libvirt/bridge... ● Hands on.Planning the Installation: The Hypervisor .d/libvirt-bin . Remove the default bridge in Ubuntu #rm /etc/libvirt/qemu/networks/autostart/default..bridge..4 Ruben S..sh .. case "$1" in start) if check_start_libvirtd_option.sh will create the bridge at boot time (see next slide) . Building Clouds with OpenNebula 1.

0.0 dev p$1 brctl addbr $1 brctl stp $1 off brctl addif $1 p$1 ip link set dev p$1 up ip link set dev $1 up echo "1" > /proc/sys/net/ipv4/ip_forward fi } create_bridge eth0 route del -net 84. Montero .0/24 dev peth0 ifup eth0 Building Clouds with OpenNebula 1. then ifdown $1 ip ip ip ip link link link addr set set set add $1 down $1 name p$1 promisc on dev p$1 0...4 Ruben S. #!/bin/sh create_bridge () { ip link show p$1 > /dev/null 2>&1 if [ $? -ne 0 ] .21.xx.Planning the Installation: The Hypervisor .0.

4 Ruben S...Planning the Installation: The Hypervisor .. peth0 Link encap:Ethernet HWaddr 00:1e:4f:e0:5e:9f . lo Link encap:Bucle local .libvirtd oneadmin ● $ virsh list Connecting to uri: qemu:///system Id Name State ---------------------------------Building Clouds with OpenNebula 1.001e4fe05e9f no peth0 ● Add oneadmin to the libvirt group Test the installation for the oneadmin account # usermod -G kvm. ● Check the network configuration root@formiga-5:/srv# ifconfig eth0 Link encap:Ethernet HWaddr 00:1e:4f:e0:5e:9f ... # brctl show bridge name bridge id STP enabled interfaces eth0 8000.... Montero .

4 Ruben S. Montero .Planning the Installation: Checklist Building Clouds with OpenNebula 1.

/install.org/attachments/download/103/one1.sh -d $ONE_LOCATION Check install.4.0.desktop include/ lib/ share/ SRC/ var/ ~$ ls -F bin/ etc/ Building Clouds with OpenNebula 1.gz ~/SRC$ tar xzvf one-1.gz ~/SRC$ cd one-1.4 Ruben S.opennebula.tar.4/ ~/SRC$ scons ● Install the software in /srv/cloud/one (ONE_LOCATION) $ export ONE_LOCATION=/srv/cloud/one/ $ .4 ● Grab the source code and compile it! ~/SRC$ wget http://dev.4.0.sh -h for other options ● Check and explore the installation tree examples.tar. Montero .Installing OpenNebula 1.

Configuring OpenNebula: The configuration interface
$ONE_LOCATION/etc/oned.conf ● General configuration ● Defines the drivers used in the private cloud

Match-making scheduler (default) ● Placement policies configured per VM

$ONE_LOCATION/etc/im_*/im_*.conf ● Defines monitoring probes ● $ONE_LOCATION/etc/vmm_*/vmm_*.conf ● Defaults values for the hypervisor

$ONE_LOCATION/etc/tm_*/tm_*.conf ● Defines action for generic storage operations

Building Clouds with OpenNebula 1.4

Ruben S. Montero

Configuring OpenNebula: The oned.conf file

General configuration attributes

Monitoring intervals, HOST_MONITORING_INTERVAL VM_POLLING_INTERVAL VM_DIR: Path to the VM directory for all the cluster nodes. Network parameters, MAC_PREFIX, NETWORK_SIZE PORT : Port where oned will listen for xml-rpc calls DEBUG_LEVEL

HOST_MONITORING_INTERVAL = 60 VM_POLLING_INTERVAL = 60 #VM_DIR = /srv/cloud/one/var

MAC_PREFIX = "00:01" NETWORK_SIZE = 254 PORT DEBUG_LEVEL = 2633 = 3

Building Clouds with OpenNebula 1.4

Ruben S. Montero

Configuring OpenNebula: The oned.conf file

Information Drivers, to monitor cluster nodes

name: identifies the driver executable: absolute or relative to $ONE_LOCATION/lib/mads arguments: a probe configuration file

IM_MAD = [ name = "im_kvm", executable = "one_im_ssh", arguments = "im_kvm/im_kvm.conf" ]

Transfer Drivers, to interface with the storage

name: identifies the driver executable: path to driver executable arguments: storage commands configuration file

TM_MAD = [ name = "tm_nfs", executable = "one_tm", arguments = "tm_nfs/tm_nfs.conf" ]
Building Clouds with OpenNebula 1.4 Ruben S. Montero

Configuring OpenNebula: The oned.conf file

Virtualization Drivers, to interface the hypervisors

name: identifies the driver executable: absolute or relative to $ONE_LOCATION/lib/mads arguments: (not needed for the distribution drivers) default: default values for the hypervisor type: format of the VM description file to be passed to the driver: xen, kvm or xml
= = = = "vmm_kvm", "one_vmm_kvm", "vmm_kvm/vmm_kvm.conf", "kvm" ]

VM_MAD = [ name executable default type

Hooks, custom programs that are executed on specific events, e.g. VM creation. Hands on... Check and adjust the values of oned.conf for your cloud
Ruben S. Montero

Building Clouds with OpenNebula 1.4

Configuring OpenNebula: Accounts ● Accounts in OpenNebula ● oneadmin. has enough privileges to perform any operation on any object.one/one_auth PATH=$PATH:$ONE_LOCATION/bin ● ● Configuring the oneadmin account ● $ tail export export export ● Create the password file $ mkdir . It is created the first time OpenNebula is started using the ONE_AUTH data Regular user accounts must be created by oneadmin and they can only manage their own objects. ONE_LOCATION and ONE_XMLRPC . Montero .one $ cat one_auth oneadmin:onecloud Building Clouds with OpenNebula 1.4 Ruben S. Environment variables: ONE_AUTH.bashrc ONE_LOCATION=/srv/cloud/one ONE_AUTH=$HOME/.one $ cd .

create the ONE_AUTH file) before starting OpenNebula for the first time.2=INFO.Configuring OpenNebula: Start & Stop ● Use the one script $ source .3=DEBUG] Thu Jan 14 18:03:11 2010 [ONE][I]: Thu Jan 14 18:03:11 2010 [ONE][I]: Thu Jan 14 18:03:11 2010 [ONE][I]: Init OpenNebula Log system Log Level: 3 -----------------------------------OpenNebula Configuration File ------------------------------------ Be sure to configure the oneadmin account (specially. Montero .one/one_auth $one start oned and scheduler started $ more $ONE_LOCATION/var/oned.bashrc $ echo $ONE_AUTH /srv/cloud/one/.log Thu Jan 14 18:03:11 2010 [ONE][I]: Thu Jan 14 18:03:11 2010 [ONE][I]: [0=ERROR.1=WARNING.4 Ruben S. Building Clouds with OpenNebula 1.

delete. move or copy images into the host Virtualization Driver to boot. stop. Montero . resume VMs in the host Create & delete hosts List the hosts in the cluster Show detailed information from a host Enable/Disable a host ● ● ● ● Cluster nodes are managed with the onehost utility ● ● ● ● Building Clouds with OpenNebula 1.Configuring OpenNebula: Hosts ● Cluster nodes are defined with ● Hostname of the cluster node or IP Information Driver to be used to monitor the host Storage Driver to clone.4 Ruben S.

yy 1 84.yy 1 84..Configuring OpenNebula: Hosts ● Hands on.yy im_kvm vmm_kvm tm_nfs $ onehost create 84.xx.21.21.21.yy im_kvm vmm_kvm tm_nfs $ onehost list ID NAME 0 84.4 .21.zz RVM 0 0 TCPU 0 0 FCPU 0 0 ACPU 100 100 TMEM 0 0 FMEM STAT 0 on 0 on $ tail -f $ONE_LOCATION/var/oned.xx.xx. Thu Jan 14 18:07:44 2010 [InM][D]: Host 1 successfully monitored..yy (0) Thu Jan 14 18:07:39 2010 [InM][I]: Monitoring host 84.xx.xx.21.zz (1) Thu Jan 14 18:07:43 2010 [InM][D]: Host 0 successfully monitored. Montero Building Clouds with OpenNebula 1.21.log Thu Jan 14 18:07:39 2010 [InM][I]: Monitoring host 84..yy.21.zz $ onehost show 0 RVM 0 0 TCPU 200 200 FCPU 184 200 ACPU TMEM FMEM STAT 184 2017004 1848172 on 200 2017004 1857172 on ● Hands on.xx. configure the hosts of your private cloud $ onehost create 84. Explore and test the onehost command in your cloud Ruben S..21.xx. $ onehost list ID NAME 0 84.

. used for authentication Password used for authentication Create & delete users List the users in the cluster ● ● ● Users are managed with the oneuser utility ● ● ● Hands on.4 Ruben S. Montero ENABLE True True ..Configuring OpenNebula: Users ● Users are defined within OpenNebula by: ● ID unique identifier for the user Name of the user. create new users in your private cloud and configure the “user” UNIX account $ oneuser create helen mypass User “Helen” should put helen:mypass in $ONE_AUTH $ oneuser list UID NAME PASSWORD 0 oneadmin c24783ba96a35464632a624d9f829136edc0175e 2 helen 34a91f713808846ade4a71577dc7963631ebae14 $ oneuser delete helen Building Clouds with OpenNebula 1.

log. Scheduler (mm_sched): All the scheduler information is collected into the $ONE_LOCATION/var/sched.Configuring OpenNebula: Log Files ● The operations of the OpenNebula daemon and scheduler are logged in: ● oned: $ONE_LOCATION/var/oned. ● ● VM logs and files are in $ONE_LOCATION/var/<VM_ID>. Montero .. Its verbosity is set by DEBUG_LEVEL in $ONE_LOCATION/etc/oned..log file. more in a few slides.4 Ruben S.conf. Drivers can activate ONE_MAD_DEBUG in the associated RC file (or in $ONE_LOCATION/etc/defaultrc) ● Building Clouds with OpenNebula 1.

Spain PART II: Using your Private Cloud Ruben S.es) University Complutense of Madrid .Montero (rubensm@dacya. CESGA Santiago de Compostela.ucm.January 2010.

a set of IP/MAC leases Ranged.4 Ruben S. i. can be used by VMs of any other user Building Clouds with OpenNebula 1. name of the physical bridge in the physical host where the VM should connect its network interface. Montero . ● Virtual Networks are managed with the onevnet utility Networks created by oneadmin are public. defines a network range ● Bridge. of the network Type – – ● ● ● Virtual Network definition ● ● Fixed.e.Using the Private Cloud: Virtual Networks ● A Virtual Network in OpenNebula ● Defines a separated MAC/IP address space to be used by VMs Each virtual network is associated with a physical network through a bridge Virtual Networks can be isolated (at layer 2 level) with ebtables and hooks Name.

170.170. explore the use of onevnet list. Montero Building Clouds with OpenNebula 1.168..5] LEASES = [IP=192.net $ onevnet -v create red.10] LEASES = [IP=192.net NAME = "Red LAN" TYPE = RANGED BRIDGE = eth0 NETWORK_SIZE = C NETWORK_ADDRESS = 192.168.170..168.Using the Private Cloud: Virtual Networks ● Hands on.20] LEASES = [IP=192.4 ..170. show.. delete Ruben S.15] LEASES = [IP=192.net ● Hands on.169.net NAME = "Blue LAN" TYPE = FIXED BRIDGE = eth0 LEASES = [IP=192.168.0 $ vi blue.168.25] $ onevnet -v create blue. $ vi red.168.170.

IP-MAC address correspondence I P: 10.3] ● Prepare the VM to use the IP.168.Using the Private Cloud: Virtual Networks ● Using a Virtual Network with your VMs ● Define NICs attached to a given virtual network.conf Building Clouds with OpenNebula 1. Sample scripts to set the IP based on the MAC are provided for several Linux distributions.0. The VM will get a NIC with a free MAC in the network and attached to the corresponding bridge #A VM with two interfaces each one in a different vlan NIC=[NETWORK="Blue LAN"] NIC=[NETWORK="Red LAN"] #Ask for a specific IP/MAC of the Red vlan NIC=[NETWORK="Red LAN". Montero .4 IP Address Ruben S. 0. 2 M AC: 02: 01: 0A: 00: 01: 02 oned. IP=192. 1.

Montero .g.Using the Private Cloud: Virtual Machines ● Preparing a VM to be used with OpenNebula ● You can use any VM prepared for the target hypervisor Hint I: Place the vmcontext.4 Ruben S. use the CONTEXT Hint V: Pass arbitrary data to a master image using CONTEXT ● ● Building Clouds with OpenNebula 1. ssh keys) in the master images. OpenNebula can create plain FS on-thefly in the target host – ● Hint III: Install once and deploy many. OpenNebula can create swap partitions on-the-fly in the target host Scratch or volatile storage. prepare master images Hint IV: Do not put private information (e.sh script in the boot process to make better use of vlans Hint II: Do not pack useless information in the VM images: – ● ● swap.

4 Ruben S. Montero .Using the Private Cloud: Virtual Machines ● Virtual Machine Life-cycle Building Clouds with OpenNebula 1.

Using the Private Cloud: Virtual Machines ● A Virtual Machine in OpenNebula ● A capacity in terms memory and CPU A set of NICs attached to one or more virtual networks A set of disk images.) are stored in $ONE_LOCATION/var/<VM_ID> ● ● Building Clouds with OpenNebula 1. with the memory image of a running VM plus some hypervisor specific information. to be “transfered” to/from the execution host. A state file (optional) or recovery file.. Montero .. state files.4 Ruben S. images. ● ● ● ● Virutal Machines are defined in a VM template Each VM has an unique ID in OpenNebula the VM_ID All the files (logs.

Montero . root = "device to be mounted as root" bootloader = "path to the boot loader exec” boot = "device to boot from" ] Building Clouds with OpenNebula 1.Using the Private Cloud: Virtual Machines ● Virtual Machine Definition File (VM templates) #--------------------------------------# Name of the VM #--------------------------------------NAME = "vm-example" # Optional.4 Ruben S. # para-virtualization initrd = "path_to_initrd_image". Default: one-$VMID #--------------------------------------# Capacity #--------------------------------------CPU = "amount_of_requested_CPU" MEMORY = "amount_of_requested_MEM" VCPU = "number of virtual cpus" #--------------------------------------# OS and boot options #--------------------------------------OS = [ kernel = "path_to_os_kernel". # para-virtualization kernel_cmd = "kernel_command_line".

"yes|no" ] Ruben S. "device_to_map_disk". KVM #--------------------------------------# VM Disks #--------------------------------------DISK = [ type source format size target bus readonly clone save = = = = = = = = = "floppy|disk|cdrom|swap|fs|block". "path_to_disk_image_file|physical_dev". "size_in_GB". “type for fs disks”.Using the Private Cloud: Virtual Machines ● Virtual Machine Definition File (VM templates) #--------------------------------------# Features of the hypervisor #--------------------------------------FEATURES = [ pae = "yes|no". "ide|scsi|virtio|xen". acpi = "yes|no" ] # Optional. "yes|no".4 . Montero Building Clouds with OpenNebula 1. KVM # Optional. "yes|no".

"path_to_script_to_bring_up_if". "name_of_bridge_to_bind_if".4 Ruben S. "device_name_to_map_if". bus = "usb|ps2|xen" ] Building Clouds with OpenNebula 1. "NIC model"] #--------------------------------------# I/O Interfaces #--------------------------------------INPUT = [ type = "mouse|tablet".Using the Private Cloud: Virtual Machines ● Virtual Machine Definition File (VM templates) #--------------------------------------# Network Interfaces #--------------------------------------NIC = [ network ip bridge target mac script Model = = = = = = = "name_of_the_virtual_network". "HW_address". Montero . "ip_address".

Using the Private Cloud: Virtual Machines ● Virtual Machine Definition File (VM templates) #--------------------------------------# I/O Interfaces #--------------------------------------GRAPHICS type listen port passwd = = = = = [ "vnc|sdl". "IP-to-listen-on".4:template Building Clouds with OpenNebula 1.php?id=documentation:rel1.org/doku.opennebula. "port_for_VNC_server". Complete reference and examples for all sections in http://www. Montero .4 Ruben S. data = "raw_domain_configutarion"] Not all the parameters are supported for each hypervisor. "passwor_for_VNC_server" ] #--------------------------------------# Raw Hypervisor attributes #--------------------------------------RAW = [ type = "xen|kvm".

listen = "loclahost". readonly = "no" ] NIC = [ NETWORK = "Red LAN" ] FEATURES = [ acpi="no" ] #This may be useful to debug your VMs (can use also console) GRAPHICS = [ type = "vnc". port = "5902".4 Ruben S.. target = "hda".img".. Montero .1 MEMORY = 64 DISK = [ source = "/srv/cloud/images/ttylinux/ttylinux.Using the Private Cloud: Virtual Machines ● Hands on. define a ttylinux VM NAME = ttylinux CPU = 0. keymap="es"] Building Clouds with OpenNebula 1.

net/bugs/457716 #include <abstractions/private-files-strict> owner @{HOME}/ r. owner @{HOME}/** rw.10) # tail /etc/apparmor.4 Ruben S. # /etc/init.d/apparmor restart Building Clouds with OpenNebula 1.d/abstractions/libvirt-qemu # https://launchpad.Using the Private Cloud: Virtual Machines ● Fix the apparmor libvirt issue for the cluster nodes (bug in 9. Montero . /srv/cloud/one/var/** rw.

● Create a couple of VMs and check virtual network usage (onevnet) Try control operations with the VMs stop.. livemigrate. resume. delete. deploy shutdown. cancel. restart Information: list. migrate. stop. show.4 ● .Using the Private Cloud: Virtual Machines ● Virtual Machines are managed with the onevm utility ● Operations: create. resume. Modify the template – – ● ● Add one more NIC for the Blue network Add another DISK for VM data (type=”fs”. suspend..one $ onevm list ID USER NAME STAT CPU 1 oneadmin ttylinux pend 0 $ onevm top ● MEM 0 HOSTNAME TIME 00 00:00:28 Hands on. top. Montero Building Clouds with OpenNebula 1.. history ● $ onevm create ttylinux.. format=”ext2”) Ruben S. shutdown.

target= "device to attach the context device" ] Building Clouds with OpenNebula 1.sh as var_1=”val_1” (sh syntax) var_n = "value_n".Using the Private Cloud: Virtual Machines ● Context contains data to be passed to the VM at boot time #--------------------------------------# Context for the VM # values can be: # $<template_variable> # $<template_variable>[<attribute>] # $<template_variable>[<attribute>.sh as var_N=”val_N” (sh syntax) files = "space-separated list of paths to include in context device".4 Ruben S. <attribute2>=<value2>] # $<vm_id>.#Will be in context.<context_var> #--------------------------------------CONTEXT = [ var_1 = "value_1".#Will be in context. Montero .

.pub".ssh/id_rsa.local) it will – – – mount iso (do it yourself and see the ISO layout.pub" ] $ more init.sh so you can try anything CONTEXT = [ files = "/srv/cloud/images/ttylinux/init.sh /srv/cloud/one/.sh In this example it will execute init.. target = "hdc". Add custom ssh keys the VM image ● Check boot process of the ttylinux VM (systemrc.sh fi if [ -f /mnt/context/$ROOT_PUBKEY ]. /mnt/context/context.sh #!/bin/bash if [ -f /mnt/context/context. Montero . root_pubkey = "id_rsa.Using the Private Cloud: Virtual Machines ● Hands on.ssh/authorized_keys fi Building Clouds with OpenNebula 1.4 Ruben S.) Source context. then cat /mnt/context/$ROOT_PUBKEY >> /root/..sh ] then ..

.4 ....Using the Private Cloud: Virtual Machines ● Tunning the placement of VMs with the Match-making scheduler ● First those hosts that do not meet the VM requirements are filtered out (REQUIREMENTS) RANK is evaluated for the remaining hosts That with the highest RANK is used for the VM ● ● ● Placement policies are specified per VM #--------------------------------------# Scheduler #--------------------------------------# Use Host Monitor attributes REQUIREMENTS = "Bool_expression_for_reqs" RANK = "Arith_expression_to_rank_hosts" ● Hands on.. try a simple VM pinning Hands on. Montero REQUIREMENTS = "HOSTNAME=\”.\”" ● RANK = FREECPU Building Clouds with OpenNebula 1.. try a simple load-aware policy Ruben S.

Spain PART III: Using External Cloud Providers (Hybrid Cloud) Ruben S.Montero (rubensm@dacya.January 2010. CESGA Santiago de Compostela.es) University Complutense of Madrid .ucm.

Montero .4 Ruben S. usually VPNs ● External Clouds are like any other host ● Placement constraints ● Building Clouds with OpenNebula 1.Hybrid Cloud Computing: Overview VMs can be local or remote ● VM connectivity has to be configured.

manifest..s3. try the EC2 tools (ec2-*) ● # apt-get install ec2-api-tools ec2-ami-tools ● $ export EC2_PRIVATE_KEY=/srv/cloud/one/ec2/pk.amazonaws.pem $ ec2-describe-images IMAGE ami-0742a66e /rubensmamis.xml 418314910487 available private i386 machine IMAGE ami-e142a688 rubensmamis..manifest. Montero .4 Ruben S.amazonaws.com/image.Installing the Hybrid Cloud Components ● OpenNebula distribution includes drivers to build hybrid clouds with Amazon EC2 and Elastic Hosts Additional requirements: EC2 libraries and tools Hands on.pem $ export EC2_CERT=/srv/cloud/one/ec2/cert.com/image.s3.xml 418314910487 available private i386 machine Building Clouds with OpenNebula 1.

conf".g. of instances of each type VM_MAD = [ name executable arguments type = = = = "vmm_ec2".conf IM_MAD = [ name = "im_ec2". arguments = "im_ec2/im_ec2. executable = "one_tm". executable = "one_im_ec2".. e.4 Ruben S.Configuring the EC2 Hybrid Cloud Driver ● Hands on. # Defaults. Add the following drivers to oned. "one_vmm_ec2".. Montero .conf" ] ● Hands on. "vmm_ec2/vmm_ec2. keypair "xml" ] TM_MAD = [ #No actual transfers are made by OpenNebula to EC2 name = "tm_dummy"... Check the values of the driver configurations files Building Clouds with OpenNebula 1. arguments = "tm_dummy/tm_dummy.conf" ] # No.

pem" EC2_CERT="/srv/cloud/one/ec2/cert.Configuring the EC2 Hybrid Cloud Driver ● Configure the account to be used with Amazon EC2 $ vim $ONE_LOCATION/etc/vmm_ec2/vmm_ec2rc #---------------------------------------------------------------------# EC2 API TOOLS Configuration. Fri Jan 15 00:16:47 2010 [InM][I]: Loading driver: im_kvm Fri Jan 15 00:16:47 2010 [InM][I]: Driver im_kvm loaded Fri Jan 15 00:16:47 2010 [InM][I]: Loading driver: im_ec2 Building Clouds with OpenNebula 1. Fri Jan 15 18:16:47 2010 [VMM][I]: Loading driver: vmm_ec2 (XML) Fri Jan 15 00:16:47 2010 [InM][I]: Loading Information Manager drivers. #---------------------------------------------------------------------EC2_HOME=/usr EC2_PRIVATE_KEY="/srv/cloud/one/ec2/pk.log Fri Jan 15 18:16:46 2010 [VMM][I]: Loading Virtual Machine Manager driv Fri Jan 15 18:16:46 2010 [VMM][I]: Loading driver: vmm_kvm (KVM) Fri Jan 15 18:16:47 2010 [VMM][I]: Driver vmm_kvm loaded.4 Ruben S.pem" ● Restart the OpenNebula daemon. and check that the new drivers are loaded $ one stop. Montero . one start $ more $ONE_LOCATION/var/oned.

-u option).21.. Montero .21. and a host that uses that driver You can limit the use of EC2 instances by modifying the IM file ● ● ● Hands on. add a driver for each zone (use the arguments attribute. Then create a host that uses the driver You can use multiple EC2 zones. Create your EC2 hybrid cloud by adding a new host $ onehost create ec2 im_ec2 vmm_ec2 tm_dummy $ onehost list ID NAME 0 84.z 2 ec2 RVM 0 1 0 TCPU 200 200 500 FCPU 200 200 500 ACPU TMEM FMEM STAT 200 2017004 1667080 on 200 2017004 1681676 on 500 8912896 8912896 on Building Clouds with OpenNebula 1.y 1 84..x.Configuring the EC2 Hybrid Cloud Driver ● Amazon EC2 cloud is manage by OpenNebula as any other cluster node ● You can use several accounts by adding a driver for each account (use the arguments attribute.4 Ruben S.x. -k and -c options).

Using the EC2 Hybrid Cloud ● Virtual Machines can be instantiated locally or in EC2 ● The template must provide a description for both instantiation methods. "m1. "host (EC2 cloud) to use this description with" ● ● EC2 = [ AMI KEYPAIR AUTHORIZED_PORTS INSTANCETYPE ELASTICIP CLOUD ] Building Clouds with OpenNebula 1. "the elastic ip for this instance".small. "ports to access the instance". "the keypair to use the instance"...4 Ruben S. The EC2 counterpart of your VM (AMI_ID) must be available for the driver account The EC2 VM template attribute: = = = = = = "ami_id for this VM". Montero .".

. INSTANCETYPE=m1.small 2010-01-14T23:32:35+0000 useast-1a aki-a71cf9ce ari-a51cf9cc monitoringdisabled Building Clouds with OpenNebula 1.small] #Add this if you want to use only EC2 cloud REQUIREMENTS = "HOSTNAME = \"ec2\"" ● Hands on.4 Ruben S.one $ onevm list ID USER NAME STAT CPU MEM HOSTNAME TIME 16 oneadmin one-16 runn 0 0 ec2 00 00:00:35 $ ec2-describe-instances RESERVATION r-5eff7536 418314910487 default INSTANCE i-bac3f0d2 ami-0572946c pending keypair0 m1. Create the VM and check progress $ onevm create ttylinux. Montero .. this will be use wen submitting this VM to EC2 EC2 = [ AMI="ami-ccf615a5"..Using the EC2 Hybrid Cloud ● Hands on.. Add an EC2 counterpart to the ttylinux image $vi ttylinux. AUTHORIZED_PORTS="22". KEYPAIR="keypair".one #EC2 template machine.

compute-1. INSTANCETYPE=m1. KEYPAIR=keypair ] IP=ec2-72-44-62-194.fc8xen-ec2-v1. Montero ..0 #2 SMP Tue Sep 1 10:04:29 EDT 2009 i686 root@ip-10-212-134-128:~# This costs money! $ onevm shutdown 17 $ onehost disable ec2 $ onehost list Building Clouds with OpenNebula 1.4 Ruben S. AUTHORIZED_PORTS=22...... EC2=[ AMI=ami-ccf615a5.compute-1..amazonaws.com Linux ip-10-212-134-128 2.small.21. Log in the EC2 instance when running $ onevm show 17 .5 .Using the EC2 Hybrid Cloud ● Hands on..amazonaws.6. VIRTUAL MACHINE TEMPLATE CPU=0.pem root@ec2-72-44-62-194. REQUIREMENTS=HOSTNAME = "ec2" VMID=17 $ ssh -i keypair.7-2.com .

es) University Complutense of Madrid .January 2010. CESGA Santiago de Compostela. Spain PART IV: Share your Cloud! (Cloud Interfaces) Ruben S.Montero (rubensm@dacya.ucm.

Montero .4 Ruben S.The Public Cloud: Overview You can use multiple interfaces for the Cloud ● Transparent to your setup: ● Hypervisor ● Storage Model ● Hybrid configuration ● Client tools uses EC2 libraries ● Potential integration with EC2 tools (EC2_URL problems for example) ● Provided in the OpenNebula distribution ● Includes a simple S3 replacement ● Supports HTTP and HTTPS protocols ● EC2 authentication based on OpenNebula credentials ● Public Cloud users need an OpenNebula account ● Building Clouds with OpenNebula 1.

0.y formiga-z formiga-z.21.1 formiga-z 84.1.opennebula.0.4 Ruben S. Montero . web server and web framework ● # gem install amazon-ec2 # sudo gem install sinatra # sudo gem install thin # # # # gem install sequel apt-get install curl libcurl3 libcurl4-gnutls-dev libopenssl-ruby gem install curb gem install sqlite3-ruby Add a “FQDN” for our Public Cloud # vim /etc/hosts 127.x.0.Installing the Public Cloud Components ● OpenNebula distribution supports two Cloud interfaces: the EC2 Query API and OCCI Additional requirements: EC2 development library.1 localhost #127.org Building Clouds with OpenNebula 1.

TEMPLATE=m1.conf # OpenNebula administrator user.small.erb] Building Clouds with OpenNebula 1.conf Hands on.opennebula.Configuring the Public Cloud ● The EC2 service is configured in $ONE_LOCATION/etc/econe..4 Ruben S. Montero .db IMAGE_DIR=/srv/cloud/public_repo/ # VM types allowed and its template file VM_TYPE=[NAME=m1. check space! DATABASE=/srv/cloud/one/var/econe.org PORT=4567 # Configuration for the image repository # IMAGE_DIR will store the Cloud images.small. the one_auth contents USER=oneadmin PASSWORD=onecloud # OpenNebula sever contact information ONE_XMLRPC=http://localhost:2633/RPC2 # Host and port where econe server will run keep FQDNs SERVER=formiga-y. Study the configuration file and adjust it to your cloud ● $ more econe..

Montero . ● Building Clouds with OpenNebula 1.Configuring the Public Cloud ● You have to define the correspondence between types (simple) and local instantiation of VMs (hard.4 Ruben S. MEMORY) Your cloud requirements.conf. you should be fine by now) ● Capacity allocated by this VM type (CPU. Templates for the VM templates are in $ONE_LOCATION/etc/ec2query_templates Templates for VM Types are erb files <% Ruby code here >.g. force to use a given kernel (OS) or place public VMs in a given set of cluster nodes (REQUIREMENTS) The network used by Public VMs (NIC) ● ● ● VM Types are defined in econe. e. you should not need to modify that.

and it should be owned by oneadmin NIC = [ NETWORK = "Red LAN" ] IMAGE_ID = <%= erb_vm_info[:img_id] %> INSTANCE_TYPE = <%= erb_vm_info[:instance_type ]%> Building Clouds with OpenNebula 1.1 MEMORY = 64 DISK = [ source clone target readonly = = = = <%= erb_vm_info[:img_path] %>.small type of your cloud use ttylinux. hda.one as a reference $ more m1..Configuring the Public Cloud ● Hands on.. Prepare the m1. Montero . no] #You have to create this network.4 Ruben S.small.erb NAME = eco-vm CPU = 0. yes.

4 Ruben S. start the econe server $ unset EC2_URL $ econe-server start $ lsof -i Check $ONE_LOCATION/var/econe-server.Configuring the Public Cloud ● Hands on..log for errors Building Clouds with OpenNebula 1. Montero ..

register an image not really needed in 1. starts a VM using an image ID econe-describe-instances. shutdowns a VM AWSAccessKeyId is OpenNebula's username AWSSecretAccessKey is OpenNebula's password ● ● ● Instance related commands are: ● ● ● ● User authentication is based in the OpenNebula credentials ● ● Building Clouds with OpenNebula 1. Montero . lists the images econe-register. and resembles the ec2-* cli Image related commands are: ● ● econe-upload.4 Ruben S.Using the Public Cloud ● The econe-tools are a subset of the functionality provided by the onevm utility. place an image in the Cloud repo and returns ID econe-describe-images. lists the VMs econe-terminate-instances.4 econe-run-instances.

--secret-key <pass>) Environemt EC2_ACCESS_KEY and EC2_SECRET_KEY Environment ONE_AUTH Command arguments (--url <http|https>://<fqdn>:<port>) port needed in not the default for the protocol EC2_URL environment ● ● ● Point econe-tools to your target cloud ● ● ● Hands on.. and start it using the public cloud interface. ● Compare the econe-* (public view) and onevm (local view) evolution and information Check the template build by the econe server (onevm show) ● Building Clouds with OpenNebula 1. upload the ttylinux image. Montero ..Using the Public Cloud ● Pass your credentials to the econe-tools by (in this order) ● Commands arguments (--access-key <username>.4 Ruben S.

opennebula.org:4567" $ econe-describe-images -H Owner ImageId Location ----------------------------------------------------------------------oneadmin 1 /srv/cloud/public_repo/1 $ econe-run-instances 1 oneadmin 1 $ econe-describe-instances oneadmin 18 1 192.x.img Success: ImageId 1 $ export EC2_URL="http://formiga-15.168.5 m1.small 18 m1.small pending This is the local view not accessible to public cloud users $ onevm list ID USER NAME STAT CPU MEM HOSTNAME TIME 19 oneadmin eco-vm runn 0 65536 84.y 00 00:01:34 $ onevm show 19 Building Clouds with OpenNebula 1.Using the Public Cloud $ econe-upload -U http://formiga-x.opennebula.4 Ruben S. Montero .org:4567 --access-key oneadmin --secret-key onecloud /srv/cloud/images/ttylinux/ttylinux.169.21.

Montero .Configuring SSL access for the Public Cloud ● SSL security is handle by a proxy that forwards the request to the EC2 Query Service and takes back the answer to the client Requirements: ● ● A server certificate for the SSL connections An HTTP proxy that understands SSL EC2Query Service configuration to accept petitions from the proxy ● ● ● Hands on.pem Building Clouds with OpenNebula 1.key /etc/ssl/certs/ssl-certsnakeoil..pem > /etc/lighttpd/server.. Install the proxy (lighttpd) and get the certificates for your cloud # apt-get install lighttpd # apt-get instatall ssl-cert # /usr/sbin/make-ssl-cert generate-default-snakeoil # cat /etc/ssl/private/ssl-cert-snakeoil.4 Ruben S.

configure the lighttpd proxy # vim /etc/lighttpd/lighttpd. Montero . ## bind to port (default: 80) server.0.engine = "enable" ssl. "mod_compress".modules = ( "mod_access".reject-expect-100-with-417 = "disable" Building Clouds with OpenNebula 1. "mod_accesslog"..pemfile = "/etc/lighttpd/server.server = ( "" => ("" => ( "host" => "127..pem" server..port = 8443 . "mod_proxy" .4 Ruben S. #### proxy module proxy..1".0..conf server. "port" => 4567 ) ) ) #### SSL engine ssl.. "mod_alias".Configuring SSL access for the Public Cloud ● Hands on.

rb Comment out line 12 ● Hands on.opennebula. configure the econe server $ vim /srv/cloud/one/etc/econe.4 Ruben S. restart services (lighttpd and econe-server) and try your new SSL cloud access (https://formiga-x.opennebula.8/gems/amazon-ec2-0..org SERVER=127.opennebula.org ● Hands on..Configuring SSL access for the Public Cloud ● Hands on. by pass the EC2 library URL checking # sudo vim /var/lib/gems/1....9/lib/AWS/EC2.org:8443) Building Clouds with OpenNebula 1.1 PORT=4567 # SSL proxy that serves the API (set if is being used) SSL_SERVER=formiga-15.0.7.0.conf #SERVER=formiga-15. Montero ..

ucm.es) University Complutense of Madrid . Montero (rubensm@dacya. Spain PART V: Customizing your Cloud Ruben S. CESGA Santiago de Compostela.January 2010.

Montero . Building Clouds with OpenNebula 1.Customizing and Extending your Cloud ● You can customize your cloud by: ● Tunning or adapting the transfer operations to your storage back-end Adding new monitorization probes to improve the VM placement Adjusting VM operations to your hypervisor installation Trigger custom actions on specific VM events (e. “on VM creation update the accounting DB” or “on VM shutdown send an email”) Developing new drivers for other hypervisors Developing new drivers for other storage back-ends Developing Cloud applications using the OpenNebula API or the Cloud APIs ● ● ● ● You can extend your cloud by: ● ● ● OpenNebula is very scripting friendly.4 Ruben S. You can modify the current ones or use them as templates for new ones. drivers can be written in any language.g.

Montero .*) Transfer Driver process the core script Action programs interpret the semantics of generic actions depending on the storage back.-end Building Clouds with OpenNebula 1.4 Ruben S.Customizing the Storage of your Cloud OpenNebula issue generic storage operations (check var/<vm_id>/transfer.

The size is given in ORIGIN in MB. Montero . DELETE: Deletes ORIGIN file or directory. LN: Creates a symbolic link in DESTINATION that points to ORIGIN MKSWAP: Generates a swap image in DESTINATION. MV: Moves ORIGIN to DESTINATION.4 Ruben S. MKIMAGE: Creates a disk image in DESTINATION and populates it with the files inside ORIGIN directory.Customizing the Storage of your Cloud ● OpenNebula requests the following abstract operations over a VM image ● CLONE: This action will basically make a copy of the image from ORIGIN to DESTINATION. ● ● ● ● ● Building Clouds with OpenNebula 1.

conf CLONE = ssh/tm_clone.sh MKSWAP = ssh/tm_mkswap.sh tm_mv.sh tm_delete.conf $ more /srv/cloud/one/etc/tm_ssh/tm_ssh. Montero .sh MKIMAGE = ssh/tm_mkimage.sh LN = ssh/tm_ln.sh tm_context.sh tm_ln.sh tm_mkimage.Customizing the Storage of your Cloud ● Actions are defined in $ONE_LOCATION/etc/tm_<storage>/tm_<storage>.4 Ruben S.sh ● Actions scripts are placed in $ONE_LOCATION/lib/tm_commands/<storage>/ $ ls /srv/cloud/one/lib/tm_commands/ssh/ tm_clone.sh Building Clouds with OpenNebula 1.sh MV = ssh/tm_mv.sh tm_mkswap.sh DELETE = ssh/tm_delete.

.. Check the semantics of other operations for the ssh storage..g.ssh . case $SRC in http://*) log "Downloading $SRC" exec_and_log "ssh $DST_HOST wget -O $DST_PATH $SRC" . esac exec_and_log "ssh $DST_HOST chmod a+w $DST_PATH" ● Hands on. $TMCOMMON . tm_ln.. Montero Building Clouds with OpenNebula 1. e.. log "Creating directory $DST_DIR" exec_and_log "ssh $DST_HOST mkdir -p $DST_DIR" ....Customizing the Storage of your Cloud ● Hands on. Take a look to the tm_clone. *) log "Cloning $SRC" exec_and_log "scp $SRC $DST" .ssh Ruben S.4 ...

Customizing the Information System ● OpenNebula gets host information by executing an arbitrary number of probes A probe is a program that returns the monitorization metric in the form METRIC_NAME = VALUE ● ● Probes are configured in $ONE_LOCATION/etc/im_<hypervisor>/im_<hypervisor>. Montero .conf And placed in $ONE_LOCATION/lib/im_probes ● Probe information is mainly used for VM placement Building Clouds with OpenNebula 1.4 Ruben S.

Customizing the Information System ● Hands on. you can use virsh. pgrep kvm..).g.4 Ruben S.sh #!/bin/sh echo HOSTNAME=`uname -n` ● Hands on.sh kvm=kvm.sh cpu=cpu. Create a new probe that returns the number of VMs in RUNNING_VMS (e.rb $ more name.... Building Clouds with OpenNebula 1. Use the new metric to pack VMs (RANK=RUNNING_VMS)..conf cpuarchitecture=architecture. Take a look to the default probes defined for KVM $ more /home/ruben/Virtual/one/etc/im_kvm/im_kvm..sh nodename=name. Montero .

.g. nagios. DHCP.Customization with Hooks: Network Isolation IN: Only Ethernet frames from a MAC in Red LAN ● OUT: Only Ethernet frames from the MAC assigned by OpenNebula ● Networks are isolated at layer 2 ● You can put any TCP/IP service as part of the VMs (e..) ● Building Clouds with OpenNebula 1. Montero .4 Ruben S.

. oneadmin .4 ... Montero VM_HOOK = [ name on command arguments remote VM_HOOK = [ name on command arguments remote Building Clouds with OpenNebula 1. "yes" ] Ruben S.Customization with Hooks: Network Isolation ● Requirements (this has to be done in all the cluster nodes) ● Check that ebtables package is installed Allow oneadmin to use the ebtables command through sudo ● #visudo . ● ALL=(ALL) NOPASSWD: /sbin/ebtables * Configure the hooks for OpenNebula = = = = = = = = = = "ebtables-start".. "/srv/cloud/one/share/hooks/ebtables-flush". "done". "". "yes" ] "ebtables-flush". "one-$VMID". "/srv/cloud/one/share/hooks/ebtables-kvm". "running".

Montero ..Customization with Hooks: Network Isolation ● Hands on.4 Ruben S. Start a couple of VMs in Networks Red and Blue. ● Check the ebtables rules in the hosts Check connectivity between VMs Change the network mask of the VMs and check connectivity Shutdown and check the ebtables rules ● ● ● Building Clouds with OpenNebula 1..

CESGA Santiago de Compostela. Spain Building Clouds with OpenNebula 1.es) University Complutense of Madrid .ucm.4 Ruben S.Montero (rubensm@dacya.January 2010.

4 to your datacenter ● Building Clouds with OpenNebula 1. Use applications) and Manage Virtual infrastructures (cloud ● ● ● ● Build public and hybrid clouds Adapt OpenNebula 1.4 Plan and architect a private cloud Design.Summary ● You should be able to: ● Describe the benefits and characteristics of virtual infrastructures and IaaS clouds Describe the characteristics and architecture of the different clouds that can be deployed with OpenNebula 1.4 Ruben S. Montero .

Sign up to vote on this title
UsefulNot useful