This article is created for the purpose of resolving and preventing 'string too large for database' errors in vCenter.
Symptoms:
Attempting to connect an ESXi host to vCenter times out or vpxd crash with coredump and you see error similar to:string too large for database
In the vpxd.log file,you can see lines similar to
####-##-##T##:##:##.###Z error vpxd[############] [Originator@1234 sub=Default opID=AddHostWizard-apply-####-###:#######-##-##] [Vdb::VdbField] Invalid value written to column DEVICE_INFO_SUMMARY in table VPX_VM_VIRTUAL_DEVICE####-##-##T##:##:##.###Z error vpxd[############] [Originator@1234 sub=Default opID=AddHostWizard-apply-####-###:#######-##-##] [Vdb::VdbField] String too large: 514 > max(510)####-##-##T##:##:##.###Z error vpxd[############] [Originator@1234 sub=MoHost opID=AddHostWizard-apply-####-###:#######-##-##] [HostMo::Reconnect] Got method fault: N5Vmomi5Fault11SystemError9ExceptionE(vmodl.fault.SystemError)
[context]###########################################################################################################################################################################################################################################==[/context]
####-##-##T##:##:##.###Z info vpxd[############] [Originator@1234 sub=vpxLro opID=AddHostWizard-apply-####-###:#######-##-##] [VpxLRO] -- FINISH task-123456####-##-##T##:##:##.###Z info vpxd[############] [Originator@1234 sub=Default opID=AddHostWizard-apply-####-###:#######-##-##] [VpxLRO] -- ERROR task-123456 -- host-## -- vim.HostSystem.reconnect: vmodl.fault.SystemError:
--> Result:
--> (vmodl.fault.SystemError) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> reason = "string too large for database"
--> msg = ""
--> }
--> Args:
-->
--> Arg cnxSpec:
--> (vim.host.ConnectSpec) {
--> hostName = "<esxi_fqdn>",
--> port = -1,
--> sslThumbprint = <unset>,
--> userName = "root",
--> password = (not shown),
--> vmFolder = 'vim.Folder:########-####-####-####-############:######-##',
--> force = true,
--> vimAccountName = "vpxuser",
--> vimAccountPassword = (not shown),
--> managementIp = <unset>,
--> lockdownMode = <unset>,
--> hostGateway = (vim.host.GatewaySpec) null
--> }
--> Arg reconnectSpec:
In the vpxa.log on the esxi host you see entries similar to:
verbose vpxa[#######] [Originator@1234 sub=vpxaVmprovUtil opID=AddHostWizard-apply-####-###:#######-##-##] [TranslateDatastoreMoref] vim.Datastore:vsan:################-################# -> vim.Datastore:ds://
/vmfs/volumes/vsan:################-#################/
verbose vpxa[#######] [Originator@1234 sub=vpxaMoVm opID=AddHostWizard-apply-####-###:#######-##-##] Existing ISO file name: Name_too_long_SW_DVD5_Win_Svr_Std_and_DataCtr_2012_64Bit_English_Core_MLF_123-45678_1111111-2222
-3333-4444-123456789.ISO
verbose vpxa[#######] [Originator@1234 sub=PropertyProvider opID=AddHostWizard-apply-####-###:#######-##-##] RecordOp ASSIGN: info.progress, session[########-####-####-####-############]########-####-####-###
#-############. Applied change to temp map.
PowerCLI: get the names & paths to the virtual machines with ISOs mounted
Get-VM | FT Name, @{Label="ISO file"; Expression = { ($_ | Get-CDDrive).ISOPath }}
ESXi CLI (SSH/ESXi Shell):grep -i ISO /vmfs/volumes/*/*/*.vmx
GUI (HOST UI):
Check each VM by right clicking one at a time and going to 'Edit Settings'.
Check the CD/DVD drive to see if there is an ISO mounted.
vi /vmfs/volumes/VSAN_DATASTORE/VM_DIRECTORY/VM_NAME.vmxGUI (HOST UI):
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
alter table VPX_VM_VIRTUAL_DEVICE alter column DEVICE_INFO_SUMMARY type varchar (514);alter table VPX_VM_SN_VIRTUAL_DEVICE alter column DEVICE_INFO_SUMMARY type varchar (514);
<stressOption> <vdb> <schemaLoader> <forceODBC>1</forceODBC> </schemaLoader> </vdb> </stressOption>
service-control --start vpxd