Uninstalling NSX from ESXi fails if SNMP is enabled on the ESXi
search cancel

Uninstalling NSX from ESXi fails if SNMP is enabled on the ESXi

book

Article ID: 386021

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • You tried uninstalling NSX on NSX Manager GUI but it failed.
  • nsxcli -c del nsx also failed.
  • SNMP is enabled on the ESXi.
    [root@esxi:~] /etc/init.d/snmpd status
    snmpd is running
    [root@esxi:~] esxcli system snmp get
       Authentication:
       Communities:
       Enable: true
  • You see NSX VIB removal failed because libsnmppluginvs.so is in use. 
    esxupdate.log
    2025-01-15T22:40:05Z esxupdate: 2119094: LiveImageInstaller: DEBUG: Unmounting nsx_esx_.v00...
    2025-01-15T22:40:05Z esxupdate: 2119094: vmware.runcommand: INFO: runcommand called with: args = 'rm /tardisks/nsx_esx_.v00', outfile = 'None', returnoutput = 'True', timeout = '0.0'.
    2025-01-15T22:40:05Z esxupdate: 2119094: LiveImageInstaller: DEBUG: output: rm: can't remove '/tardisks/nsx_esx_.v00': Device or resource busy
    2025-01-15T22:40:05Z esxupdate: 2119094: LiveImageInstaller: INFO: Received error: ([], "Error in running rm /tardisks/nsx_esx_.v00:\nReturn code: 1\nOutput: rm: can't remove '/tardisks/nsx_esx_.v00': Device or resource busy\n\nIt is not safe to continue. Please reboot the host immediately to discard the unfinished update.") Trying again. Attempt #1
    2025-01-15T22:40:06Z esxupdate: 2119094: LiveImageInstaller: DEBUG: Unmounting nsx_esx_.v00...
    2025-01-15T22:40:06Z esxupdate: 2119094: vmware.runcommand: INFO: runcommand called with: args = 'rm /tardisks/nsx_esx_.v00', outfile = 'None', returnoutput = 'True', timeout = '0.0'.
    2025-01-15T22:40:06Z esxupdate: 2119094: LiveImageInstaller: DEBUG: output: rm: can't remove '/tardisks/nsx_esx_.v00': Device or resource busy
    2025-01-15T22:40:06Z esxupdate: 2119094: LiveImageInstaller: INFO: Received error: ([], "Error in running rm /tardisks/nsx_esx_.v00:\nReturn code: 1\nOutput: rm: can't remove '/tardisks/nsx_esx_.v00': Device or resource busy\n\nIt is not safe to continue. Please reboot the host immediately to discard the unfinished update.") Trying again. Attempt #2
    2025-01-15T22:40:08Z esxupdate: 2119094: LiveImageInstaller: DEBUG: Unmounting nsx_esx_.v00...
    2025-01-15T22:40:08Z esxupdate: 2119094: vmware.runcommand: INFO: runcommand called with: args = 'rm /tardisks/nsx_esx_.v00', outfile = 'None', returnoutput = 'True', timeout = '0.0'.
    2025-01-15T22:40:08Z esxupdate: 2119094: LiveImageInstaller: DEBUG: output: rm: can't remove '/tardisks/nsx_esx_.v00': Device or resource busy
    2025-01-15T22:40:08Z esxupdate: 2119094: LiveImageInstaller: WARNING: Handling Live Vib Failure: ([], "Error in running rm /tardisks/nsx_esx_.v00:\nReturn code: 1\nOutput: rm: can't remove '/tardisks/nsx_esx_.v00': Device or resource busy\n\nIt is not safe to continue. Please reboot the host immediately to discard the unfinished update.")

    vmkernel.log
    2025-01-15T22:40:05.190Z cpu53:2120987)VisorFSTar: 783: nsx_esx_.v00
    2025-01-15T22:40:05.190Z cpu53:2120987)VisorFSTar: 709: inode 8674194020622144214 (libsnmppluginvs.so) is busy
    2025-01-15T22:40:06.196Z cpu16:2120990)VisorFSTar: 783: nsx_esx_.v00
    2025-01-15T22:40:06.196Z cpu16:2120990)VisorFSTar: 709: inode 8674194020622144214 (libsnmppluginvs.so) is busy
    2025-01-15T22:40:08.200Z cpu56:2120992)VisorFSTar: 783: nsx_esx_.v00
    2025-01-15T22:40:08.200Z cpu56:2120992)VisorFSTar: 709: inode 8674194020622144214 (libsnmppluginvs.so) is busy

Environment

VMware NSX-T

VMware NSX

Cause

SNMP service on the ESXi needs to be stopped to complete NSX uninstallation successfully.

Resolution

  1. Reboot the ESXi.
  2. Stop SNMP service on the ESXi.
    esxcli system snmp set --enable false
  3. Uninstall NSX from the ESXi again.
  4. Once uninstallation completes, you can enable SNMP service again.
    esxcli system snmp set --enable true