Virtual machine NICs start in a disconnected state after a failed API reconfiguration task
search cancel

Virtual machine NICs start in a disconnected state after a failed API reconfiguration task

book

Article ID: 443031

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Virtual machine NICs are disconnected during virtual machine startup.
Logs will indicate that virtual devices are being handled with a "start disconnected" message upon power-on.

vmware.log

In(05) vcpu-0 - VMXNET3 user: failed to connect EthernetX to network ####.
In(05) vcpu-0 - Msg_Post: Warning
In(05) vcpu-0 - [msg.device.startdisconnected] Virtual device 'EthernetX' will start disconnected.


Before powering on, an improper "Add" operation was performed on the virtual machine's NIC via API, resulting in failure.

vpxd.log

info vpxd[####] [Originator@6876 sub=VmProv opID=####] Applying ConfigSpec (vim.vm.ConfigSpec) {
-->    deviceChange = (vim.vm.device.VirtualDeviceSpec) [
-->       (vim.vm.device.VirtualDeviceSpec) {
-->          operation = "add", 
-->          device = (vim.vm.device.VirtualVmxnet3) {
-->             key = 4002, 
-->             deviceInfo = (vim.Description) {
-->                label = "Network adapter X",

hostd.log

In(166) Hostd[####]: [Originator@6876 sub=Vmsvc.vm:####] Reconfigure failed: N3Vim5Fault17InvalidDeviceSpec9ExceptionE(Fault cause: vim.fault.InvalidDeviceSpec)

Environment

ESXi
vCenter Server
NSX-T

Cause

The issue is caused by an inappropriate "Add" operation performed via API on a vNIC that already exists within the virtual machine configuration.

  1. The hostd service returns an error (vim.fault.InvalidDeviceSpec) because the device key is already present.
  2. The operation fails and triggers a rollback.
  3. Due to the rollback behavior, the NICs are configured to "start disconnected," which takes effect during the subsequent power-on operation.

Resolution

To resolve this issue, correct the operation in the API caller.
When modifying or reconfiguring an existing NIC, ensure the operation type in the VirtualDeviceSpec is set to "edit" instead of "add".