Troubleshooting issues with VMs or datastore names containing special characters
search cancel

Troubleshooting issues with VMs or datastore names containing special characters

book

Article ID: 323189

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

In the /var/log/syslog.log file, you see entries similar to:
 
<YYY-MM-DDTHH:MM:SS>,426 Host Profiles[41776]: ERROR: Exception while retrieving profile. Exception: Failed to evaluate output of command ['storage', 'core', 'device', 'list']. Error: invalid syntax
<YYY-MM-DDTHH:MM:SS>,426 Host Profiles[41776]: WARNING: excObj is unknown type
<YYY-MM-DDTHH:MM:SS>Z HostProfileManager: [<YYY-MM-DDTHH:MM:SS>,429 root ERROR] Traceback (most recent call last):
File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/SoapHandler.py", line 1351, in _InvokeMethod
File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/VmomiSupport.py", line 351, in _InvokeMethod
File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/SoapHandler.py", line 225, in InvokeMethod
File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/hostprofiles/pyEngine/hostprofilemanager.py", line 363, in RetrieveProfile
File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/hostprofiles/pyEngine/hputil.py", line 747, in ProcessException
vmodl
<YYY-MM-DDTHH:MM:SS>Z HostProfileManager: .fault.SystemError: (vmodl.fault.SystemError) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = <unset>,
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) [
(LocalizableMessageWithPath) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'com.vmware.vim.profile.engine.UnexpectedError',
arg = (vmodl.KeyAnyValue) [
(vmodl.KeyAnyValue) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'context',
value = 'Exception while retrieving profile'
},
(vmodl.KeyAnyValue) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'error',
value = 'Failed to evaluate output of command'

Note: This log excerpt is an example. Date, time, and environmental variables may vary depending on your environment.

Environment

vCenter Server 7.x
vCenter Server 8.x
ESXi 7.x
ESXi 8.x

Cause

vCenter Server and ESX/ESXi server do not escape special characters used in the display names.
 
For example, if a virtual machine name contains the % character, it does not escape the character. This causes issues when querying for the name from vSphere Web Client or using the SDK.
 
This issue is seen when special characters like %, &, *, $, #, @, !, \, /, :, *, ?, ", <, >, |, ;, [, ] ' etc are contained in names of vSphere entities such as virtual machine name, cluster name, and datastore/folder/file name.

Resolution

To resolve this issue, avoid using special characters in the names.