Upgrade from WinVC 6.5 to 7.0 with non-ascii Data Source Name fails
search cancel

Upgrade from WinVC 6.5 to 7.0 with non-ascii Data Source Name fails

book

Article ID: 319609

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • While Migration Assistant executes pre-checks the below error is encountered and the Upgrade process is disrupted:
YYYY-MM-DDTHH:MM:SS.858Z ERROR __main__ Upgrade Phase 'vcdb:CollectRequirements' failed. Exception: 'utf8' codec can't decode byte 0x82 in position 0: invalid start byte
Traceback (most recent call last):
File "C:\migE3F2.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\componentPhaseLauncher.py", line 461, in main
executionResult = systemExtension(exeContext)
File "C:\migE3F2.tmp\PFiles\VMware\CIS\cis_upgrade_runner\libs\sdk\extensions.py", line 94, in __call__
result = self.extension(*args)
File "C:\migE3F2.tmp\PFiles\VMware\CIS\cis_upgrade_runner\libs\sdk\extensions.py", line 110, in _func
return func(*args)
File "C:\migE3F2.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\vcdb\__init__.py", line 31, in do_collect_upgrade_requirements
req = do_windows_collect_req(context)
File "C:\migE3F2.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\vcdb\vcdb_collect_requirements_functions.py", line 1734, in do_windows_collect_req
is_windows_authentication_var)
File "C:\migE3F2.tmp\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\vcdb\vcdb_collect_requirements_functions.py", line 1415, in get_windows_req_cross_platform
dsn_name = ensure_str_type(data_params_object.dsn_name).decode('utf-8')
File "C:\Program Files\VMware\vCenter Server\python\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x82 in position 0: invalid start byte
 


Environment

VMware vCenter Server 6.0.x
VMware vCenter Server 6.5.x

Cause

  • The cause of the problem is a build in function in Python 2.XX version which fails to decode the non-ascii DSN name.
  • This is fixed in newer versions of Python e.g. 3.6.

Resolution

The issue is resolved in version 6.7 and above of the vCenter Server, because newer versions of the product use Python 3.

There would be no resolution that will be rolled out for the version lower than 6.7, since it would be a very high risk of regression if we introduce a fix in the code for something that is being fixed in the newer versions.

Workaround:
To workaround the issue:
  1. When Migration Assistant is started and pre-checks are taking place wait for the failure.
  2. Login to the environment where the VC is running.
  3. Locate file with name vcdb_collect_requirements_functions.py usually location is here:
C:\Users\Administrator\AppData\Local\VMware\Migration-Assistant\PythonURExtractDir\PFiles\VMware\CIS\cis_upgrade_runner\payload\component-scripts\vcdb
  1. Open vcdb_collect_requirements_functions.py with any text editor (Notepad++ is just fine).
  2. Go to row number 1415, it should look like this:
1415 dsn_name = ensure_str_type(data_params_object.dsn_name).decode('utf-8')
  1. Modify the row so it looks like this:
1415 dsn_name = ensure_str_type(data_params_object.dsn_name)
  1. Save (for Notepad++ ctl+s)
  2. Retry the migration.