Unable to migrate VM from vMWare to OpenNebula using OneSwap

Hello,

I need some help regarding the OneSwap tool.

I have an OpenNebula infrastructure consisting of 4 KVM hosts and a frontend running Ubuntu 24.04 LTS. OneSwap is installed on the same machine as the OpenNebula frontend. Here is my oneswap.yaml file:

#:http_transfer: true                    # Enable HTTP transfer
#:http_host: '192.168.0.10'               # Hostname of this server
#:http_port: 29869                        # HTTP Port to transfer over

# vCenter Authentication
:vcenter: 'ip of the vcenter'                 # vCenter hostname or IP
:vuser: 'vcenter user'    # vCenter username
:vpass: 'vcenter password'                    # vCenter password
:port: 443                               # vCenter port

# ESXi Authentication
#:esxi_ip: 'esxi'                 # ESXi hostname or IP
#:esxi_user: 'root'                       # ESXi username
#:esxi_pass: 'password'                # ESXi password

# Transfer Options
#:custom_convert:                         # Uses OpenNebula's custom conversion process, useful for distributions which are not supported or fail to convert
#:fallback:                               # Fallback to OpenNebula's custom conversion process
:hybrid: true                                 # Transfer using rbvmomi2's download, then convert with virt-v2v locally
#:img_wait:                               # Amount of time to wait in seconds for image to be created in OpenNebula, default: 120

# Import Options
#:ova: /path/to/ova                       # Path to OVA or folder with OVF files

# Convert Options
#:clone: false                            # Trigger a VM full clone and convert that clone without requiring to poweroff the original VM

# NIC Options
:network: 1                              # ID of the OpenNebula network
:skip_ip: true                          # Do not create IP in OpenNebula network
:skip_mac: true                         # Do not create MAC in OpenNebula network

# Datastore Options
#:datastore: 1                            # ID of the OpenNebula Image datastore

# virt-v2v Options
#:work_dir: '/tmp'                        # Directory where disk conversion takes place, will make subdir for each VM
:format: 'qcow2'                         # Disk format [ qcow2 | raw ]
#:vddk_path:                              # Path to VDDK library
#:qemu_ga_win:                            # Path to QEMU Guest Agent ISO for Windows
:qemu_ga_linux: true                          # Install QEMU Guest Agent for Linux
#:virtio_path:                            # Path to VirtIO drivers for Windows
#:virt_tools: /usr/local/share/virt-tools # Path to the directory containing rhsrvany.exe
#:v2v_path: 'virt-v2v'                    # Path to virt-v2v
#:root: 'first'                           # Choose the root filesystem to be converted

# Extra Options
#:delete: false                           # Delete the VM Disks after transfer
#:context: '/var/lib/one/context/'        # Path to OpenNebula context packages
#:remove-vmtools: false                   # Add context script to force remove of VMWare Tools
#:uefi_path: '/usr/share/OVMF/OVMF_CODE.fd'                 # Path to the UEFI file to be configured in the VM template.
#:uefi_sec_path: '/usr/share/OVMF/OVMF_CODE.secboot.fd'     # Path to the UEFI Secure file to be configured in the VM template.

# OpenNebula Placement Options
#:one_cluster:                            # ID of the OpenNebula Cluster
#:one_host:                               # ID of the OpenNebula Host
#:one_datastore:                          # ID of the OpenNebula System Datastore
#:one_datastore_cluster:                  # ID of the OpenNebula Cluster for automatic Datastore assignment

# Extra VM Options:
:dev_prefix: 'vd'                             # Device prefix for the VM disks ex: sd, hd, vd
:cpu_model: 'host-passthrough'                              # CPU model
:graphics_type: 'vnc'                         # Graphics type: vnc, sdl, spice
:graphics_listen: '0.0.0.0'                        # Graphics listen IP
#:graphics_port:                          # Graphics port
#:graphics_keymap:                        # Graphics keymap
#:graphics_password:                      # Graphics password
#:graphics_command:                       # Graphics command
#:disable_contextualization:              # Remove default contextualization options in OpenNebula, Default: Network and SSH enabled
#:persistent_img:                         # Persistent Image, default: false
#:memory_max:                             # Memory max in MB
#:vcpu_max:                               # vCPU max allowed in integer format. CPU Hot Add required in VMWare.
#:cpu:                                    # Physical CPU allowed in integer format. Default: match CPU cores from vCenter
#:vcpu:                                   # vCPU allowed in integer format. Default: match CPU cores from vCenter

I am able to list the virtual machines available in my vCenter with the following command:

oneswap list vms --datacenter DCName

However, when I try to convert the machine berluti.pj with the command:

time oneswap convert berluti.pj --endpoint http://ip_fontend:2633/RPC2 --password 'password' --user oneadmin --persistent-img;

I get the following output:

Running OpenNebula prechecks...
Deleting password files.
Delete not enabled, leaving disks in /tmp/berluti.pj/conversions
Delete not enabled, leaving /tmp/berluti.pj alone.
undefined method `[]' for nil:NilClass

real    0m5.625s
user    0m4.077s
sys     0m0.296s

Do you have any idea what I might have missed?
Thank you for your help.

Regards, Pape

Hello,

I read through the code and I don’t see exactly where this error would be happening really, although based on the regular output it seems as if it happens pretty early on and in the prechecks stage.

To verify that the issue exists there can you run the command but add the --skip-prechecks flag?

If that goes further then we can safely assume the issue exists within the precheck function, which is simply checking if there is enough space in the datastore and if the resources can be created properly so it should be OK to disable for this test.

Hello @nhansen

Thanks for your reply. I tested by adding --skip-prechecks like this:

time oneswap convert berluti.pj --endpoint http://ip_fontend:2633/RPC2 --password 'password' --user oneadmin --skip-prechecks --persistent-img;

But I get the same result.

Deleting password files.
Delete not enabled, leaving disks in /var/tmp/nebuloni.pj/conversions
Delete not enabled, leaving /var/tmp/nebuloni.pj alone.
undefined method `[]' for nil:NilClass

I really don’t know what i did wrong !

Any help !!

This was a bug that got fixed with the latest update. Please update your oneswap to use the current master branch.

Thanks @dclavijo and @nhansen for your help, i’m testing and let you know.

Regards
Pape

I’m back to give you some feedback.

OneSwap update and indeed it looks better. I was able to download the discs locally and the Template was even created on the OpenNebula side as you can see here:

Except that the image was not created as you can see here:

root@opennebula-fe:/etc/one# sudo time oneswap convert berluti.pj --password 'Amu:lepouvoirdes3' --user oneadmin --persistent-img;
Running OpenNebula prechecks...
Downloading disks from vCenter storage to local disk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3072M  100 3072M    0     0   146M      0  0:00:20  0:00:20 --:--:--  155M
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4096M  100 4096M    0     0   179M      0  0:00:22  0:00:22 --:--:--  187M
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  200G  100  200G    0     0   166M      0  0:20:29  0:20:29 --:--:--  200M
Running: virt-v2v -v --machine-readable -i libvirtxml /tmp/berluti.pj/local.xml -o local --root first -os /tmp/berluti.pj/conversions/ -of qcow2

Setting up the source: -i libvirtxml /tmp/berluti.pj/local.xml..
Opening the source...........................................................................
Inspecting the source.
Inspecting guest OS..............................................................
Gathering mountpoint stats and converting guest
Checking for sufficient free disk space in the guest
Converting Ubuntu 22.04.5 LTS to run on KVM, this may take a long time.........
could not determine a way to update the configuration of Grub2...........................................
The QEMU Guest Agent will be installed for this guest at first boot........................................
This guest has virtio drivers installed.....
Mapping filesystem data to avoid copying unused and blank areas
Inspecting filesystems, this can take several minutes............................
Closing the overlay....
Assigning disks to buses
Checking if the guest needs BIOS or UEFI to boot
Setting up the destination: -o disk -os /tmp/berluti.pj/conversions/...
Copying disk 1/3, this may take a long time

Copying disk 2/3, this may take a long time

Copying disk 3/3, this may take a long time

Creating output metadata
Finishing off
3 disks on the local disk for this VM: ["/tmp/berluti.pj/conversions/berluti.pj-sda", "/tmp/berluti.pj/conversions/berluti.pj-sdb", "/tmp/berluti.pj/conversions/berluti.pj-sdc"]
Creating Images in OpenNebula
Inspecting disk...Allocating image 0 in OpenNebula
Failed to create image. Image Definition:
<IMAGE>
  <NAME>berluti.pj_0</NAME>
  <TYPE>DATABLOCK</TYPE>
  <PATH>/tmp/berluti.pj/conversions/berluti.pj-sda</PATH>
  <PERSISTENT>YES</PERSISTENT>
</IMAGE>
Waiting for image to be ready. Timeout: 120 seconds.
Inspecting disk...Allocating image 1 in OpenNebula
Failed to create image. Image Definition:
<IMAGE>
  <NAME>berluti.pj_1</NAME>
  <TYPE>DATABLOCK</TYPE>
  <PATH>/tmp/berluti.pj/conversions/berluti.pj-sdb</PATH>
  <PERSISTENT>YES</PERSISTENT>
</IMAGE>
Waiting for image to be ready. Timeout: 120 seconds.
Inspecting disk...Done (16.85s)
Injecting one-context...Running: virt-customize -q -a /tmp/berluti.pj/conversions/berluti.pj-sdc --uninstall cloud-init --copy-in /usr/share/one/context/one-context_6.10.0-3.deb:/tmp --install /tmp/one-context_6.10.0-3.deb --delete /one-context_6.10.0-3.deb --run-command 'systemctl enable network.service || exit 0'
Failed (70.92s)
Context injection command appears to have failed. Attempting fallbackRunning: virt-customize -q -a /tmp/berluti.pj/conversions/berluti.pj-sdc --uninstall cloud-init --copy-in /usr/share/one/context/one-context_6.10.0-3.deb:/tmp --firot-install /tmp/one-context_6.10.0-3.deb --run-command 'systemctl enable network.service || exit 0'
Success (34.28s)
Context will install on first boot, you may need to boot it twice.Installing qemu-guest-agent...Running: virt-customize -a /tmp/berluti.pj/conversions/berluti.pj-sdc --install qemu-guest-agent
Failed (62.84s)
Allocating image 2 in OpenNebula
Failed to create image. Image Definition:
<IMAGE>
  <NAME>berluti.pj_2</NAME>
  <TYPE>OS</TYPE>
  <PATH>/tmp/berluti.pj/conversions/berluti.pj-sdc</PATH>
  <PERSISTENT>YES</PERSISTENT>
</IMAGE>
Waiting for image to be ready. Timeout: 120 seconds.
Created images: [{:id=>nil, :os=>false}, {:id=>nil, :os=>false}, {:id=>nil, :os=>"linux"}]
Adding 2 NICs, assigning networks from 1
Adding MAC address to NIC#0
Could not find OpenNebula network matching the provided name. Setting to assigned network: 1
Found network '3131-VM-TEST31' but no guest network information. Adding blank NIC.
Adding MAC address to NIC#0
Could not find OpenNebula network matching the provided name. Setting to assigned network: 1
Found network '3131-VM-TEST31' but no guest network information. Adding blank NIC.
Allocating the VM template...Success
VM Template ID: 20
Deleting password files.
Delete not enabled, leaving disks in /tmp/berluti.pj/conversions
Delete not enabled, leaving /tmp/berluti.pj alone.
unexpected token at 'Test,Prod,hyper-01.pp,hyper-02.pp,hyper-01.pj,hyper-02.pj'
Command exited with non-zero status 1
883.40user 269.55system 34:22.27elapsed 55%CPU (0avgtext+0avgdata 2882560maxresident)k
919080inputs+435568576outputs (241major+3889928minor)pagefaults 0swaps

Looks like the one.image.allocate call failed to be executed. Please take a look at the log file /var/log/one/oned.log and look for this call being issued there. You should see an error message related to it right after the call is issued.

Please report the message here. Perhaps we could write this error mesage to oneswap stderr.

Here is what i have in the one.log

Sat Jun 28 13:01:47 2025 [Z0][MKP][D]: Marketplace Linux Containers (1) successfully monitored.
Sat Jun 28 13:01:52 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:01:52 2025 [Z0][ReM][D]: Req:5168 UID:0 IP:127.0.0.1 one.image.allocate invoked , "<IMAGE>
  <NAME>berl...", 1, false
Sat Jun 28 13:01:52 2025 [Z0][ReM][E]: Req:5168 UID:0 one.image.allocate result FAILURE [one.image.allocate] Error getting datastore [1].
Sat Jun 28 13:01:57 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:01:57 2025 [Z0][ReM][D]: Req:0 UID:0 IP:127.0.0.1 one.zone.raftstatus invoked
Sat Jun 28 13:01:57 2025 [Z0][ReM][D]: Req:0 UID:0 one.zone.raftstatus result SUCCESS, "<RAFT><SERVER_ID>-1<..."
Sat Jun 28 13:01:57 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:01:57 2025 [Z0][ReM][D]: Req:8688 UID:0 IP:127.0.0.1 one.vmpool.infoextended invoked , -2, -1, -1, -1
Sat Jun 28 13:01:57 2025 [Z0][ReM][D]: Req:8688 UID:0 one.vmpool.infoextended result SUCCESS, "<VM_POOL><VM><ID>65<..."
Sat Jun 28 13:01:58 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:01:58 2025 [Z0][ReM][D]: Req:704 UID:0 IP:127.0.0.1 one.hostpool.info invoked , -2, -1, -1
Sat Jun 28 13:01:58 2025 [Z0][ReM][D]: Req:704 UID:0 one.hostpool.info result SUCCESS, "<HOST_POOL><HOST><ID..."
Sat Jun 28 13:01:58 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:01:58 2025 [Z0][ReM][D]: Req:1968 UID:0 IP:127.0.0.1 one.datastorepool.info invoked , -2, -1, -1
Sat Jun 28 13:01:58 2025 [Z0][ReM][D]: Req:1968 UID:0 one.datastorepool.info result SUCCESS, "<DATASTORE_POOL><DAT..."
Sat Jun 28 13:01:58 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:01:58 2025 [Z0][ReM][D]: Req:48 UID:0 IP:127.0.0.1 one.vmpool.info invoked , -2, -1, -1, -1, ""
Sat Jun 28 13:01:58 2025 [Z0][ReM][D]: Req:48 UID:0 one.vmpool.info result SUCCESS, "<VM_POOL><VM><ID>65<..."
Sat Jun 28 13:02:04 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:02:04 2025 [Z0][ReM][D]: Req:2448 UID:0 IP:127.0.0.1 one.image.allocate invoked , "<IMAGE>
  <NAME>berl...", 1, false
Sat Jun 28 13:02:04 2025 [Z0][ReM][E]: Req:2448 UID:0 one.image.allocate result FAILURE [one.image.allocate] Error getting datastore [1].
Sat Jun 28 13:02:12 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:02:12 2025 [Z0][ReM][D]: Req:6624 UID:0 IP:127.0.0.1 one.zone.raftstatus invoked
Sat Jun 28 13:02:12 2025 [Z0][ReM][D]: Req:6624 UID:0 one.zone.raftstatus result SUCCESS, "<RAFT><SERVER_ID>-1<..."
Sat Jun 28 13:02:12 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:02:12 2025 [Z0][ReM][D]: Req:688 UID:0 IP:127.0.0.1 one.vmpool.infoextended invoked , -2, -1, -1, -1
Sat Jun 28 13:02:12 2025 [Z0][ReM][D]: Req:688 UID:0 one.vmpool.infoextended result SUCCESS, "<VM_POOL><VM><ID>65<..."
Sat Jun 28 13:02:13 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:02:13 2025 [Z0][ReM][D]: Req:9776 UID:0 IP:127.0.0.1 one.hostpool.info invoked , -2, -1, -1
Sat Jun 28 13:02:13 2025 [Z0][ReM][D]: Req:9776 UID:0 one.hostpool.info result SUCCESS, "<HOST_POOL><HOST><ID..."
Sat Jun 28 13:02:13 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:02:13 2025 [Z0][ReM][D]: Req:5296 UID:0 IP:127.0.0.1 one.datastorepool.info invoked , -2, -1, -1
Sat Jun 28 13:02:13 2025 [Z0][ReM][D]: Req:5296 UID:0 one.datastorepool.info result SUCCESS, "<DATASTORE_POOL><DAT..."
Sat Jun 28 13:02:13 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 13:02:13 2025 [Z0][ReM][D]: Req:9680 UID:0 IP:127.0.0.1 one.vmpool.info invoked , -2, -1, -1, -1, ""
Sat Jun 28 13:02:13 2025 [Z0][ReM][D]: Req:9680 UID:0 one.vmpool.info result SUCCESS, "<VM_POOL><VM><ID>65<..."

Sat Jun 28 13:05:08 2025 [Z0][ReM][D]: Req:6096 UID:0 IP:127.0.0.1 one.vn.info invoked , 1, false

here is the message

Error getting datastore [1]

Regards !

I’ve made some progress, but there’s still a long way to go.
By default, oneswap downloads the virtual machine disks into the /tmp directory. And in my case, OneSwap is installed directly on the same machine as the front-end. So I added the /tmp directory to “SAFE_DIRS” in OpenNebula. Then I increased the “Debug level” to get more information.

Now the script manages to create the Template and the disks in the datastore, as you can see here:

The problem is that I’ve had a few errors during script execution and when I deploy the VM, it doesn’t find its boot disk.

Here are the execution process and some log extracts: /var/log/one/oneswap.log and /var/log/one/oned.log

Setting up the source: -i libvirtxml /tmp/berluti.pj/local.xml..
Opening the source.....................................................................
Inspecting the source.
Inspecting guest OS..............................................................
Checking for sufficient free disk space in the guest
Converting Ubuntu 22.04.5 LTS to run on KVM, this may take a long time
Gathering mountpoint stats and converting guest.........
could not determine a way to update the configuration of Grub2...........................................
The QEMU Guest Agent will be installed for this guest at first boot..............................................
This guest has virtio drivers installed....
Mapping filesystem data to avoid copying unused and blank areas
Inspecting filesystems, this can take several minutes.............................
Closing the overlay...
Assigning disks to buses
Checking if the guest needs BIOS or UEFI to boot
Setting up the destination: -o disk -os /tmp/berluti.pj/conversions/....
Copying disk 1/3, this may take a long time

Copying disk 2/3, this may take a long time

Copying disk 3/3, this may take a long time

Creating output metadata
Finishing off
3 disks on the local disk for this VM: ["/tmp/berluti.pj/conversions/berluti.pj-sda", "/tmp/berluti.pj/conversions/berluti.pj-sdb", "/tmp/berluti.pj/conversions/berluti.pj-sdc"]
Creating Images in OpenNebula
Inspecting disk...Allocating image 0 in OpenNebula
Waiting for image to be ready. Timeout: 120 seconds.
Inspecting disk...Allocating image 1 in OpenNebula
Waiting for image to be ready. Timeout: 120 seconds.
Inspecting disk...Done (17.27s)
Injecting one-context...Running: virt-customize -q -a /tmp/berluti.pj/conversions/berluti.pj-sdc --uninstall cloud-init --copy-in /usr/share/one/context/one-context_6.10.0-3.deb:/tmp --install /tmp/one-context_6.10.0-3.deb --delete /tmp/one-context_6.10.0-3.deb --run-command 'systemctl enable network.service || exit 0'
Failed (72.36s)
Context injection command appears to have failed. Attempting fallbackRunning: virt-customize -q -a /tmp/berluti.pj/conversions/berluti.pj-sdc --uninstall cloud-init --copy-in /usr/share/one/context/one-context_6.10.0-3.deb:/tmp --firstboot-install /tmp/one-context_6.10.0-3.deb --run-command 'systemctl enable network.service || exit 0'
Success (37.49s)
Context will install on first boot, you may need to boot it twice.Installing qemu-guest-agent...Running: virt-customize -a /tmp/berluti.pj/conversions/berluti.pj-sdc --install qemu-guest-agent
Failed (68.46s)
Allocating image 2 in OpenNebula
Waiting for image to be ready. Timeout: 120 seconds.
Created images: [{:id=>72, :os=>false}, {:id=>73, :os=>false}, {:id=>74, :os=>"linux"}]
Adding 2 NICs, assigning networks from 1
Skipping MAC address for NIC#0
Could not find OpenNebula network matching the provided name. Setting to assigned network: 1
Found network '3131-VM-TEST31' but no guest network information. Adding blank NIC.
Skipping MAC address for NIC#0
Could not find OpenNebula network matching the provided name. Setting to assigned network: 1
Found network '3131-VM-TEST31' but no guest network information. Adding blank NIC.
Allocating the VM template...Success
VM Template ID: 22
Deleting password files.
Delete not enabled, leaving disks in /tmp/berluti.pj/conversions
Delete not enabled, leaving /tmp/berluti.pj alone.
unexpected token at 'Test,Prod,hyper-01.pp,hyper-02.pp,hyper-01.pj,hyper-02.pj'

/var/log/one/oneswap.log

D, [2025-06-28T14:44:44.771407 #153325] DEBUG -- : Failed to determine unit we run in, ignoring: No data available






D, [2025-06-28T14:44:47.308492 #153325] DEBUG -- : augeas failed to parse /etc/apt/preferences.d/ubuntu-pro-esm-apps:

D, [2025-06-28T14:44:47.308506 #153325] DEBUG -- :  error "Get did not match entire input" at line 5 char 0 in lens /usr/share/augeas/lenses/dist/aptpreferences.aug:62.10-.72:

D, [2025-06-28T14:44:47.308521 #153325] DEBUG -- : augeas failed to parse /etc/apt/preferences.d/ubuntu-pro-esm-infra:

D, [2025-06-28T14:44:47.308538 #153325] DEBUG -- :  error "Get did not match entire input" at line 5 char 0 in lens /usr/share/augeas/lenses/dist/aptpreferences.aug:62.10-.72:

D, [2025-06-28T14:44:47.308551 #153325] DEBUG -- : augeas failed to parse /etc/apt/sources.list.d/opennebula.list:

D, [2025-06-28T14:44:47.308562 #153325] DEBUG -- :  error "Iterated lens matched less than it should" at line 1 char 4 in lens /usr/share/augeas/lenses/dist/aptsources.aug:59.12-.42:

D, [2025-06-28T14:44:47.308574 #153325] DEBUG -- : augeas failed to parse /etc/fail2ban/jail.conf:

D, [2025-06-28T14:44:47.308586 #153325] DEBUG -- :  error "Get did not match entire input" at line 216 char 0 in lens /usr/share/augeas/lenses/dist/inifile.aug:497.25-.43:

D, [2025-06-28T14:44:47.308601 #153325] DEBUG -- : augeas failed to parse /etc/mke2fs.conf:

D, [2025-06-28T14:44:47.308612 #153325] DEBUG -- :  error "Get did not match entire input" at line 39 char 0 in lens /usr/share/augeas/lenses/dist/mke2fs.aug:187.10-.57:

D, [2025-06-28T14:44:47.308626 #153325] DEBUG -- : augeas failed to parse /etc/profile.d/gawk.sh:

D, [2025-06-28T14:44:47.308641 #153325] DEBUG -- :  error "Syntax error" at line 7 char 1 in lens /usr/share/augeas/lenses/dist/shellvars.aug:251.12-.60:

D, [2025-06-28T14:44:47.308653 #153325] DEBUG -- : augeas failed to parse /etc/profile.d/vte-2.91.sh:

D, [2025-06-28T14:44:47.308664 #153325] DEBUG -- :  error "Syntax error" at line 27 char 24 in lens /usr/share/augeas/lenses/dist/shellvars.aug:251.12-.60:




D, [2025-06-28T14:44:47.584394 #153325] DEBUG -- : commandrvf: mount --bind /sys/fs/selinux /sysroot/selinux

D, [2025-06-28T14:44:47.643203 #153325] DEBUG -- : mount: /sysroot/selinux: mount point does not exist.

D, [2025-06-28T14:44:47.643284 #153325] DEBUG -- :        dmesg(1) may have more information after failed mount system call.

D, [2025-06-28T14:44:47.647447 #153325] DEBUG -- : commandrvf: stdout=n stderr=n flags=0x0

D, [2025-06-28T14:44:47.647538 #153325] DEBUG -- : commandrvf: mount --bind /sys /sysroot/sys

D, [2025-06-28T14:44:47.702942 #153325] DEBUG -- : commandrvf: stdout=n stderr=n flags=0x0

D, [2025-06-28T14:44:47.703049 #153325] DEBUG -- : commandrvf: mount --bind /sys/fs/selinux /sysroot/sys/fs/selinux

D, [2025-06-28T14:44:47.757347 #153325] DEBUG -- : mount: /sysroot/sys/fs/selinux: mount point does not exist.

D, [2025-06-28T14:44:47.757447 #153325] DEBUG -- :        dmesg(1) may have more information after failed mount system call.

/var/log/one/oned.log

  <NAME>berl...", 100, false
Sat Jun 28 14:53:39 2025 [Z0][ImM][DDD]: _stat: 3072
Sat Jun 28 14:53:39 2025 [Z0][ImM][I]: Copying /tmp/berluti.pj/conversions/berluti.pj-sda to repository for image 72
Sat Jun 28 14:53:39 2025 [Z0][ReM][D]: Req:2000 UID:0 one.image.allocate result SUCCESS, 72
Sat Jun 28 14:53:40 2025 [Z0][ImM][DDD]: _cp: /var/lib/one//datastores/100/e1c1abeb4a875e78bce118c1963ce38b qcow2
Sat Jun 28 14:53:40 2025 [Z0][ImM][I]: Image (72) copied and ready to use.
Sat Jun 28 14:53:40 2025 [Z0][ImM][D]: Monitoring datastore nfs_images (100)
Sat Jun 28 14:53:40 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:40 2025 [Z0][ReM][D]: Req:9280 UID:0 IP:127.0.0.1 one.image.info invoked , 72, false
Sat Jun 28 14:53:40 2025 [Z0][ReM][D]: Req:9280 UID:0 one.image.info result SUCCESS, "<IMAGE><ID>72</ID><U..."
Sat Jun 28 14:53:40 2025 [Z0][ImM][DDD]: _monitor: VVNFRF9NQj0xNTk0MgpGUkVFX01CPTMxMjk3ODcKVE9UQUxfTUI9MzE0NTcyOAo=
Sat Jun 28 14:53:40 2025 [Z0][ImM][D]: Datastore nfs_images (100) successfully monitored.
Sat Jun 28 14:53:43 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:43 2025 [Z0][ReM][D]: Req:992 UID:0 IP:127.0.0.1 one.hostpool.info invoked , -2, -1, -1
Sat Jun 28 14:53:43 2025 [Z0][ReM][D]: Req:992 UID:0 one.hostpool.info result SUCCESS, "<HOST_POOL><HOST><ID..."
Sat Jun 28 14:53:43 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:43 2025 [Z0][ReM][D]: Req:8848 UID:0 IP:127.0.0.1 one.datastorepool.info invoked , -2, -1, -1
Sat Jun 28 14:53:43 2025 [Z0][ReM][D]: Req:8848 UID:0 one.datastorepool.info result SUCCESS, "<DATASTORE_POOL><DAT..."
Sat Jun 28 14:53:43 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:43 2025 [Z0][ReM][D]: Req:1616 UID:0 IP:127.0.0.1 one.vmpool.info invoked , -2, -1, -1, -1, ""
Sat Jun 28 14:53:43 2025 [Z0][ReM][D]: Req:1616 UID:0 one.vmpool.info result SUCCESS, "<VM_POOL><VM><ID>65<..."
Sat Jun 28 14:53:47 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:47 2025 [Z0][ReM][D]: Req:9056 UID:0 IP:127.0.0.1 one.zone.raftstatus invoked
Sat Jun 28 14:53:47 2025 [Z0][ReM][D]: Req:9056 UID:0 one.zone.raftstatus result SUCCESS, "<RAFT><SERVER_ID>-1<..."
Sat Jun 28 14:53:47 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:47 2025 [Z0][ReM][D]: Req:6272 UID:0 IP:127.0.0.1 one.vmpool.infoextended invoked , -2, -1, -1, -1
Sat Jun 28 14:53:47 2025 [Z0][ReM][D]: Req:6272 UID:0 one.vmpool.infoextended result SUCCESS, "<VM_POOL><VM><ID>65<..."
Sat Jun 28 14:53:49 2025 [Z0][DBM][I]: Purging obsolete LogDB records: 0 records purged. Log state: 0,0 - 0,0
Sat Jun 28 14:53:49 2025 [Z0][DBM][I]: Purging obsolete federated LogDB records: 0 records purged. Federated log size: 0.
Sat Jun 28 14:53:51 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:51 2025 [Z0][ReM][D]: Req:3776 UID:0 IP:127.0.0.1 one.image.allocate invoked , "<IMAGE>
  <NAME>berl...", 100, false
Sat Jun 28 14:53:52 2025 [Z0][ImM][DDD]: _stat: 4096
Sat Jun 28 14:53:52 2025 [Z0][ImM][I]: Copying /tmp/berluti.pj/conversions/berluti.pj-sdb to repository for image 73
Sat Jun 28 14:53:52 2025 [Z0][ReM][D]: Req:3776 UID:0 one.image.allocate result SUCCESS, 73
Sat Jun 28 14:53:52 2025 [Z0][ImM][DDD]: _cp: /var/lib/one//datastores/100/7edf3d9a27a4bc992015c73e980409e1 qcow2
Sat Jun 28 14:53:52 2025 [Z0][ImM][I]: Image (73) copied and ready to use.
Sat Jun 28 14:53:52 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:53:52 2025 [Z0][ImM][D]: Monitoring datastore nfs_images (100)
Sat Jun 28 14:53:52 2025 [Z0][ReM][D]: Req:624 UID:0 IP:127.0.0.1 one.image.info invoked , 73, false
Sat Jun 28 14:53:52 2025 [Z0][ReM][D]: Req:624 UID:0 one.image.info result SUCCESS, "<IMAGE><ID>73</ID><U..."
Sat Jun 28 14:53:52 2025 [Z0][ImM][DDD]: _monitor: VVNFRF9NQj0xNTk0MgpGUkVFX01CPTMxMjk3ODcKVE9UQUxfTUI9MzE0NTcyOAo=
Sat Jun 28 14:53:52 2025 [Z0][ImM][D]: Datastore nfs_images (100) successfully monitored.
Sat Jun 28 14:53:53 2025 [Z0][InM][D]: VM_STATE update from host: 2. VM id: 50, state: RUNNING
Sat Jun 28 14:53:53 2025 [Z0][InM][D]: VM_STATE update from host: 2. VM id: 56, state: RUNNING
Sat Jun 28 14:53:53 2025 [Z0][InM][D]: VM_STATE update from host: 2. VM id: 49, state: RUNNING




Need to get 251 kB of archives.
After this operation, 863 kB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 qemu-guest-agent amd64 1:6.2+dfsg-2ubuntu6.26
Ign:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 qemu-guest-agent amd64 1:6.2+dfsg-2ubuntu6.26
Ign:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 qemu-guest-agent amd64 1:6.2+dfsg-2ubuntu6.26
Err:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 qemu-guest-agent amd64 1:6.2+dfsg-2ubuntu6.26
  Could not resolve 'archive.ubuntu.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-guest-agent_6.2%2bdfsg-2ubuntu6.26_amd64.deb  Could not resolve 'archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
virt-customize: error:
      export DEBIAN_FRONTEND=noninteractive
      apt_opts='-q -y -o Dpkg::Options::=--force-confnew'
      apt-get $apt_opts update
      apt-get $apt_opts install 'qemu-guest-agent'
    : command exited with an error

If reporting bugs, run virt-customize with debugging enabled and include the complete output:


Sat Jun 28 14:57:07 2025 [Z0][ImM][DDD]: _stat: 204800
Sat Jun 28 14:57:07 2025 [Z0][ImM][I]: Copying /tmp/berluti.pj/conversions/berluti.pj-sdc to repository for image 74
Sat Jun 28 14:57:07 2025 [Z0][ReM][D]: Req:1488 UID:0 one.image.allocate result SUCCESS, 74
Sat Jun 28 14:57:08 2025 [Z0][ImM][DDD]: _monitor: VVNFRF9NQj0xNTk0MiBGUkVFX01CPTMxMjk3ODcgVE9UQUxfTUI9MzE0NTcyOAo=
Sat Jun 28 14:57:08 2025 [Z0][ImM][D]: Datastore nfs_system (101) successfully monitored.
Sat Jun 28 14:57:09 2025 [Z0][ReM][DD]: Number of active connections: 1
Sat Jun 28 14:57:09 2025 [Z0][ReM][D]: Req:5312 UID:0 IP:127.0.0.1 one.image.info invoked , 74, false

Thanks again @dclavijo for your help.

Hello !

Any idea of what can cause the issue ??

Hi @Pape !

This could be because you are trying to boot a VM with UEFI using BIOS. Could you please share the OS section of the VM template? If your source VM uses UEFI, it should look something similar to this:

OS=[
  FIRMWARE="/usr/share/edk2/ovmf/OVMF_CODE.fd",
  MACHINE="q35" ]

The firmware path should be automatically detected, but it could be that in your case it was not so the VM is trying to boot as BIOS instead.

Thanks @amosteiro for your reply.

Here is the os section of my VM templat :

"OS": {
    "FIRMWARE": "BIOS",
    "UUID": "377b051b-3e82-4afe-9e3c-6aba33494a7b"
  }

Regards !

Can you try changing the firmware to UEFI? It is possible to update it from the CLI using onetemplate update <template-id>, or you can select it from the Sunstone menu, in the “OS & CPU” tab as shown in the image:

You should use FIRMWARE="/usr/share/OVMF/OVMF_CODE_4M.fd" in case you’re in Ubuntu and FIRMWARE="/usr/share/edk2/ovmf/OVMF_CODE.fd" in case you’re in Alma / RHEL.

Try to instantiate the template again after this change.

I redeploy a new VM with the same template. But this time i select the two first disks like this

And the VM is booting up. But now my problem is that, i can’t establish ssh connexion to the VM. I’m thinking that the publics keys was removed. I try also to use the private key of the user who deploy de VM in OpenNebula but same result.

Finally i try to add a USERNAME et PASSWORD in the context section and after try to log with the new credentials, but same result.

Any idea about what can cause this issue ??

Regards !

I take a look but i don’t have this

FIRMWARE=“/usr/share/OVMF/OVMF_CODE_4M.fd”

In this case you need to use /usr/share/OVMF/OVMF_CODE.fd, the screenshot I am sharing with you may be from a differrent distro, but that one should work for you. You should also set MACHINE="q35" under the OS section of the VM template.