Error restoring virtual machine template (rsync datastore)

Description
When we try to restore a virtual machine from a backup (rsync backup datastore),
we get an error when restoring the VM template:

[one.image.restore] Error creating VM template: [one.template.allocate] 
Parse error: syntax error, unexpected VARIABLE, expecting EQUAL or EQUAL_EMPTY at line 1633891217, columns 1561:1571 
The following images were restored: 155

To Reproduce

  • Add rsync backup datastore
  • Create a backup copy of the virtual machine via Sunstone
  • Try to restore the VM

Expected behavior
The VM template has been restored

Details

NAME="AlmaLinux"
VERSION="8.8 (Sapphire Caracal)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.8 (Sapphire Caracal)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:8::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
opennebula-tools-6.6.0-1.el8.noarch
opennebula-libs-6.6.0-1.el8.noarch
opennebula-gate-6.6.0-1.el8.noarch
opennebula-node-kvm-6.6.0-1.el8.noarch
opennebula-common-onecfg-6.6.0-1.el8.noarch
opennebula-rubygems-6.6.0-1.el8.x86_64
opennebula-provision-6.6.0-1.el8.noarch
opennebula-fireedge-6.6.0-1.el8.x86_64
opennebula-guacd-6.6.0-1.2.0+1.el8.x86_64
opennebula-sunstone-6.6.0-1.el8.noarch
opennebula-flow-6.6.0-1.el8.noarch
opennebula-common-6.6.0-1.el8.noarch
opennebula-provision-data-6.6.0-1.el8.noarch
opennebula-6.6.0-1.el8.x86_64

Additional context
vm.xml is generated with an empty line at the end of the file, I don’t know how correct this is and can affect the error:

image

In the template generated in the backup copy (vm.xml), several places without values were found during parsing:

image

image

The problem is reproducible on two different installations of version OpenNebula 6.6.0

1 Like

Hi @Dganic :wave:

Thanks for reporting this! I’ll try to reproduce this error during those days.

I noticed that you have created an issue in the one repo with the same information, so for better tracking of the issue I’ll report any updates there.

Best,
Víctor.