3 Replies Latest reply on Apr 16, 2020 1:22 AM by Mallik7

    Network adapter disappeared from a VM - "There is no network assigned to this virtual machine.". - The correct configuration is found in a "vmx~" ("vmx tilde") file

    ricmarques Enthusiast

      Hi everyone,

       

      I had an issue with a Virtual Machine "losing" its (virtual) Network Adapter. The VM is hosted in a ESXi host - running 5.5 Update 2 (5.5U2) - and that ESXI Host belongs to a Cluster of several ESXi hosts, managed by "VMware vCenter Server" (also with version 5.5 Update 2). Each ESXi host has several "vSphere Standard Switches" (this Cluster does NOT have a "Distributed Switch")

       

      I appreciate any comments from anyone regarding this issue: Has it occurred to you or to a colleague? Have you heard it before from someone else? Do you know anything about it? (I did several web searches, but "come out blank")

       

       

      So, let me tell you the story of this issue (and the way I solved it):

       

      In one of the VMs, running "Windows Server 2003, Standard Edition, 32-bits", a Server Operator installed "Windows Updates" and rebooted the VM. When he rebooted it, the VM lost its network connectivity!

       

      1 - I observed than, in the "vSphere Web Client", in the "Summary" tab for this VM, there was the following error message (in a box with yellow background): "There is no network assigned to this virtual machine."

       

      2 - In the same page, I expanded the "VM Hardware" group/section and I found out there was NO "Network Adapter 1" (in fact, there was NO "Network Adapter" whatsoever).


      3 - I browsed the "Tasks" and "Events" for the VM. I didn't find any related events.

       

      4 - I connected, by SSH, to the ESXi host that was hosting the VM. I did a "cd" to the directory that hosted the VM files. In that directory, I found the usual "vmx" configuration file (let's call it "vm.vmx") BUT I also found a "vm.vmx~" file (ending just like that with a "tilde". Let's call it a "vmx tilde" file).

       

      5 - I compared both files - "vm.vmx" and "vm.vmx~". I noticed that the file that ended in "vmx" had the network adapter disabled and that the "vmx~" file ("vmx tilde file") was the one with the correct configuration.

       

      To be more specific, in the "vm.vmx" file, there were the following 2 lines:

       

      ethernet0.present = "FALSE"

      ethernet0.pciSlotNumber = "-1"

       

      ... while, in the ".vmx~" file ("tilde file"), the 2 corresponding lines were like this:

       

      ethernet0.present = "true"

      ethernet0.pciSlotNumber = "32"

       

      (the remaining lines of both files were the same between one file and the other).

       

      6 - As a safety measure, I did a backup of the "vmx~" file. I "shutdown" the VM. When I did that shutdown, the "vmx~" file (with the correct configuration) disappeared, and the "vmx" file (with the wrong configuration) was still there Thankfully, I had backed up the "vmx~" file prior to the shutdown.

       

       

      7 - I replaced the "vmx" file by the backup of the "vmx~" ("tilde") file. Howeved, even after I did that, the "Summary" tab for this VM, in the "vSphere Web Client" showed the same error message as before: "There is no network assigned to this virtual machine."

       

       

      8 - By then, I decided to "Remove from Inventory" that VM. After I did that, I went to the "Storage" view and I did a ""Register VM..." of the "vmx" file (and followed the steps of the "Wizard").

       

       

       

      After having done the steps that I mentioned above, the "Summary" tab of the virtual machine showed the "Network Adapter 1". I powered on the VM and, sure enough, the VM got back its network connectivity.

       

       

      So, what do you think about all this?

       

      Thanks in advance.

       

      Cheers,

      Ricardo Dias Marques

       

      Message was edited by: Ricardo Dias Marques (corrected the line of the "ethernet0.pciSlotNumber" for the "vmx~" file)