Upgrade Instruction from 4.11.x

This section will guide you from CloudStack 4.11.x to latest CloudStack 4.12.0.0.

Any steps that are hypervisor-specific will be called out with a note.

We recommend reading through this section once or twice before beginning your upgrade procedure, and working through it on a test system before working on a production system.

Note

The following upgrade instructions should be performed regardless of hypervisor type.

Upgrade Steps:

  1. Backup CloudStack database (MySQL)
  2. Add package repository for MySQL connector
  3. Upgrade CloudStack management server(s)
  4. Update hypervisors specific dependencies

Update System-VM templates

  1. While running the existing 4.11.x system, log in to the UI as root administrator.

  2. In the left navigation bar, click Templates.

  3. In Select view, click Templates.

  4. Click Register template.

    The Register template dialog box is displayed.

  5. In the Register template dialog box, specify the following values (do not change these):

    HypervisorDescription
    XenServer

    Name: systemvm-xenserver-4.11.2

    Description: systemvm-xenserver-4.11.2

    URL: http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.2-xen.vhd.bz2

    Zone: Choose the zone where this hypervisor is used

    Hypervisor: XenServer

    Format: VHD

    OS Type: Debian GNU/Linux 7.0 (64-bit) (or the highest Debian release number available in the dropdown)

    Extractable: no

    Password Enabled: no

    Public: no

    Featured: no

    Routing: no

    KVM

    Name: systemvm-kvm-4.11.2

    Description: systemvm-kvm-4.11.2

    URL: http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.2-kvm.qcow2.bz2

    Zone: Choose the zone where this hypervisor is used

    Hypervisor: KVM

    Format: QCOW2

    OS Type: Debian GNU/Linux 7.0 (64-bit) (or the highest Debian release number available in the dropdown)

    Extractable: no

    Password Enabled: no

    Public: no

    Featured: no

    Routing: no

    VMware

    Name: systemvm-vmware-4.11.2

    Description: systemvm-vmware-4.11.2

    URL: http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.2-vmware.ova

    Zone: Choose the zone where this hypervisor is used

    Hypervisor: VMware

    Format: OVA

    OS Type: Other Linux 64-bit

    Extractable: no

    Password Enabled: no

    Public: no

    Featured: no

    Routing: no

    HyperV

    Name: systemvm-hyperv-4.11.2

    Description: systemvm-hyperv-4.11.2

    URL: http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.2-hyperv.vhd.zip

    Zone: Choose the zone where this hypervisor is used

    Hypervisor: Hyper-V

    Format: VHD

    OS Type: Debian GNU/Linux 7.0 (64-bit) (or the highest Debian release number available in the dropdown)

    Extractable: no

    Password Enabled: no

    Public: no

    Featured: no

    Routing: no

  6. Watch the screen to be sure that the template downloads successfully and enters the READY state. Do not proceed until this is successful.

Packages repository

Most users of CloudStack manage the installation and upgrades of CloudStack with one of Linux’s predominant package systems, RPM or APT. This guide assumes you’ll be using RPM and Yum (for Red Hat Enterprise Linux or CentOS), or APT and Debian packages (for Ubuntu).

Create RPM or Debian packages (as appropriate) and a repository from the 4.12.0.0 source, or check the Apache CloudStack downloads page at http://cloudstack.apache.org/downloads.html for package repositories supplied by community members. You will need them for Management Server on Ubuntu or Management Server on CentOS/RHEL and Hypervisor: KVM hosts upgrade.

Instructions for creating packages from the CloudStack source are in the CloudStack Installation Guide.

Database Preparation

Backup current database

  1. Stop your management server or servers. Run this on all management server hosts:

    1. $ sudo service cloudstack-management stop
  2. If you are running a usage server or usage servers, stop those as well:

    1. $ sudo service cloudstack-usage stop
  3. Make a backup of your MySQL database. If you run into any issues or need to roll back the upgrade, this will assist in debugging or restoring your existing environment. You’ll be prompted for your password.

    1. $ mysqldump -u root -p cloud > cloud-backup_`date '+%Y-%m-%d'.sql
    2. $ mysqldump -u root -p cloud_usage > cloud_usage-backup_`date '+%Y-%m-%d'.sql
  4. (KVM Only) If primary storage of type local storage is in use, the path for this storage needs to be verified to ensure it passes new validation. Check local storage by querying the cloud.storage_pool table:

    1. $ mysql -u cloud -p -e "select id,name,path from cloud.storage_pool where pool_type='Filesystem'"

    If local storage paths are found to have a trailing forward slash, remove it:

    1. $ mysql -u cloud -p -e 'update cloud.storage_pool set path="/var/lib/libvirt/images" where path="/var/lib/libvirt/images/"';

Management Server on Ubuntu

If you are using Ubuntu, follow this procedure to upgrade your packages. If not, skip to step Management Server on CentOS/RHEL.

Note

Community Packages: This section assumes you’re using the community supplied packages for CloudStack. If you’ve created your own packages and APT repository, substitute your own URL for the ones used in these examples.

The first order of business will be to change the sources list for each system with CloudStack packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.)

CloudStack apt repository

Start by opening /etc/apt/sources.list.d/cloudstack.list on any systems that have CloudStack packages installed.

This file should have one line, which contains:

  1. deb http://download.cloudstack.org/ubuntu precise 4.10

We’ll change it to point to the new package repository:

  1. deb http://download.cloudstack.org/ubuntu precise 4.12

Setup the public key for the above repository:

  1. wget -qO - http://download.cloudstack.org/release.asc | sudo apt-key add -

If you’re using your own package repository, change this line to read as appropriate for your 4.12 repository.

  1. Now update your apt package list:

    1. $ sudo apt-get update
  2. Now that you have the repository configured, it’s time to upgrade the cloudstack-management package.

    1. $ sudo apt-get upgrade cloudstack-management
  3. If you use CloudStack usage server

    1. $ sudo apt-get upgrade cloudstack-usage

Management Server on CentOS/RHEL

If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to hypervisors section Upgrade Hypervisors.

Note

Community Packages: This section assumes you’re using the community supplied packages for CloudStack. If you’ve created your own packages and yum repository, substitute your own URL for the ones used in these examples.

CloudStack RPM repository

The first order of business will be to change the yum repository for each system with CloudStack packages. This means all management servers, and any hosts that have the KVM agent.

(No changes should be necessary for hosts that are running VMware or Xen.)

Start by opening /etc/yum.repos.d/cloudstack.repo on any systems that have CloudStack packages installed.

This file should have content similar to the following:

  1. [apache-cloudstack]
  2. name=Apache CloudStack
  3. baseurl=http://download.cloudstack.org/centos/6/4.10/
  4. enabled=1
  5. gpgcheck=0

If you are using the community provided package repository, change the base url to http://download.cloudstack.org/centos/$releasever/|version|/.

Setup the GPG public key if you wish to enable gpgcheck=1:

  1. rpm --import http://download.cloudstack.org/RPM-GPG-KEY

If you’re using your own package repository, change this line to read as appropriate for your 4.12 repository.

  1. Now that you have the repository configured, it’s time to upgrade the cloudstack-management.

    1. $ sudo yum upgrade cloudstack-management
  2. If you use CloudStack usage server

    1. $ sudo yum upgrade cloudstack-usage

Upgrade Hypervisors

Hypervisor: XenServer

No additional steps are required wrt for XenServer Hypervisor for this upgrade.

Hypervisor: VMware

Warning

For VMware hypervisor CloudStack management server packages must be build using “noredist”. Refer to Building Non-OSS.

No additional steps are requried for the VMware Hypervisor for this upgrade.

Hypervisor: KVM

KVM on Ubuntu

(KVM only) Additional steps are required for each KVM host. These steps will not affect running guests in the cloud. These steps are required only for clouds using KVM as hosts and only on the KVM hosts.

  1. Configure the APT repo as detailed above.

  2. Stop the running agent.

    1. $ sudo service cloudstack-agent stop
  3. Update the agent software.

    1. $ sudo apt-get upgrade cloudstack-agent
  4. Verify that the file /etc/cloudstack/agent/environment.properties has a

    line that reads:

    1. paths.script=/usr/share/cloudstack-common

    If not, add the line.

  5. Start the agent.

    1. $ sudo service cloudstack-agent start

KVM on CentOS/RHEL

For KVM hosts, upgrade the cloudstack-agent package

  1. Configure the CloudStack RPM repository as detailed above.

    1. $ sudo yum upgrade cloudstack-agent
  2. Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads:

    1. paths.script=/usr/share/cloudstack-common

    If not, add the line.

  3. Restart the agent:

    1. $ sudo service cloudstack-agent stop
    2. $ sudo killall jsvc
    3. $ sudo service cloudstack-agent start

Restart management services

  1. Now it’s time to start the management server

    1. $ sudo service cloudstack-management start
  2. If you use it, start the usage server

    1. $ sudo service cloudstack-usage start