NSX LB Virtual Server status shows as "Deactivated" when created or modified via API
search cancel

NSX LB Virtual Server status shows as "Deactivated" when created or modified via API

book

Article ID: 427746

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • NSX LB was created or modified using the following API:
    PATCH /policy/api/v1/infra/lb-virtual-servers/{lb-virtual-server-id}
  • The API request body includes "enabled": false.
  • The Virtual Server status shows as "Deactivated" in the Networking > Load Balancing > Virtual Servers.
  • The traffic is hitting the Virtual Server IP but not transferred to any of the pool members
  • In the NSX-T Edge log (/var/log/syslog) the following errors are seen:
    <TIMESTAMP> <EDGE HOSTNAME> NSX <ID> LOAD-BALANCER [nsx@<ID> comp="nsx-edge" subcomp="lb" s2comp="lb" level="INFO"] [<UUID> Operation.Category: 'LbEvent', Operation.Type: 'StatusChange', Obj.Type: 'VirtualServer', Obj.UUID: '<UUID>', Obj.Name: '<NAME>', Lb.UUID: '<UUID>', Lb.Name: '<NAME>', Status.NewStatus: 'Disabled', Status.Msg: 'virtual server is disabled'

Environment

VMware NSX

Cause

The Virtual Server will be disabled when the "enabled" parameter is set to false.
The current settings can be retrieved via GET /policy/api/v1/infra/lb-virtual-servers/.

Resolution

Please set the "enabled" parameter to true.

Additional Information

NSX-T Data Center REST API - Create or update a LBVirtualServer