Problem Description
Users may encounter issues when attempting to discover Hyper-V virtual machines (VMs) on the Phoenix Management Console when the Hyper-V host is running an operating system configured in a non-English language.
Cause
The problem arises because the English language pack is not installed on the Hyper-V host. Without this language pack, certain system commands and queries fail, leading to errors in VM discovery.
Tracebacks
If this issue occurs, the following errors may appear in the main_service.log file located in C:\ProgramData\Phoenix:
Example 1:
[2020-06-08 13:42:58,407] [ERROR] WMI connection failed with error: (-2147352567, 'Ocurrió[2020-06-08 13:42:58,407] [ERROR] WMI connection failed with error: (-2147352567, 'Ocurri\xf3 una excepció[2020-06-08 13:42:58,407] [ERROR] WMI connection failed with error: (-2147352567, 'Ocurri\xf3 una excepci\xf3n.', (0, u'SWbemLocator', u'Espacio de nombres no vá[2020-06-08 13:42:58,407] [ERROR] WMI connection failed with error: (-2147352567, 'Ocurri\xf3 una excepci\xf3n.', (0, u'SWbemLocator', u'Espacio de nombres no v\xe1lido ', None, 0, -2147217394), None)
[2020-06-08 13:42:58,407] [INFO] Retrying WMI connection without username/password.
[2020-06-08 13:42:58,407] [ERROR] SyncError: Failed to connect to HyperV Management Service
[2020-06-08 13:42:58,407] [ERROR] Error <class 'pywintypes.com_error'>:(-2147352567, 'Ocurrió[2020-06-08 13:42:58,407] [ERROR] Error <class 'pywintypes.com_error'>:(-2147352567, 'Ocurri\xf3 una excepció[2020-06-08 13:42:58,407] [ERROR] Error <class 'pywintypes.com_error'>:(-2147352567, 'Ocurri\xf3 una excepci\xf3n.', (0, u'SWbemLocator', u'Espacio de nombres no vá[2020-06-08 13:42:58,407] [ERROR] Error <class 'pywintypes.com_error'>:(-2147352567, 'Ocurri\xf3 una excepci\xf3n.', (0, u'SWbemLocator', u'Espacio de nombres no v\xe1lido ', None, 0, -2147217394), None)
Example 2:
[2023-06-02 15:55:51,657] [ERROR] Error in fetching OS version
[2023-06-02 15:55:51,657] [ERROR] Error <type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'strip'. Traceback -Traceback (most recent call last):
File "roboLib\roboUtils.pyc", line 312, in os_version_recheck
AttributeError: 'NoneType' object has no attribute 'strip'
Resolution
To resolve this issue, install the English language pack and configure the system settings appropriately.
Method 1: Install English Language Pack via GUI
Open Windows Language settings by searching for Language settings in the Start menu.
Click Add a language and select English (United States).
Select language preferences and click Install.Select the language
Select the preferences and click on install
Restart the Hyper-V host to apply the changes.
Method 2: Install English Language Pack via PowerShell
Execute the following commands in PowerShell as an administrator:
$UserLanguageList = New-WinUserLanguageList -Language "en-US"
$UserLanguageList.Add("en-US")
Set-WinUserLanguageList -LanguageList $UserLanguageList
Reboot the Hyper-V host after installing the language pack.
Method 3: Install Language Pack via DISM (for Windows Server 2022 and other versions)
List installed languages using:
dism /Online /Get-Intl
Download the English Language Pack ISO from the Microsoft Volume Licensing Site, Microsoft OEM, or a Microsoft Partner site.
Copy the following CAB files from the ISO to an empty directory on the Windows Server:
Microsoft-Windows-Server-Language-Pack_x64_en-us.cab
Microsoft-Windows-LanguageFeatures-Basic-en-us-Package~31bf3856ad364e35~amd64~~.cab
Microsoft-Windows-UserExperience-Desktop-Package~31bf3856ad364e35~amd64~~.cab (Package names may vary based on the downloaded ISO version.)
Install the packages using the following command:
dism /Online /Add-Package /PackagePath:"PATH\TO\CAB"
Restart the server after installation.
Run the following commands to ensure system locale settings are correctly configured:
chcp 437
Set-WinSystemLocale en-US
Set-WinUserLanguageList en-US -Force
Open System Configuration by running:
SConfig
Navigate to:
SConfig menu → Date and Time → Change Date and Time → Change Calendar Settings → Administrative tab → Change System Locale to US - English
Restart the server again.
Verification:
After installing the English language pack, verify the configuration using the following methods:
1. Verify VM Discovery on Hyper-V 2008 / 2008 R2
Run this PowerShell command:
Get-WmiObject -Namespace "root\virtualization" -Locale "MS_409" -Query "Select * From Msvm_ComputerSystem where Caption='Virtual Machine'"
The expected output should list the VMs present on the host.
2. Verify VM Discovery on Hyper-V 2012+
Run this PowerShell command:
Get-WmiObject -Namespace "root\virtualization\v2" -Locale "MS_409" -Query "Select * From Msvm_ComputerSystem where Caption='Virtual Machine'"
The expected output should list the VMs present on the host.
3. Confirm English Language Pack Installation
Run the following PowerShell commands:
$OS = Get-WmiObject -Class Win32_OperatingSystem
$LangPacks = $OS.MUILanguages
$LangPacks
The expected output should include EN.
Conclusion
By installing the English language pack and configuring system settings, users can resolve issues related to Hyper-V VM discovery in Phoenix Management Console.
If the issue persists, ensure that all necessary packages are installed correctly and the system has been restarted after configuration changes.For additional assistance, contact Druva Support.