# Error restoring virtual machine template (rsync datastore)

**URL:** <https://forum.opennebula.io/t/error-restoring-virtual-machine-template-rsync-datastore/11536>\
**Category:** Operations\
**Created:** [September 18, 2023, 3:53pm UTC](https://forum.opennebula.io/t/error-restoring-virtual-machine-template-rsync-datastore/11536 "2023-09-18T15:53:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dganic](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@Dganic](https://forum.opennebula.io/u/Dganic)\
**Post date:** [September 18, 2023, 3:53pm UTC](https://forum.opennebula.io/t/error-restoring-virtual-machine-template-rsync-datastore/11536/1 "2023-09-18T15:53:33Z")

</div>

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

```auto
[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**

```auto
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"

```

```auto
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](https://github.com/OpenNebula/one/assets/795809/924b5832-cca4-4e10-9bf5-ac9723180968)

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

![image](https://github.com/OpenNebula/one/assets/795809/1ba54335-5176-489a-8516-ae6290252337)

![image](https://github.com/OpenNebula/one/assets/795809/2559444e-61fb-4d74-9282-724097da95ed)

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

---

<div class="post-metadata">

**Author:** ![vpalma](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vpalma/32/8065_2.png) [@vpalma](https://forum.opennebula.io/u/vpalma)\
**Post date:** [November 8, 2023, 4:35pm UTC](https://forum.opennebula.io/t/error-restoring-virtual-machine-template-rsync-datastore/11536/2 "2023-11-08T16:35:37Z")

</div>

Hi @Dganic 👋

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

I noticed that you have created [an issue](https://github.com/OpenNebula/one/issues/6317) in the one repo with the same information, so for better tracking of the issue I’ll report any updates there.

Best,  
Víctor.
