vCenter Server service stopped while provisioning a VM via Flash or HTML5 client
search cancel

vCenter Server service stopped while provisioning a VM via Flash or HTML5 client

book

Article ID: 344946

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • vCenter Server service crashes while provisioning a VM via webclient/H5 client
  • /var/log/vmware/vpxd/vpxd.log:
2019-10-10T09:41:58.496-04:00 verbose vpxd[7F3C4E9D7700] [Originator@6876 sub=vmconfig opID=k0zi4wvr-fzy6-h5:70031308-a0] [VmMo::GetConfigInt] The vm config for vm vm-65564 is empty in the DB
2019-10-10T09:41:58.496-04:00 warning vpxd[7F3C4E9D7700] [Originator@6876 sub=vmmoVm opID=k0zi4wvr-fzy6-h5:70031308-a0] VM Unknown 350987 has no valid primary datastore 

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware vCenter Server Appliance 6.5.x

Cause

The issue is caused due to the invalid VM entries being created in the vCenter Server database

Resolution

Caution: This procedure modifies the database. Ensure to take a full backup of your vCenter Server machine and Platform Service Controller before proceeding.

To resolve the issue, we need to remove the entries from vCenter Server database with unknown value
  1.  Log in to the VCSA via ssh (putty)
  2. Stop vpxd and content-library service
service-control --stop vpxd
service-control --stop content-library
  1. Run this command to log in to the vCenter Server Appliance database: 
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
  1. Execute the below query:
select * from vpx_entity where name like '%Unknown%';
  id   |      name      | type_id | parent_id
-------+----------------+---------+-----------
 65564 | Unknown 350987 |       0 |        50
 65566 | Unknown 351315 |       0 |        50
 65561 | Unknown 344944 |       0 |        50
 65562 | Unknown 345716 |       0 |        50
 65563 | Unknown 345733 |       0 |        50
 65565 | Unknown 351156 |       0 |        50
  1.  Validate the VM entries on the VM table
VCDB=# select id,dns_name,host_id,file_name from vpx_vm where id=65561;
  id   | dns_name | host_id |                                     file_name
-------+----------+---------+------------------------------------------------------------------------------------
 65561 |          |    3516 | ds:///vmfs/volumes/5877bce1-5c61d123-3737-38eaa71188b6/QTCAWAPPD02/QTCAWAPPD02.vmx
  1. Remove  each of the VM entries for the ID's returned from Step 4 
Sample Commands:
delete from VPX_COMPUTE_RESOURCE_DAS_VM where VM_ID='<ID from Step 4>';
delete from VPX_COMPUTE_RESOURCE_DRS_VM where VM_ID='<ID from Step 4>';
delete from VPX_GUEST_DISK where VM_ID='<ID from Step 4>';
delete from VPX_VIRTUAL_DEVICE where ID='<ID from Step 4>';
delete from VPX_VM_CONFIG_INFO where ID='<ID from Step 4>';
delete from VPX_VM_DS_SPACE where VM_ID='<ID from Step 4>';
delete from VPX_VM_FILE_LAYOUT_EX where VM_ID='<ID from Step 4>';
delete from VPX_VM_FLE_DISK_LAYOUT where VM_ID='<ID from Step 4>';
delete from VPX_VM_FLE_FILE_INFO where VM_ID='<ID from Step 4>';
delete from VPX_VM_FLE_SNAPSHOT_LAYOUT where VM_ID='<ID from Step 4>';
delete from VPX_VM_STATIC_OVERHEAD_MAP where VM_ID='<ID from Step 4>';
delete from VPX_VM where ID='<ID from Step 4>';
delete from VPX_ENTITY where ID='<ID from Step 4>';
 
  1. Quit the VCDB prompt using the below
 \q
  1. Start the services stopped during step 2  
service-control --start vpxd
service-control --start content-library
  1. Log in to the vCenter Server via web client and validate the deployment