xmlwindowspowershellpowershell-3.0

hexadecimal value 0x00, is an invalid character. Line 2, position 1


We are running a PowerShell command and in that PowerShell command we are calling the XML file and trying to install veeam software. I am getting an error like

hexadecimal value 0x00, is an invalid character. Line 2, position 1.

Could someone please kindly help me to fix this issue? We have no idea about that.

I have attached the XML file below.

<event id="113" title="Unexpected error occurred.">

  <description><![CDATA['.', hexadecimal value 0x00, is an invalid character. Line 2, position 1.]]></description>

</event>
    <?xml version="1.0" encoding="utf-8"?>
    <unattendedInstallationConfiguration bundle="Vbr" mode="install" version="1.0">
    <!--[Required] Parameter 'mode' defines installation mode that silent install should operate in-->    
    <!--Supported values: install/upgrade/uninstall-->
    <!--Note: unused [Optional] parameters should be removed from the answer file-->
        <properties>
            <!--License agreements-->
            <!--Specify parameters to accept all the license agreements during silent installation or upgrade-->
                <!--[Required] Parameter ACCEPT_EULA specifies if you want to accept the Veeam license agreement. Specify '1' to accept the license agreement and proceed with installation or upgrade-->
                    <!--Supported values: 0/1-->
                    <property name="ACCEPT_EULA" value="1" />
                <!--[Required] Parameter ACCEPT_LICENSING_POLICY specifies if you want to accept Veeam licensing policy. Specify '1' to accept the licensing policy and proceed with installation or upgrade-->
                    <!--Supported values: 0/1-->
                    <property name="ACCEPT_LICENSING_POLICY" value="1" />
                <!--[Required] Parameter ACCEPT_THIRDPARTY_LICENSES specifies if you want to accept all the 3rd party licenses used. Specify '1' to accept the license agreements and proceed with installation or upgrade-->
                    <!--Supported values: 0/1-->
                    <property name="ACCEPT_THIRDPARTY_LICENSES" value="1" />
                <!--[Required] Parameter ACCEPT_REQUIRED_SOFTWARE specifies if you want to accept all the required software licenses. Specify '1' to accept the license agreements and proceed with installation or upgrade-->
                    <!--Supported values: 0/1-->
                    <property name="ACCEPT_REQUIRED_SOFTWARE" value="1" />
            <!--License file-->
            <!--Specify path to a license file and autoupdate option-->
                <!--[Optional] Parameter VBR_LICENSE_FILE specifies a full path to the license file. If you do not specify this parameter(or leave it empty value), Veeam Backup & Replication will be installed using current license file. To install Community Edition it must be set to 0-->
                    <!--Supported values: file path/0(to install CE)-->    
                    <property name="VBR_LICENSE_FILE" value="C:\Provision\Install\IMS\VeeamInstall\Veeam-32sockets-backup-ent-perpetual.lic" />
                <!--[Optional] Parameter VBR_LICENSE_AUTOUPDATE specifies if you want to update license automatically(enables usage reporting). If you do not specify this parameter, autoupdate will be enabled. For Community Edition, NFR and Evaluation licenses it must be set to 1. For licenses without license ID information it must be set to 0-->
                    <!--Supported values: 0/1-->
                    <property name="VBR_LICENSE_AUTOUPDATE" value="0" />
            <!--Service account-->
                <!--[Optional] Parameter VBR_SERVICE_USER specifies the account under which the Veeam Backup Service will run after installation and upgrade. If you do not specify this parameter, the Veeam Backup Service will run under the LocalSystem account-->
                    <!--Supported values: domain\username-->
                    <property name="VBR_SERVICE_USER" value="User2" />
                <!--[Optional] Parameter VBR_SERVICE_PASSWORD specifies a password for the account under which the Veeam Backup Service will run. You must specify this parameter together with VBR_SERVICE_USER parameter during installation. Required during upgrade if service account is not LocalSystem account-->
                <!--Make sure you keep the answer file in a safe location whenever service account password is added to the answer file-->
                    <!--Supported values: password in plain text-->
                    <property name="VBR_SERVICE_PASSWORD" value="Welcome@1234" hidden="1" />
            <!--Database configuration-->
            <!--Specify database server installation options and required configuration parameters for Veeam Backup & Replication database-->
                <!--[Required] Parameter VBR_SQLSERVER_INSTALL specifies if bundled PostgreSQL server will be installed. If set to '0', an existing SQL server settings must be specified below-->
                    <!--Supported values: 0/1-->
                    <property name="VBR_SQLSERVER_INSTALL" value="1" />
                <!--[Optional] Parameter VBR_SQLSERVER_ENGINE specifies SQL server type: '1' for PostgreSQL server, '0' for Microsoft SQL server.  Required when VBR_SQLSERVER_INSTALL is set to '0'-->
                    <!--Supported values: 0/1-->
                    <property name="VBR_SQLSERVER_ENGINE" value="1" />
                <!--[Optional] Parameter VBR_SQLSERVER_SERVER specifies a SQL server and instance on which the configuration database will be deployed. Required when VBR_SQLSERVER_INSTALL is set to '0'-->
                    <!--Supported values: MSSQLSERVER\DBINSTANCE or POSTGRESQLSERVER:PORT-->
                    <property name="VBR_SQLSERVER_SERVER" value="localhost:5432" />
                <!--[Optional] Parameter VBR_SQLSERVER_DATABASE specifies a name for the configuration database. If you do not specify this parameter, default name 'VeeamBackup' is used-->
                    <!--Supported values: database name-->
                    <property name="VBR_SQLSERVER_DATABASE" value="VeeamBackup" />
                <!--[Optional] Parameter VBR_SQLSERVER_AUTHENTICATION specifies authentication mode to connect to the database server where the Veeam Backup & Replication configuration database is deployed. Required when VBR_SQLSERVER_INSTALL is set to '0'-->
                    <!--Supported values: 0 for Windows authentication/1 for SQL native authentication-->
                    <property name="VBR_SQLSERVER_AUTHENTICATION" value="0" />
                <!--[Optional] Parameter VBR_SQLSERVER_USERNAME specifies a LoginID to connect to the SQL server in the native authentication mode. Required when VBR_SQLSERVER_AUTHENTICATION is set to '1'-->
                    <!--Supported values: username-->
                    <property name="VBR_SQLSERVER_USERNAME" value="User2" />
                <!--[Optional] Parameter VBR_SQLSERVER_PASSWORD specifies a password to connect to the SQL server in the native authentication mode. Required when VBR_SQLSERVER_USERNAME is used-->
                <!--Make sure you keep the answer file in a safe location whenever SQL server account password is added to the answer file-->
                    <!--Supported values: password in plain text-->
                    <property name="VBR_SQLSERVER_PASSWORD" value="Welcome@1234" hidden="1"/>
            <!--Ports configuration-->
            <!--Specify Veeam Backup & Replication used ports configuration-->
                <!--[Optional] Parameter VBRC_SERVICE_PORT specifies a TCP port that will be used by the Veeam Guest Catalog Service. If you do not specify this parameter, default port '9393' is used-->
                    <!--Supported values: port-->            
                    <property name="VBRC_SERVICE_PORT" value="9393" />
                <!--[Optional] Parameter VBR_SERVICE_PORT specifies a TCP port that will be used by the Veeam Backup Service. If you do not specify this parameter, default port '9392' is used. If specified port number is occupied already, setup will assign the next available port number to the component-->
                    <!--Supported values: port-->            
                    <property name="VBR_SERVICE_PORT" value="9392" />
                <!--[Optional] Parameter VBR_SECURE_CONNECTIONS_PORT specifies a port used for communication between the mount server and the backup server. If you do not specify this parameter, default port '9401' is used-->
                    <!--Supported values: port-->                        
                    <property name="VBR_SECURE_CONNECTIONS_PORT" value="9401" />
                <!--[Optional] Parameter VBR_RESTSERVICE_PORT specifies a port used for Veeam REST API service. If you do not specify this parameter, default port '9419' is used-->
                    <!--Supported values: port-->            
                    <property name="VBR_RESTSERVICE_PORT" value="9419" />
            <!--Data locations-->
            <!--Specify Veeam Backup & Replication installation path, catalog and cache folders location-->
                <!--[Optional] Parameter INSTALLDIR specifies Veeam Backup & Replication server installation path. If you do not specify this parameter, default installation path '%ProgramFiles%\Veeam\Backup and Replication' is used-->
                    <!--Supported values: file path-->
                    <property name="INSTALLDIR" value="C:\Program Files\Veeam\Backup and Replication" />
                <!--[Optional] Parameter VM_CATALOGPATH specifies a path to the catalog folder where index files will be stored. If you do not specify this parameter, a path is selected based on the free space across all available disks-->
                    <!--Supported values: file path-->
                    <property name="VM_CATALOGPATH" value="C:\VBRCatalog" />
                <!--[Optional] Parameter VBR_IRCACHE specifies the folder where instant recovery cache will be stored. If you do not specify this parameter, a path is selected based on the free space across all available disks-->
                    <!--Supported values: file path-->
                    <property name="VBR_IRCACHE" value="C:\ProgramData\Veeam\Backup\IRCache" />
            <!--Automatic update settings-->
            <!--Specify Veeam Backup & Replication autoupdate settings-->
                <!--[Optional] Parameter VBR_CHECK_UPDATES specifies if you want Veeam Backup & Replication to automatically check for new product versions and updates. If you do not specify this parameter, Veeam Backup & Replication will automatically check and notify about available updates and patches-->
                    <!--Supported values: 0/1-->
                    <property name="VBR_CHECK_UPDATES" value="0" />
            <!--Plug-ins for Veeam Backup & Replication-->
            <!--Specify additional components to install-->
                <!--[Optional] Parameter AHV_INSTALL specifies if Nutanix AHV Plug-in for Veeam Backup & Replication will be installed. If you do not specify this parameter, plug-in will not be installed-->
                    <!--Supported values: 0/1-->            
                    <property name="AHV_INSTALL" value="1" />
                <!--[Optional] Parameter RHV_INSTALL specifies if Red Hat Virtualization Plug-in for Veeam Backup & Replication will be installed. If you do not specify this parameter, plug-in will not be installed-->
                    <!--Supported values: 0/1-->
                    <property name="RHV_INSTALL" value="1" />
                <!--[Optional] Parameter AWS_INSTALL specifies if AWS Plug-in for Veeam Backup & Replication will be installed. If you do not specify this parameter, plug-in will be installed-->
                    <!--Supported values: 0/1-->
                    <property name="AWS_INSTALL" value="1" />
                <!--[Optional] Parameter AZURE_INSTALL specifies if Microsoft Azure Plug-in for Veeam Backup & Replication will be installed. If you do not specify this parameter, plug-in will be installed-->
                    <!--Supported values: 0/1-->
                    <property name="AZURE_INSTALL" value="1" />
                <!--[Optional] Parameter GCP_INSTALL specifies if Google Cloud Plug-in for Veeam Backup & Replication will be installed. If you do not specify this parameter, plug-in will be installed-->
                    <!--Supported values: 0/1-->
                    <property name="GCP_INSTALL" value="1" />
                <!--[Optional] Parameter KASTEN_INSTALL specifies if Kasten K10 Plug-in for Veeam Backup & Replication will be installed. If you do not specify this parameter, plug-in will be installed-->
                    <!--Supported values: 0/1-->
                    <property name="KASTEN_INSTALL" value="1" />
            <!--Setup settings-->
            <!--Specify additional setup settings-->
                <!--[Optional] Parameter REBOOT_IF_REQUIRED forces target server reboot, whenever it is required. If you do not specify this parameter, reboot is not performed automatically. Keep in mind that setup procedure will not be restarted after reboot-->
                    <!--Supported values: 0/1-->
                    <property name="REBOOT_IF_REQUIRED" value="0" />
        </properties>
    </unattendedInstallationConfiguration>

Solution

  • Your posted XML does not have the posted error — it is well-formed — but here are some general reasons and remedies for an XML illegal character error:

    1. The "XML" file has an illegal character:

      • See XML Recommendation for the allowed characters in XML :

        [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
        
      • Examine the file in a dedicated XML editor or a hex editor such as ImHex or an XML or hex mode of a general purpose editor.

      • Remove the illegal character.

      • Fix the upstream source that produced the bad XML if possible.

    2. The intended XML file is not making its way to the XML application:

      • You've mistakenly specified a non-XML file or a different "XML" file that has an illegal character in it.
      • You've used the wrong MIME type. (Use application/xml.)
      • You've not uncompressed a compressed XML file first.
      • You've used a relative path from the wrong current directory.
      • You've specified the XML file in the wrong argument position on a command line or in a function call.
      • You've received an "XML" file from an upstream source that has a bug that resulted in the generation of not-well-formed "XML".
    3. Your declared encoding does not match the reality of your file's bytes. (Although this usually would result in different sorts of errors or output.)

    See also