mkubecek / vmware-host-modules

Patches needed to build VMware (Player and Workstation) host modules against recent kernels
GNU General Public License v2.0
2.3k stars 372 forks source link

Repeated "sent link..." dmesg events #54

Closed edrozenberg closed 4 years ago

edrozenberg commented 4 years ago

In looking at dmesg I see the following messages on my server running VMWW 15.5.2. They repeat at a regular interval continuously without stopping:

[Fri Mar 20 07:05:43 2020] userif-4: sent link up event.
[Fri Mar 20 07:39:59 2020] userif-4: sent link down event.
[Fri Mar 20 07:39:59 2020] userif-4: sent link up event.
[Fri Mar 20 08:05:46 2020] userif-4: sent link down event.

Explanation and patch available at: https://fluentreports.com/blog/?p=717

The quick summary is that when the server runing VMWW uses DHCP to obtain its own IP address, each DHCP update of the server's interface causes the VMWare network interface to reset. It's why the link up/down events occur and are logged at repeating intervals.

Perhaps this patch, or something like it, could be incorporated into vmware-host-modules?

mkubecek commented 4 years ago

That doesn't sound like a good idea, some people want to mirror host's link state. Setting ethernet0.linkStatePropagation.enable (or other number, depending on the virtual interface) to FALSE should disable it.

Also, DHCP update should not result in link down event, there is something wrong with the implementation if it does.

edrozenberg commented 4 years ago

Interesting, I wasn't aware of that propagation setting - I'll try that. The patch I found anyway didn't stop the up/down messages from appearing.

For reference, found a posting that discusses this setting as well as another setting: vmnat.linkStatePropagation.disable = "TRUE" which is used in case of NAT interfaces (I'm using bridged)

Solved: Everytime my host network access changes, Fusion restarts the NAT guest networks https://communities.vmware.com/thread/453617

Thanks!

edrozenberg commented 4 years ago

None of the approaches have gotten rid of the dmesg userif-4: sent link [up | down] events on my VMW 15.5.2 servers. Will let it be for now, not causing me any apparent problems.

mmokrejs commented 2 years ago

I have same problem on my Gentoo Linux host, running occasionally VMWare Player/Workstation. It appears the Linux kernel driver from VMWare keeps re-setting the IP address even when the VMWare Player/workstation is shut down. Just the vmware kernel driver vmnet-natd needs to be loaded (well, a few more drivers are loaded but it is the one flooding my syslog). That is already enough to flood my dmesg and syslog.

Jun  2 08:09:14 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:2, addr:192.168.99.2
Jun  2 08:09:14 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:09:14 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:09:22 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.99.169
Jun  2 08:09:22 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:09:22 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:09:44 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:2, addr:192.168.99.2
Jun  2 08:09:44 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:09:44 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:09:52 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.99.169
Jun  2 08:09:52 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:09:52 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:10:14 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:2, addr:192.168.99.2
Jun  2 08:10:14 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:10:14 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:10:22 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.99.169
Jun  2 08:10:22 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:10:22 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:10:44 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:2, addr:192.168.99.2
Jun  2 08:10:44 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:10:44 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:10:52 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.99.169
Jun  2 08:10:52 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:10:52 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:11:14 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:2, addr:192.168.99.2
Jun  2 08:11:14 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:11:14 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 08:11:22 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.99.169
Jun  2 08:11:22 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 08:11:22 dell_e5580 kernel: userif-3: sent link up event.
...
Jun  2 09:20:05 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.45.222
Jun  2 09:20:05 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 09:20:05 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 09:20:35 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.45.222
Jun  2 09:20:35 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 09:20:35 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 09:21:05 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.45.222
Jun  2 09:21:05 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 09:21:05 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 09:21:35 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.45.222
Jun  2 09:21:35 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 09:21:35 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 09:22:05 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.45.222
Jun  2 09:22:05 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 09:22:05 dell_e5580 kernel: userif-3: sent link up event.
Jun  2 09:22:35 dell_e5580 vmnet-natd[29939]: RTM_NEWADDR: index:3, addr:192.168.45.222
Jun  2 09:22:35 dell_e5580 kernel: userif-3: sent link down event.
Jun  2 09:22:35 dell_e5580 kernel: userif-3: sent link up event.

When I unload the vmware-related modules it disappears.

# emerge -pv vmware-modules vmware-workstation

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-emulation/vmware-modules-16.2.3-r1::stefantalpalaru  USE="-dist-kernel" 0 KiB
[ebuild   R    ] app-emulation/vmware-workstation-16.2.3.19376536::stefantalpalaru  USE="cups doc modules ovftool vmware-tools-linux vmware-tools-winPre2k vmware-tools-winPreVista vmware-tools-windows -macos-guests -systemd -vix -vmware-tools-darwin -vmware-tools-darwinPre15 -vmware-tools-linuxPreGlibc25 -vmware-tools-netware -vmware-tools-solaris" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
anmathew commented 1 year ago

happening still in 2023:

 userif-3: sent link down event.
 userif-3: sent link up event.
 userif-3: sent link down event.
 userif-3: sent link up event.
 userif-3: sent link down event.
 userif-3: sent link up event.
 userif-3: sent link down event.

I fixed my issue by following https://fluentreports.com/blog/?p=717

  595  cd /usr/lib/vmware/modules/source
  596  ls
  597  tar -tvf vmnet.tar 
  598  tar -xvf vmnet.tar 
  vi vmnet-only/userif.c 

int
VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp)
{
   VNetUserIF *userIf;
   VNetJack *hubJack;
   VNet_LinkStateEvent event;
   int retval;

  // Add this:
   if (!linkUp) {
         return 0;
   } 
   /SNIP/ 

then,

  604  mv vmnet.tar oldvmnet.tar 
  607  tar -cvf vmnet.tar vmnet-only/ 
  608  /usr/bin/vmware-modconfig --console --install-all 
  609  systemctl restart vmware 
  610  dmesg -c

If you still see " sent link down event." in your logs; then the patch wasn't applied properly.

Now all I see are the link up events, no down events:

 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
 userif-3: sent link up event.
KhaleelPortz commented 3 months ago

when we use outline vpn ,it will appear the mesage "sent link up event"