Why is context not working in OpenNebula 7.0 VMs

Environment Setup:

  • OpenNebula Version: 7.0

  • Front-end: RHEL 9

  • Hypervisors: 3 physical hosts running KVM

  • Datastore: Shared mode using GPFS to manage LUNs

  • Features Tested Successfully: Live Migration, VM HA, Templates, etc.

Problem:
Everything works fine except context application inside VMs. The context ISO seems to be generated, but the VM does not recognize it properly.

VM Oracle Linux 9:

[root@localhost ~]# rpm -qa *context*
one-context-7.0.0-0.el9.noarch
[root@localhost ~]# journalctl | grep one-context
Nov 27 10:44:38 localhost.localdomain one-contextd[1063]: Started for type local
Nov 27 10:44:38 localhost.localdomain one-contextd[1065]: Acquiring lock /var/run/one-context/one-context.lock
Nov 27 10:44:38 localhost.localdomain one-contextd[1067]: Acquired lock /var/run/one-context/one-context.lock
Nov 27 10:44:38 localhost.localdomain one-contextd[1080]: VMware ONE context not found
Nov 27 10:44:38 localhost.localdomain one-contextd[1081]: Command vmtoolsd not found
Nov 27 10:44:38 localhost.localdomain one-contextd[1054]: Error: No contextualization found
Nov 27 10:44:38 localhost.localdomain one-contextd[1083]: Error: No contextualization found
Nov 27 10:44:38 localhost.localdomain one-contextd[1085]: Releasing lock /var/run/one-context/one-context.lock
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-local.service: Main process exited, code=exited, status=1/FAILURE
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-local.service: Failed with result 'exit-code'.
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-reconfigure-delayed.service: Job one-context-reconfigure-delayed.service/start failed with result 'dependency'.
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context.service: Job one-context.service/start failed with result 'dependency'.
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-online.service: Job one-context-online.service/start failed with result 'dependency'.
Nov 27 10:44:38 localhost.localdomain NetworkManager[1088]: <info>  [1764251078.6401] Read config: /etc/NetworkManager/NetworkManager.conf, /usr/lib/NetworkManager/conf.d/{10-disable-mptcp.conf,99-nvme-nbft-no-ignore-carrier.conf}, /run/NetworkManager/conf.d/15-carrier-timeout.conf, /etc/NetworkManager/conf.d/{10-globally-managed-devices.conf,no-systemd-resolved.conf,one-context.conf}

[root@localhost ~]# systemctl status one-context
○ one-context.service - OpenNebula contextualization
     Loaded: loaded (/usr/lib/systemd/system/one-context.service; enabled; preset: disabled)
     Active: inactive (dead)

Nov 27 10:44:38 localhost.localdomain systemd[1]: Dependency failed for OpenNebula contextualization.
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context.service: Job one-context.service/start failed with result 'dependency'.
[root@localhost ~]# systemctl status one-context
[root@localhost ~]# systemctl status one-context
○ one-context.service - OpenNebula contextualization
     Loaded: loaded (/usr/lib/systemd/system/one-context.service; enabled; preset: disabled)
     Active: inactive (dead)

Nov 27 10:44:38 localhost.localdomain systemd[1]: Dependency failed for OpenNebula contextualization.
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context.service: Job one-context.service/start failed with result 'dependency'.
[root@localhost ~]# systemctl status one-context-online.service
○ one-context-online.service - OpenNebula early-networking contextualization
     Loaded: loaded (/usr/lib/systemd/system/one-context-online.service; enabled; preset: disabled)
     Active: inactive (dead)

Nov 27 10:44:38 localhost.localdomain systemd[1]: Dependency failed for OpenNebula early-networking contextualization.
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-online.service: Job one-context-online.service/start failed with result 'dependency'.
[root@localhost ~]# systemctl status one-context-local.service
× one-context-local.service - OpenNebula pre-networking contextualization
     Loaded: loaded (/usr/lib/systemd/system/one-context-local.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Thu 2025-11-27 10:44:38 -03; 1 day 2h ago
    Process: 1054 ExecStart=/usr/sbin/one-contextd local (code=exited, status=1/FAILURE)
   Main PID: 1054 (code=exited, status=1/FAILURE)
        CPU: 52ms

Nov 27 10:44:38 localhost.localdomain one-contextd[1063]: Started for type local
Nov 27 10:44:38 localhost.localdomain one-contextd[1065]: Acquiring lock /var/run/one-context/one-context.lock
Nov 27 10:44:38 localhost.localdomain one-contextd[1067]: Acquired lock /var/run/one-context/one-context.lock
Nov 27 10:44:38 localhost.localdomain one-contextd[1080]: VMware ONE context not found
Nov 27 10:44:38 localhost.localdomain one-contextd[1081]: Command vmtoolsd not found
Nov 27 10:44:38 localhost.localdomain one-contextd[1054]: Error: No contextualization found
Nov 27 10:44:38 localhost.localdomain one-contextd[1085]: Releasing lock /var/run/one-context/one-context.lock
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-local.service: Main process exited, code=exited, status=1/FAILURE
Nov 27 10:44:38 localhost.localdomain systemd[1]: one-context-local.service: Failed with result 'exit-code'.
Nov 27 10:44:38 localhost.localdomain systemd[1]: Failed to start OpenNebula pre-networking contextualization.

[root@localhost ~]# lsblk
NAME                 MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
...
sr0                   11:0    1  366K  0 rom

[root@localhost ~]# file /dev/sr0
/dev/sr0: block special (11/0)
[root@localhost ~]# mount /dev/sr0 /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error.
[root@localhost ~]# mount -o loop -t iso9660 /dev/sr0 /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
[root@localhost ~]# mount -t iso9660 /dev/sr0 /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error.



Troubleshooting Steps Taken:

  1. Verified context packages inside the VM.

  2. Checked if the context disk was being created.

  3. Debugged the script responsible for generating and transferring the ISO.


Opennebula 7.0 | 3 hosts KVM | VM Oracle Linux9

Steps to reproduce:
I added debug logs in /var/lib/one/remotes/tm/shared/context


COPY_CMD=$(cat <<EOF
    set -e -o pipefail

    {
        echo "[DEBUG] Starting transfer via tar $(date)"
        echo "[DEBUG] ISO_DIR=$ISO_DIR ISO_FILE=$ISO_FILE DST_DIR=$DST_DIR DST_FILE=$DST_FILE"

        $TAR --verbose --verbose --verbose --warning=all \
            -C "$ISO_DIR" \
            --transform="flags=r;s|$ISO_FILE|$DST_FILE|" \
            -cSf - "$ISO_FILE" | \
        $SSH "$DST_HOST" "$TAR --verbose --verbose --verbose --warning=all -xSf - -C '$DST_DIR'"

        echo "[DEBUG] Checking files after transfer"
        file "$ISO_DIR/$ISO_FILE"
        file "$DST_DIR/$DST_FILE"

        echo "[DEBUG] Transfer completed $(date)"
    } >> /var/log/one/custom_remote.log 2>&1
EOF
)

multiline_exec_and_set_error "$COPY_CMD" "Error copying context ISO to $DST"
[ -n "$ERROR" ] && exit_error

Current results:

[DEBUG] Starting transfer via tar Thu Nov 27 11:33:08 -03 2025
[DEBUG] ISO_DIR=/var/lib/one/datastores/.isofiles/5798 ISO_FILE=5798.iso DST_DIR=/var/lib/one/datastores/106/5798 DST_FILE=disk.1
-rw-rw-rw- oneadmin/oneadmin 374784 2025-11-27 11:33 5798.iso
Warning: Permanently added 'xvx820' (ED25519) to the list of known hosts.
-rw-rw-rw- oneadmin/oneadmin 374784 2025-11-27 11:33 disk.1
[DEBUG] Checking files after transfer
/var/lib/one/datastores/.isofiles/5798/5798.iso: ISO 9660 CD-ROM filesystem data 'CONTEXT'
/var/lib/one/datastores/106/5798/disk.1: data
[DEBUG] Transfer completed Thu Nov 27 11:33:08 -03 2025

Observation:
When checking the file directly on the KVM host:

/var/lib/one/datastores/106/5798/disk.1: data

Observation:
When checking the file directly on the KVM host:

/var/lib/one/datastores/106/5798/disk.1: data

It seems the ISO is corrupted after transfer. My analysis:
The tar --transform rename process might be causing corruption during the copy to the KVM node.


Question:

Since the datastore is shared, should the copy be local (no SSH) or is SSH transfer the default behavior for context disks in shared mode?
Any suggestions on how to fix this corruption issue?

Expected results:

The file should retain the format ISO 9660 CD-ROM filesystem data ‘CONTEXT’ or something compatible.

Before transfer:

/var/lib/one/datastores/.isofiles/5798/5798.iso: ISO 9660 CD-ROM filesystem data 'CONTEXT'

After transfer:

/var/lib/one/datastores/106/5798/disk.1: data
1 Like

Hello,

Just to be sure, can you do a strings /dev/sr0 on the VM and check if you can see the context vars there?

Cheers!

Hello, thank you for your response. Here is the result I obtained:

[root@localhost ~]# lsblk /dev/sr0
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 366K 0 rom
[root@localhost ~]# strings /dev/sr0
[root@localhost ~]#

Hello,

I wasn’t able to reproduce the problem on my testbeds and I would need some time to configure a GPFS testbed, so to isolate if the problem is with the file system and nothing strange is happening with the transfer… can you execute the following on the frontend as oneadmin (changing $IP_OF_A_HOST)?

mkdir /tmp/iso
echo testing_file > /tmp/iso/test
tar -C /tmp/iso --transform="flags=r;s|test|dst_test|" -cSf - test | ssh $IP_OF_A_HOST "tar -xSf - -C /tmp"

And check if the contents in the file host:/tmp/dst_test are testing_file?

After that, can you try to make the same for some directory in the GPFS directory, not /tmp and check if everything works as expected?

Cheers!