Installing Contextualization Service

Contextualization is installed by default on newly built VMs. This process is only needed for VMs migrated to OpenNebula.


The OpenNebula Contextualization Service is a lightweight application that watches for a hotplug events on a special CD-ROM/ISO device. When configuration data is changed, the OpenNebula Contextualization Service will read in the changed data and ensure that the running server state is updated. Contextualization changes do not require a reboot.

Contextualization is used for the following purposes:

  • - Changing root/Administrator password.
  • - Automatically configure network adapters and IP addresses.
  • - Automatically grow filesystem when disk is expanded.



Download URL: https://github.com/OpenNebula/one-apps/releases. Scroll down to “Assets”.

Notice: Creating a disk snapshot before installation is highly recommended.

Installation:

  • CentOS 7:
    Disable network contextualization:

    cloud.togglebox.com → Instances → VM → VM ID → Conf → Update → Context → Deselect “Add Network contextualization” → Update

    sed -i -e '/^mirrorlist/ s/^/#/' -e 's#http://mirror.centos.org#http://archive.kernel.org/centos-vault#g' -e 's/^#baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo
    yum -y upgrade && yum -y install https://github.com/OpenNebula/one-apps/releases/download/v6.8.1/one-context-6.8.1-1.el7.noarch.rpm && systemctl enable one-context
  • AlmaLinux 8:
    dnf install -y epel-release && yum -y –nogpgcheck install https://github.com/OpenNebula/one-apps/releases/download/v6.8.1/one-context-6.8.1-1.el8.noarch.rpm && systemctl enable network.service
  • AlmaLinux 9:
    dnf install -y epel-release NetworkManager-initscripts-updown && dnf -y –nogpgcheck install https://github.com/OpenNebula/one-apps/releases/download/v6.8.1/one-context-6.8.1-1.el9.noarch.rpm
  • Debian/Ubuntu:
    apt install https://github.com/OpenNebula/one-apps/releases/download/v6.10.0-2/one-context_6.10.0-2.deb
  • Windows:
    Install the MSI, start OpenNebula Contextulization Service via Services.
  • Windows PowerShell:
    Invoke-WebRequest -Uri "https://github.com/OpenNebula/one-apps/releases/download/v6.10.0-2/one-context-6.10.0-2.msi" -OutFile "C:\one-context-6.10.0-2.msi"
    Start-Process -FilePath "msiexec.exe" -ArgumentList "/i C:\one-context-6.10.0-2.msi /quiet /norestart" -Wait
    Start-Service -Name "OpenNebula Contextualization Service"
    Note: PowerShell must be started with Administrative privileges.


Some Linux distributions require a setting change in OpenNebula before contextualization will work properly.

The following distributions require a variable named NETCFG_TYPE to be added in the VM configuration at VM Conf tab → Update → Context → Custom Vars
  • CentOS 7 - Must be upgraded to the latest release (7.9-2009) or it will hang on boot.
  • Almalinux 8 - NETCFG_TYPE = script
  • Ubuntu 22.04 - NETCFG_TYPE = interfaces


Was this article helpful?

mood_bad Dislike 0
mood Like 1
visibility Views: 462