Host deletion from VDS fails due to a template VM connected to an NSX segment
search cancel

Host deletion from VDS fails due to a template VM connected to an NSX segment

book

Article ID: 412800

calendar_today

Updated On:

Products

VMware vCenter Server VMware NSX

Issue/Introduction

  • No VM connected to any DVPGs on the VDS is running on the target Host.

  • The Host deletion from the VDS fails with the following message:
    vDS <VDS_NAME> port <PORT_UUID> is still on host <HOST_NAME> connected to <TEMPLATE_VM_NAME> nic=#### type=vmVnic
     
  • You see messages similar to the following in /var/log/vmware/vpxd/vpxd.log on vCenter Server:
    ####-##-##T##:##:##.###Z error vpxd[06792] [Originator@6876 sub=Default opID=<ID>:<ID>] [VpxLRO] -- ERROR task-<ID> -- <UUID>(<UUID>) -- dvs-<ID> -- vim.DistributedVirtualSwitch.reconfigure: :vim.fault.Reso
    urceInUse
    --> Result:
    --> (vim.fault.ResourceInUse) {
    -->    faultCause = (vmodl.MethodFault) null,
    -->    faultMessage = (vmodl.LocalizableMessage) [
    -->       (vmodl.LocalizableMessage) {
    -->          key = "com.vmware.vim.vpxd.dvs.portOnHost.label",
    -->          arg = (vmodl.KeyAnyValue) [
    -->             (vmodl.KeyAnyValue) {
    -->                key = "dvs",
    -->                value = "<VDS_NAME>"
    -->             },
    -->             (vmodl.KeyAnyValue) {
    -->                key = "port",
    -->                value = "<PORT_UUID>"
    -->             },
    -->             (vmodl.KeyAnyValue) {
    -->                key = "host",
    -->                value = "<HOST_NAME>"
    -->             },
    -->             (vmodl.KeyAnyValue) {
    -->                key = "ent",
    -->                value = "<TEMPLATE_VM_NAME>"
    -->             },
    -->             (vmodl.KeyAnyValue) {
    -->                key = "keyAndType",
    -->                value = "nic=#### type=vmVnic"
    -->             }
    -->          ],
    -->          message = <unset>
    -->       }
    -->    ],
    -->    type = "vim.dvs.DistributedVirtualPort",
    -->    name = "<PORT_UUID>"
    -->    msg = ""
    --> }
    --> Args:
    -->
    --> Arg spec:
    --> (vim.DistributedVirtualSwitch.ConfigSpec) {
    -->    dynamicProperty = <unset>,
    -->    configVersion = "##",
    -->    name = <unset>,
    -->    numStandalonePorts = <unset>,
    -->    maxPorts = <unset>,
    -->    uplinkPortPolicy = (vim.DistributedVirtualSwitch.UplinkPortPolicy) null,
    -->    uplinkPortgroup = <unset>,
    -->    defaultPortConfig = (vim.dvs.DistributedVirtualPort.Setting) null,
    -->    host = (vim.dvs.HostMember.ConfigSpec) [
    -->       (vim.dvs.HostMember.ConfigSpec) {
    -->          dynamicProperty = <unset>,
    -->          operation = "remove",
    -->          host = 'vim.HostSystem:<HOST_UUID>:host-<ID>',
    -->          backing = (vim.dvs.HostMember.Backing) null,
    -->          maxProxySwitchPorts = <unset>,
    -->          vendorSpecificConfig = <unset>
    -->       }
    -->    ],
    -->    extensionKey = <unset>,
    -->    description = <unset>,
    -->    policy = (vim.DistributedVirtualSwitch.SwitchPolicy) null,
    -->    vendorSpecificConfig = <unset>,
    -->    contact = (vim.DistributedVirtualSwitch.ContactInfo) null,
    -->    switchIpAddress = <unset>,
    -->    defaultProxySwitchMaxNumPorts = <unset>,
    -->    infrastructureTrafficResourceConfig = <unset>,
    -->    netResourcePoolTrafficResourceConfig = <unset>,
    -->    networkResourceControlVersion = <unset>
    --> }

Environment

VMware NSX
VMware vCenter Server

Cause

This issue occurs if the VDS was previously prepared by NSX and had a template VM connected to an NSX segment, and the template VM has been migrated to another host. vCenter still thinks its port is on the original Host.

Resolution

  • This issue is fixed in VMware vCenter Server 7.0 U3.
  • One of the followings will unblock this situation.
    • Delete the template VM if it is not used.
    • Convert the template VM to a normal VM, and migrate it to the other Host. Convert the VM to a template VM after the Host deletion from the VDS.
      Regarding converting procedure, refer to Convert a Template to a Virtual Machine.
    • Unregister the template VM, and register again with the .vmtx file after the Host deletion from the VDS.
      Regarding registering procedure, refer to Register a VM or VM Template with vCenter Server.