vnic disconnected after user removed it from guest OS
search cancel

vnic disconnected after user removed it from guest OS

book

Article ID: 425783

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • A virtual machine network adapter (typically VMXNET3) unexpectedly detaches from the guest operating system, resulting in immediate loss of network connectivity.
  • The removal is "silent," meaning no VmReconfiguredEvent is found in vCenter Server logs prior to the issue.
  • The vCenter Event Log only records a reconfiguration when an administrator manually re-adds the NIC.
  • The virtual machine's vmware.log file shows a complete hot-removal sequence initiated internally:
    YYYY-MM-DDT09:18:19.283Z| vcpu-1| A000: ConfigDB: Setting Ethernet1.pciSlotNumber = "-1"
    YYYY-MM-DDT09:18:19.285Z| vcpu-0| I005: Destroying virtual dev for scsi0:0 vscsi=8198
    YYYY-MM-DDT09:18:19.286Z| vcpu-0| I005: VMMon_VSCSIStopVports: No such target on adapter
    YYYY-MM-DDT09:18:19.291Z| vcpu-0| I005: Closing all the disks of the VM.
    YYYY-MM-DDT09:18:19.291Z| vcpu-0| I005: Closing disk 'scsi0:0'
    YYYY-MM-DDT09:18:19.295Z| vcpu-0| I005: DISKLIB-VMFS  : "/vmfs/volumes/#####/#####/#####-000002-delta.vmdk" : closed.
    YYYY-MM-DDT09:18:19.297Z| vcpu-0| I005: DISKLIB-VMFS  : "/vmfs/volumes/#####/#####/#####-flat.vmdk" : closed.
    YYYY-MM-DDT09:18:19.297Z| vcpu-0| A000: ConfigDB: Setting Ethernet1.present = "FALSE"
    YYYY-MM-DDT09:18:19.303Z| vcpu-0| I005: Checkpoint_Unstun: vm stopped for 19819 us
    YYYY-MM-DDT09:18:19.303Z| vcpu-0| I005: SCSI: switching scsi0 to push completion mod
    YYYY-MM-DDT09:18:19.340Z| vcpu-0| I005: Hot removal done

Environment

VMware ESXi

Cause

The Guest OS initiates a PCI hot-plug removal request (e.g., via "Safely Remove Hardware"), which the hypervisor honors because the devices.hotplug capability is enabled by default.

Resolution

To restore connectivity and prevent future silent detachments, follow these steps:

Step 1: Manually Re-add the vNIC via vCenter If the network adapter has been completely removed from the VM configuration (silent detachment), use the following steps to re-add it:

  1. Log in to the vSphere Client.
  2. Locate and right-click the affected Virtual Machine, then select Edit Settings.
  3. Click ADD NEW DEVICE at the top of the window and select Network Adapter.
  4. Configure the new adapter:
    • Adapter Type: Select VMXNET3.
    • Network: Select the appropriate Port Group or Distributed Port Group.
    • Status: Ensure Connect At Power On is checked.
  5. (Optional) If you need to retain the original MAC address, expand the New Network Adapter section, change the MAC Address drop-down to Manual, and enter the original MAC address found in previous logs.
  6. Click OK to apply the changes.

Step 2: Disabling Hot-Remove Capability To prevent the Guest OS from being able to eject virtual hardware:

  1. Right-click the VM and select Edit Settings.
  2. Go to VM Options > Advanced > Edit Configuration.
  3. Click Add Configuration Params and enter:
    • Name: devices.hotplug
    • Value: false
  4. Click OK and restart the virtual machine for the setting to take effect.

Additional Information

Disabling the HotAdd/HotPlug capability in virtual machines