vcenter file based restore operation fails
search cancel

vcenter file based restore operation fails

book

Article ID: 315231

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

restore vcenter appliance from vami backup successfully

Symptoms:
vcenter appliance  file based restore operation fails 

/var/log/vmware/applmgmt/restore.log

YYYY-MM-DD HH:MM:SS,335 [MainProcess:PID-4543] INFO: Executing command /etc/vmware/backup/component-scripts/vpxd/vpxd-post-restore.py.
YYYY-MM-DD HH:MM:SS,392 [MainProcess:PID-4543] ERROR: ERROR:root:Failed to enable restore in vpxd.cfg file.
YYYY-MM-DD HH:MM:SS,392 [MainProcess:PID-4543] ERROR: Traceback (most recent call last):
YYYY-MM-DD HH:MM:SS,392 [MainProcess:PID-4543] ERROR: File "/usr/lib/vmware/site-packages/vpxdPostRestoreLib.py", line 43, in vpxdPostRestore
YYYY-MM-DD HH:MM:SS,392 [MainProcess:PID-4543] ERROR: tree = parse(vpxdCfg)
YYYY-MM-DD HH:MM:SS,392 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
YYYY-MM-DD HH:MM:SS,392 [MainProcess:PID-4543] ERROR: tree.parse(source, parser)
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: parser.feed(data)
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: self._raiseerror(v)
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: raise err
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: ParseError: not well-formed (invalid token): line 156, column 2
YYYY-MM-DD HH:MM:SS,393 [MainProcess:PID-4543] ERROR: Traceback (most recent call last):
YYYY-MM-DD HH:MM:SS,394 [MainProcess:PID-4543] ERROR: File "/etc/vmware/backup/component-scripts/vpxd/vpxd-post-restore.py", line 28, in <module>
YYYY-MM-DD HH:MM:SS,394 [MainProcess:PID-4543] ERROR: vpxdPostRestore()
YYYY-MM-DD HH:MM:SS,394 [MainProcess:PID-4543] ERROR: File "/usr/lib/vmware/site-packages/vpxdPostRestoreLib.py", line 43, in vpxdPostRestore
YYYY-MM-DD HH:MM:SS,394 [MainProcess:PID-4543] ERROR: tree = parse(vpxdCfg)
YYYY-MM-DD HH:MM:SS,394 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
YYYY-MM-DD HH:MM:SS,394 [MainProcess:PID-4543] ERROR: tree.parse(source, parser)
YYYY-MM-DD HH:MM:SS,395 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
YYYY-MM-DD HH:MM:SS,395 [MainProcess:PID-4543] ERROR: parser.feed(data)
YYYY-MM-DD HH:MM:SS,395 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
YYYY-MM-DD HH:MM:SS,395 [MainProcess:PID-4543] ERROR: self._raiseerror(v)
YYYY-MM-DD HH:MM:SS,395 [MainProcess:PID-4543] ERROR: File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
YYYY-MM-DD HH:MM:SS,396 [MainProcess:PID-4543] ERROR: raise err
YYYY-MM-DD HH:MM:SS,396 [MainProcess:PID-4543] ERROR: xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 156, column 2
YYYY-MM-DD HH:MM:SS,402 [MainProcess:PID-4543] INFO: Command "/etc/vmware/backup/component-scripts/vpxd/vpxd-post-restore.py" return non-zero exit status 1.



Environment

VMware vCenter Server Appliance 6.7.x
VMware vCenter Server Appliance 6.5.x

Cause

The error is caused by a wrong xml syntax in vpxd.cfg

In the above example vpxc.cfg had a  missing closing symbol (>) for cluster tag.
/etc/vmware-vpx/vpxd.cfg
<cluster>
      <VMOverheadGrowthLimit>-1</VMOverheadGrowthLimit>
</cluster

Resolution

fix the syntax in vpxd.cfg

XML validators like https://www.xmlvalidation.com/ can be used to find the line with incorrect syntax or restoring vpxd.cfg from older backup can help .