"del nsx" fails with an exception
search cancel

"del nsx" fails with an exception

book

Article ID: 324195

calendar_today

Updated On:

Products

VMware NSX Networking

Issue/Introduction

Symptoms:
  • NSX-T Data Center
  • On an ESXi host, the nsxcli command "del nsx" fails with error
"%Exception when deleting nsx from host: ' error code: 4 stdout: delete_nsx_instance_from_host.sh: INFO: NSX reset script called with argument fabric_node on nsx_instance_from_host.sh: INFO:Run transport_node reset on ESX node % Failed to remove all host switches or logical switches delete_nsx_instance_from_host.sh: ERROR: Failed to reset nsxa app of nsx-opsagent. Please check ospagent logs for more details. , stderr: Mon Nov 07 2022 UTC 07:03:02.307 ERROR: Failed to reset nsxa app of nsx-opsagent. Please check ospagent logs for more details. ESX1.local.com> del nsx"
  • Hostd logs on the host report the following error relating to DCUI user permisions /var/log/hostd.log
2022-11-06T22:23:29.198Z info hostd[4233788] [Originator@6876 sub=Vimsvc.ha-eventmgr opID=b841b74c-becb] Event 1520313 : Cannot login user [email protected]: no permission


Environment

VMware NSX-T
VMware NSX 4.0.0.1

Cause

This failure occurs when admin permissions are removed manually from user 'dcui' by editing /etc/vmware/hostd/authorization.xml

Resolution

This is a known behaviour

Workaround:
Restore the default permissions to user "dcui" by running the following command from the root shell of the ESXi host

#esxcli system permission set -i dcui -r Admin