========================================= opennebula Debian package ========================================= initial setup ----------------------------------------- 'opennebula' Debian package contains OpenNebula Controller which will manage all nodes from your cloud. After installation of this package, OpenNebula daemon is not ready to startup and will print: ------------------- You should have ONE_AUTH set the first time you start OpenNebula as it is used to set the credentials for the adminitrator user. ------------------- You have to choose an password for internal oneadmin OpenNebula user (ie. != from opennebula account). root@controller> su - oneadmin oneadmin@controller> vi $HOME/.one/one_auth ------------------- oneadmin: ------------------- You can then start OpenNebula daemon and scheduler by issuing : root@controller> /etc/init.d/opennebula start Add a new host (node) in OpenNebula pool ----------------------------------------- 1. Install 'opennebula-node' debian package in destination host root@node01> apt-get install opennebula-node 2. Copy controller ssh key to node01 root@controller> su - oneadmin oneadmin@controller> cat $HOME/.ssh/id_rsa.pub root@node01> su - oneadmin oneadmin@node01> vi $HOME/.ssh/authorized_keys 3. Test an connection from controller to node01 root@controller> su - oneadmin oneadmin@controller> ssh oneadmin@node01 The authenticity of host 'node01 (192.168.0.2)' can't be established. RSA key fingerprint is []. Are you sure you want to continue connecting (yes/no)? [yes] Warning: Permanently added 'node01,192.168.0.2' (RSA) to the list of known hosts. oneadmin@node01> 4. Add this host into OpenNebula pool oneadmin@controller> onehost add node01 im_kvm vmm_kvm tm_ssh 5. Check node registration on controller oneadmin@controller> onehost list ID NAME CLUSTER RVM TCPU FCPU ACPU TMEM FMEM STAT 0 node01 default 0 400 388 400 3.9G 2.5G on Sample setup ----------------------------------------- Here is a sample setup which is adapted from It's based on a simple and small image of TTYLinux Download a tarball from OpenNebula project : oneadmin@controller> cd oneadmin@controller> mkdir one-templates oneadmin@controller> cd one-templates oneadmin@controller> wget http://dev.opennebula.org/attachments/download/170/ttylinux.tar.gz oneadmin@controller> tar xvzf ttylinux.tar.gz Then, create a first virtual network (using virbr0 as bridge by default) : oneadmin@controller> vi small_network.net ------------------- NAME = "Small network" TYPE = FIXED # virbr0 = bridge device used by libvirt /etc/libvirt/qemu/networks/default.xml BRIDGE = virbr0 LEASES = [ IP="192.168.122.2"] ------------------- oneadmin@controller> onevnet create small_network.net oneadmin@controller> onevnet list ID USER NAME TYPE BRIDGE P #LEASES 0 oneadmin Small network Fixed virbr0 N 0 Finally, you can create the template configuration for this small VM : oneadmin@controller> vi ttylinux.one ------------------- NAME = ttylinux CPU = 0.1 MEMORY = 64 DISK = [ source = "/var/lib/one/one-templates/ttylinux.img", target = "hda", readonly = "no" ] NIC = [ NETWORK = "Small network" ] ------------------- oneadmin@controller> onevm create ttylinux.one VM has been autostarted and deployed on one of your host. You can SSH to it (login is root and password is password) : oneadmin@controller> onevm show ttylinux|grep IP IP=192.168.122.2 oneadmin@controller> ssh root@192.168.122.2