Skip to main content

Failure to add Windows host for SQL Server virtualization due to error: "Failed to set codepage to 65001 (UTF-8)" (KBA8124)




KBA# 8124



When adding a new Windows host as a target environment to the Delphix engine, a failure can occur during the configuration phase of the environment discovery or refresh job:

Add host "Windows_Target_Host".
Failed to execute host configuration discovery for host "Windows_Target_Host": Parameter format not correct - /WINDOWS die : Error: Failed to set codepage to 65001 (UTF-8) At D:\Delphix\DelphixConnector\discovery\4201b39f-ced5-4c6f-cbf6-75cbf40cab4d-WINDOWS_HOST_ENVIRONMENT-13\ConfigurationDiscovery.ps1:26 char:9 + die "$($args[0])" + ~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,die .
Error Code
Suggested Action
Correct the errors and try the operation again.


Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases






To resolve this issue, the Windows path needs to be changed to the proper format for PowerShell API calls to find binaries. The Troubleshooting section has details on how to determine this is the issue. In this case the "chcp" binary (change code page) was not found due to the use of forward slashes "/" in the Windows system path for the profile of the Windows environment user.

The binary exists in the "C:\Windows\system32" directory. When the PATH was provided the issue can be seen:


Make the change to the PATH by replacing the / characters with the back-slash: \. After the change is made, you may need to restart the DelphixConnector so new Delphix environment users can load the changed profile and utilize the PATH changes.

You can obtain the PATH from the windows host from the PowerShell console while logged in as the Delphix environment user specific to this Windows host:

PS C:\Users\delphix> $env:path
C:\Python27\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\PuTTY\;C:\Users\delphix\AppData\Local\Microsoft\WindowsApps;

To change the Path variable through the Windows user interface:

  1. Navigate to the Control Panel as the logged in Delphix environment user, and then click System:
  2. From System, click Advanced system settings:
  3. In the System Properties window, click Environment Variables:
  4. The Windows system directories are located in the System variables pane.  Click Edit to make changes:
  5. Edit directly or select the PATH item, for example, those with the forward-slashes /, click Edit, and then click OK to make the changes to the profile:

After this change you may need to restart DelphixConnector service to refresh the Delphix environment user connections so that the new PATH change(s) take effect.




You can run a simple test to verify if this is the problem. Important information comes from the error message:

Failed to execute host configuration discovery for host "Windows_Target_Host": Parameter format not correct - /WINDOWS die : Error: Failed to set codepage to 65001 (UTF-8) At D:\Delphix\DelphixConnector\discovery\4201b39f-ced5-4c6f-cbf6-75cbf40cab4d-WINDOWS_HOST_ENVIRONMENT-13\ConfigurationDiscovery.ps1

You can match the text of the error "Failed to set codepage to 65001 (UTF-8)" from the ConfigurationDiscovery.ps1 script indicated in the directory specified.  Here is the code snippet:

# Set the codepage to UTF-8, suppressing the command output that tells us the active code page

chcp $UTF8_CODEPAGE >$null

verifySuccess "Failed to set codepage to $UTF8_CODEPAGE (UTF-8)"

From the Windows host in question, login as the Delphix environment user, open PowerShell and execute this command to check the result:

PS C:\Program Files\Delphix\DelphixConnector\connector> chcp
Parameter format not correct - /windows

Here the message from the "chcp" failure matches what we find in the error message posted by Delphix:

Failed to execute host configuration discovery for host "Windows_Target_Host": Parameter format not correct - /WINDOWS

The case of the windows directory is arbitrary and reflects how the directory was defined during the Windows OS installation.

If you receive the similar "Parameter format not correct" message indicating a forward-slash on the Windows directory you are likely experiencing this issue.




Related Articles

The following articles may provide more information or related information to this article:

  • NA