The information defined at the VM Template building time is presented to the VM using the VMware VMCI channel. This information comes encoded in base64 and can be gathered using the VMware Tools.
VMware tools are needed in the guestOS to enable several features (contextualization and networking feedback). Please install VMware Tools (for Windows) or Open Virtual Machine Tools (for *nix) in the guestOS.
In order to make your VMs aware of OpenNebula, you must install the official packages. Packages for both Linux and Windows exist that can collect this data and configure the supported parameters.
In Linux guests, the information can be consumed using the following command:
$ vmtoolsd --cmd 'info-get guestinfo.opennebula.context' | base64 -d MYSQLPASSWORD = 'MyPassword' ENABLEWORDPRESS = 'YES'
Step 1. Start a VM with the OS you want to Customize¶
Supported contextualization packages are available for the following OS’s:
- CentOS/RHEL >= 6
- Debian >= 6
- Ubuntu >= 11.10
- Windows >= 7
- Windows Server >= 2008
If you already happen to have a VM or Template in vCenter with the installed OS you can start it and prepare it to be used with vOneCloud. Alternatively you can start an installation process with the OS media.
Step 2. Download Contextualization Packages to the VM¶
# wget https://github.com/OpenNebula/addon-context-linux/releases/download/v5.6.0/one-context-5.6.0-1.el6.noarch.rpm
# wget https://github.com/OpenNebula/addon-context-linux/releases/download/v5.6.0/one-context-5.6.0-1.el7.noarch.rpm
OpenSUSE 42,15 / SLES 12¶
# wget https://github.com/OpenNebula/addon-context-linux/releases/download/v5.6.0/one-context-5.6.0-1.suse.noarch.rpm
# wget https://github.com/OpenNebula/addon-context-linux/releases/download/v5.6.0/one-context_5.6.0-1.deb
# wget https://github.com/OpenNebula/addon-context-linux/releases/download/v5.6.0/one-context-5.6.0-r1.apk
Download and install the MSI package (preferred way) into
Or download particular contextualization scripts to
Step 3. Install Contextualization Packages and Dependencies¶
# yum install -y epel-release # yum install -y one-context-[0-9]*el6*rpm
# yum install -y epel-release # yum install -y one-context-[0-9]*el7*rpm
# zypper --no-gpg-check install -y one-context-[0-9]*suse*rpm
# apt-get purge -y cloud-init # dpkg -i one-context_*deb || apt-get install -fy
# apk add --allow-untrusted one-context-[0-9]*apk
- double-click on the downloaded MSI package icon in the same way you open other documents to install it
sysprepto prepare the OS for duplication. You can find more information at:
Or for particular contextualization scripts:
- Open the Local Group Policy Dialog by running
- Go to Computer Configuration -> Windows Settings -> Scripts -> startup (right click).
- Browse to the
startup.vbsfile and enable it as a startup script.
Step 4. Install VMware Tools¶
open-vm-tools are installed as a dependency of contextualization package.
In vCenter open the VM menu, go to “Guest OS” section, click in “Install VMware Tools...” and follow the instructions.
Step 5. Power Off the Machine and Save it¶
These are the steps needed to finish the process:
- Power off the machine so it is in a consistent state the next time it boots
- Click on the Save As Template button in the Cloud View
Alternatively use the instantiate as persistent functionality for this step, that will create the new VM Template as soon as you terminate the VM.