vCenter Migration Fails with internal error
search cancel

vCenter Migration Fails with internal error

book

Article ID: 338840

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • vCenter Migration Fails with internal error
  • From UpgradeRunner.log we can see MA fails to get information for most of the components.

 

For Example:

 

CollectRequirements_com.vmware.cls_XXXX_XX_XX_XX_XX.log :

 

2020-04-23T02:50:26.242Z INFO __main__ Set root upgrade folder to: C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts
2020-04-23T02:50:26.430Z INFO sdk_utils Loading external install configuration from C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\config\vcsa_install_config.json
2020-04-23T02:50:27.415Z ERROR install_param_utils Error executing 'install-parameter feature.states': ERROR: 1, stdout: , stderr:   File "C:\Program Files\VMware\vCenter Server\bin\\install-parameter", line 57^M
    except IOError, e:^M
                  ^^M
SyntaxError: invalid syntax^M

 

CollectRequirements_com.vmware.vcdb_XXXX_XX_XX_XX_XX.log :

 

2020-04-23T02:50:32.799Z INFO vcdb.const MSSQL with Windows Authentication.
2020-04-23T02:50:32.875Z INFO win_executor Running command ['C:\\migA6F4.tmp\\PFiles\\VMware\\CIS\\cis_upgrade_runner\\payload\\component-scripts\\vcdb\\dbupgrade\\dbcupgrade', '-u', b'I3Ztd2FyZXZpbXByb2RcQ0lUWU9GU1lETkVZ', '-p',CENSORED, '-b', '600', '-v', 'C:\\Users\\0GGRIG~1\\AppData\\Local\\Temp\\vcsMigration\\vcdb_warning.log', '-t', 'mssql', '-d', b'VklN', '-y', '-e', '-m'] as user #vmwarevimprod@CITYOFSYDNEY
2020-04-23T02:50:32.875Z ERROR __main__ Upgrade Phase 'vcdb:CollectRequirements' failed. Exception: 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\componentPhaseLauncher.py", line 461, in main
    executionResult = systemExtension(exeContext)
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\libs\sdk\extensions.py", line 94, in __call__
    result = self.extension(*args)
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\libs\sdk\extensions.py", line 110, in _func
    return func(*args)
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\vcdb\__init__.py", line 25, in do_collect_upgrade_requirements
    req = do_windows_collect_req(context)
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\vcdb\vcdb_collect_requirements_functions.py", line 739, in do_windows_collect_req
    DBC_UPGRADE_FOLDER)
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\libs\sdk\win_executor.py", line 307, in run_as_user
    stderr=stderrFile)
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\libs\sdk\win_executor.py", line 130, in __init__
    user = user.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

 

CollectRequirements_com.vmware.is_XXXX_XX_XX_XX_XX.log :
 

2020-04-23T02:50:34.960Z ERROR __main__ Upgrade Phase 'is:CollectRequirements' failed. Exception: Failed to import InventoryService upgrade library: attempted relative import with no known parent package.
Traceback (most recent call last):
  File "C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\is\is_upgrade_600.py", line 27, in <module>
    from . import is_upgrade_lib as IUL
ImportError: attempted relative import with no known parent package

 

CollectRequirements_com.vmware.vpxd_XXXX_XX_XX_XX_XX.log :
 

2020-04-23T02:50:27.187Z INFO sdk_utils Loading external install configuration from C:\migA6F4.tmp\PFiles\VMware\CIS\cis_upgrade_runner\config\vcsa_install_config.json
2020-04-23T02:50:28.510Z ERROR install_param_utils Error executing 'install-parameter feature.states': ERROR: 1, stdout: , stderr:   File "C:\Program Files\VMware\vCenter Server\bin\\install-parameter", line 57^M
    except IOError, e:^M
                  ^^M

SyntaxError: invalid syntax^M


Environment

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

Cause

This error usually happens when the Python path is either incorrect or if additional Python software is installed on the Source Windows machine.

Resolution

For either of the above errors :

Open CMD prompt as Administrator and run service-control --status --all which should fail with below error.

C:\Program Files\VMware\vCenter Server\bin>service-control --status

 File "E:\Program Files\VMware\vCenter Server\bin\\service-control", line 28
  os.mkdir(dataDir, 0755)
             ^
SyntaxError: invalid token

To fix this issue :

Go to Computer, Right click and select Properties. Go to Advanced system settings and select Environmental Variables.

Make sure that the Environmental Variables are set properly to the correct installation directory as below.
In some environment the Python path will be set to CIS directory so change it to the proper location by editing the path variable.

For vCenter Server 6.0 & 6.5 :

VMWARE_PYTHON_BIN=C:\Program Files\VMware\vCenter Server\python\python.exe
VMWARE_PYTHON_HOME=C:\Program Files\VMware\vCenter Server\python
VMWARE_PYTHON_MODULES_HOME=C:\Program Files\VMware\vCenter Server\python-modules\cis
VMWARE_PYTHON_PATH=C:\Program Files\VMware\vCenter Server\python-modules


(If you see Python 3 path for 6.0 or 6.5, remove the same from Environmental Variables)

For vCenter Server 6.7 :

VMWARE_PYTHON3_BIN=C:\Program Files\VMware\vCenter Server\python\python.exe
VMWARE_PYTHON3_HOME=C:\Program Files\VMware\vCenter Server\python
VMWARE_PYTHON_BIN=C:\Program Files\VMware\vCenter Server\python\python.exe
VMWARE_PYTHON_HOME=C:\Program Files\VMware\vCenter Server\python
VMWARE_PYTHON_MODULES_HOME=C:\Program Files\VMware\vCenter Server\python-modules\cis
VMWARE_PYTHON_PATH=C:\Program Files\VMware\vCenter Server\python-modules


Once the changes are made, reboot the Windows server and re-run the Migration.