VMware Cloud Community
ricmarques
Enthusiast
Enthusiast

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

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 :smileyalert: 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)

Ricardo Dias Marques - http://twitter.com/ricmarques
Tags (2)
Reply
0 Kudos
3 Replies
BenDailey
Contributor
Contributor

Ricardo,


Did you ever come up with an explanation for this? Have you seen it occur again? Thanks.

Reply
0 Kudos
ShaneMann
Contributor
Contributor

Hi Ricardo,

We have seen this twice now on a vCenter controlled cluster. CPU of the VM goes to 100%, reboot VM, VM comes back up with no Network Adapter.

Interestingly we just go to the settings of the VM (via vSphere client) and add a new network adapter, connect it to the original virtual switch and it comes back - with all original configuration in-tact.

No idea why it gets removed from the VM in the first place, quite frustrating.

Forgot to add - this is on VMWare 5.5 and Windows 2003 32bit VM as well.

Regards,

Shane

Reply
0 Kudos
Mallik7
Enthusiast
Enthusiast

Its interesting. I see a this is a old post / query. In fact, I also similar issue few days ago. But, no clue from the logs or even OS side. I found few other articles or posts on this issue. But, the below one is similar to my issue. You can check this too - https://bit.ly/2VdjR2A

Reply
0 Kudos