Cannot delete Port Group due to active ports
search cancel

Cannot delete Port Group due to active ports

book

Article ID: 337343

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:

When you try to remove a port group from the vSphere Client or from the ESX server console, you receive this error:

Failed to remove portgroup: VM Network, Error: Unable to delete portgroup <VM_Network>, for the following reasons: 1 active ports

Where VM_Network is the name of Port Group.


Environment

VMware ESX 4.0.x
VMware ESXi 4.1.x Embedded
VMware vSphere ESXi 5.0
VMware ESX 4.1.x
VMware ESXi 4.0.x Embedded
VMware vCenter Server 4.1.x
VMware vCenter Server 5.0.x
VMware vCenter Server 4.0.x
VMware ESXi 4.1.x Installable
VMware ESXi 4.0.x Installable

Resolution

To resolve this issue, determine the process that is using the port group and terminate it.
To determine the process that is using the port group
  1. Run the esxtop and press N to switch to the networking view and check the pNIC that is associated with the affected port group and vSwitch to determine the process that is using the pNIC and holding the port.

  2. Use the Map tab in VirtualCenter with virtual machine to Network and Host to Network and click Apply relationship. This displays the virtual machine that has an existing relationship with any port group and where the virtual machine is registered currently.

    Once you determine the virtual machine that is still having the port in use, shut down the virtual machine and try removing the port group or vSwitch again.

    Note: If you cannot power down the virtual machine select the network adapter associated with the portgroup and disconnect it by unchecking Connected and Connect at Poweron. The network adapter can then be deleted from the virtual machine.

To manually delete the portgroup from a console or SSH session:
  1. List the available vSwitches with their associated portgroups:

    # esxcfg-vswitch --list

  2. Verify that the portgroup you want to remove exists on the vSwitch:

    # esxcfg-vswitch --check-pg="PG Name" vSwitchX

    Replace vSwitchX with the vSwitch number where the affected port group was built.

  3. Delete the portgroup with:

    # esxcfg-vswitch --del-pg="PG Name" vSwitchX


Additional Information

For more/related information, see Using esxtop to identify storage performance issues (1008205)
Using esxtop to identify storage performance issues for ESX / ESXi (multiple versions)