ONE Tips & Tricks
- 3. OpenNebula
High Availability feature for Virtual Machines
•Execute a hook if a host error has been produced
•You have to ensure the host has been crashed
•Reboot the host by IPMI
•OpenNebula can migrate or recreate virtual machines inside
the failed host
- 4. OpenNebula
High Availability feature for Virtual Machines
•Define a Fence_IP in host attributes
•Enable host hook on /etc/one/oned.conf
•Edit fence_host.sh and add the command to reboot host
- 5. OpenNebula
VM Groups
•Set of related Virtual Machines
•VM to Host affinity
•VM to VM affinity
•Role to Role affinity
•Add the VM template to a Role
- 6. Network
Migrations
•Migrations takes a lot of time to complete
•Migrations are done through the management network.
•We need to do migrations through any other fastest network.
•Append to /etc/hosts node1_migration with the IP of the fastest
interface we have
•Change dest_host=$2 for dest_host=$2_migration in
/var/lib/one/tmp/vmm/kvm/migrate
- 8. Network
Reuse Vlans
•Need to reuse the predefined vlans when select automatic Vlan ID
•Create a script that connects to ONE DB and collects the used
Vlan ID and return the first free Vlan to use.
•Edit OpenNebula file
/usr/lib/one/ruby/OpenNebulaJSON/VirtualNetworkJSON.rb to call
this script every time is needed an automatic Vlan ID.
- 9. Virtual Machines
Cgroups
•Enable Cgroups for manage cycles of physical CPU in all
hosts
•Differences between CPU and VCPU if cgroups are enabled or
not.
Raw Data
•Useful to pass raw parameters to hypevisor
•Some of our VMs need special cpu flags that can be enabled
here.
- 10. Virtual Machines
Guest-Agent
•Daemon that permits to comunnicate with guest from the host
•Available for most of distributions, also Windows.
•Permits to ask information about the guest.
•ONE uses to ensure consistency of the snapshots by freezing
the guest if its enabled.
•Backup pluging for qcow2 images uses this feature to make a
snapshot and blockcommit later.