Compatibility Guide 4.0

This guide is aimed at OpenNebula 3.8 users and administrators who want to upgrade to the latest version. The following sections summarize the new features and usage changes that should be taken into account, or prone to cause confusion. You can check the upgrade process in the following guide

Visit the Features list and the Release Notes for a comprehensive list of what's new in OpenNebula 4.0.

inlinetoc

OpenNebula Administrators and Users

Storage

Monitoring

  • The monitoring process has been greatly improved, to reduce network connections.
  • WILD and ZOMBIE VMs are reported in the host information

Virtual Machines

<xterm> $ onetemplate instantiate 6 –cpu 2 –memory 1024 </xterm>

  • Each history record included a generic reason. In OpenNebula 4.0 it also includes the specific action that closed the record, which can be seen in the output of 'onevm show' and 'oneacct':

<xterm> VIRTUAL MACHINE HISTORY SEQ HOST ACTION REAS START TIME PROLOG

0 host02          live-migrate     user  04/05 15:21:10   0d 00h00m   0h00m03s
1 host01          suspend          user  04/05 15:21:24   0d 00h00m   0h00m00s

VID HOSTNAME ACTION REAS START_TIME END_TIME MEMORY CPU NET_RX NET_TX

 0 host02          live-migrate     user 04/05 15:21:10 04/05 15:21:27   128M   1   0.6K   0.2K
 0 host01          suspend          user 04/05 15:21:24 04/05 15:21:32   128M   1   0.6K   0.2K

</xterm>

Permissions management

  • The default permissions given to newly created resources can be set in globally in oned.conf, or individually for each user with 'oneuser umask'.
  • Administrators can set default quota limits that apply to all users or groups.
  • ACL rules can now apply to Hosts, Datastores or VNets inside a Cluster. For example, the following rule allows users in group 106 to deploy VMs in Hosts assigned to the cluster 100
@106 HOST/%100 MANAGE

Resource management

  • Rename operation for templates, images, VMs and VNets

Command Line Interface

Some onevm commands have been renamed. This is the complete list of onevm sub-commands:

OpenNebula 3.8 OpenNebula 4.0
Creation create
hold
release
Attribute updates update
rename
resize
chgrp
chown
chmod
Disk actions attachdisk disk-attach
detachdisk disk-detach
saveas disk-snapshot
disk-snapshot –live
Nic actions nic-attach
nic-detach
Scheduling
and deployment
deploy
migrate
livemigrate migrate –live
resched
unresched
Power on and off poweroff
poweroff –hard
shutdown
cancel shutdown –hard
reboot
reset reboot –hard
restart boot
undeploy
undeploy –hard
Deletion delete delete
resubmit delete –recreate
Stop/Resume stop
suspend
resume
VM Snapshots snapshot-create
snapshot-revert
snapshot-delete
Query list
show
top

New CLI commands:

Changed CLI commands:

  • New option –hold for 'onevm create' and 'onetemplate instantiate'. Using this flag, the new VMs are created on hold state instead of pending. VMs in this state are ignored by the scheduler, giving users the chance release them later or to deploy them manually.
  • New option –enforce for 'onevm deploy' and 'onevm migrate'. Using this flag, the core will enforce that the target host's capacity is not overcommitted.
  • 'onetemplate instantiate' will accept a template file to merge with the Template being instantiated.
  • New option ''--live'' for 'onevm disk-snapshot' (previously named 'onevm saveas').

Options:

  • New options –user and –password are available for all commands. They replace the current credentials, making it easier for administrators to quicky execute commands as another user.

Scheduler

Some of these changes are better explained, with examples, in this blog post.

  • The VM REQUIREMENTS and RANK attributes must be now named SCHED_REQUIREMENTS and SCHED_RANK (#1483)
  • SCHED_REQUIREMENTS and SCHED_RANK can be edited in the VM template (#1483)
  • A new keyword, CURRENT_VMS, can be used in the SCHED_REQUIMENTS expression to deploy VMs in the same hosts where other VMs are (not) running (#1675)
  • SCHED_RANK expression can use first level attributes, e.g. RANK=“ID” to sort the hosts by their /HOST/ID element (#1553)
  • SCHED_REQUIREMENTS and SCHED_RANK expressions can use xpath to identify elements, e.g. REQUIREMENTS=“\”/HOST/HOST_SHARE/MAX_MEM\“ > 0” (#1747)
  • If the scheduler cannot find a suitable host for a VM, or any other problem is found, a message is stored inside the VM template attribute SCHED_MESSAGE (#846)
  • SCHED_REQUIREMENTS and SCHED_RANK expressions can use attributes from the Host's Cluster template (#1554)

Log files

Self Service

  • Sunstone views. This is a new feature that allows you to customize the UI for different users or user groups, so the interface implements the provisioning model for each role. Sunstone views replaces the 3.x self-service portal. Sunstone views does not require any additional service (apart from the sunstone server). Sunstone ships with two predefined views admin and user, we may add a couple of more pre-defined views for the final release.

Sunstone

Networking

OpenNebula Apps

  • Currently, OpenNebula Apps are not supported with this new version. After the final 4.0 release there will be a new version of OpenNebula Apps, fully integrated with the new Sunstone.

Developers and Integrators

VM Life Cycle

  • New states and transitions. These transitions are only relevant to developers, users will perceive the same functionality.
    • UNDEPLOYED
    • CLEANUP_DELETE
    • HOTPLUG_SNAPSHOT
    • HOTPLUG_NIC
    • HOTPLUG_SAVEAS
    • HOTPLUG_SAVEAS_POWEROFF
    • HOTPLUG_SAVEAS_SUSPENDED
    • SHUTDOWN_UNDEPLOY
    • EPILOG_UNDEPLOY
    • PROLOG_UNDEPLOY
    • BOOT_UNDEPLOY
  • The REASON element inside each history record has changed.
3.8 values:

NONE        = 0  Normal termination
ERROR       = 1  The VM ended in error
STOP_RESUME = 2  Stop/resume request
USER        = 3  Migration request
CANCEL      = 4  Cancel request

4.0 values:

NONE  = 0 History record is not closed yet
ERROR = 1 History record was closed because of an error
USER  = 2 History record was closed because of a user action
  • Each history record includes an ACTION element, see the xsd file reference.

XML-RPC API

New xml-rpc methods:

  • New rename methods
  • New user/group quota.info and quota.update
  • one.vm.snapshot methods
  • one.vm.resize
  • one.vm.attachnic .detachnic

Changed xml-rpc methods:

  • one.vm.savedisk has a new param to save the disk immediately or when the VM shuts down
  • one.vm.deploy and .migrate have a new param, enforce
  • one.vm.allocate and one.template.instantiate have a new param to create VMs on hold instead of pending
  • one.template.instantiate extra param to merge attributes
  • one.template.action has new action names

Ruby OCA

  • Library file is now called 'opennebula', require it using:
require 'opennebula'
  • Now OCA is packaged as a ruby gem, if you are developing on machine that does not have OpenNebula package installed you can install it with this command:

<xterm> $ gem install opennebula-oca –pre </xterm>

Auth drivers

X509:

Storage

VMware drivers

  • VMware VMs can now use the RAW section of the VM Template to add metadata straight to the .vmx file (DATA_VMX). This comes in handy to specify for example a specific guestOS type.
  • Support for ssh based storage for VMware infrastructures has been dropped. There are two possible scenarios now: nfs or vmfs based storage.

KVM drivers

RAW  = "<devices><serial type=\"pty\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\" tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></console></devices>"

IM drivers

  • The Monitoring process has been improved to reduced connections to the hosts. If you have developed a custom information driver you may want to extended to leverage this new feature

Sunstone Server

  • Sunstone can now be served by Apache or nginx web servers using Phusion Passenger moduler. This kind of deployment adds better concurrency and lets us add an https endpoint.

Configuration File Changes

Changes in /ect/one/oned.conf

  • DEFAULT_UMASK The permissions for newly created objects can be set globally in oned.conf, or individually for each User.
  • OpenNebula driver names changed and now they are not prefixed by the driver type. For example, im_kvm changed to kvm, vmm_xen to xen and so on. To add a kvm host the command will be:

<xterm> $ onehost create host_name –im kvm –vm kvm –net dummy </xterm>

Changes in /etc/one/sunstone-server.conf

Changes in /etc/one/auth/x509_auth.conf

  • x509 driver is now able to check certificate revocation list just drop the CRL file in the CA directory. To force its checking uncomment this line:
:check_crl: true

Changes in /var/lib/one/remotes/vmm/kvm/kvmrc

Changes in /etc/one/occi-server.conf

Changes in EC2 Server configuration files: