Skip to content

extend vmware-tools/tools.conf #1738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
[logging]
## Disables core dumps on fatal errors; they're enabled by default.
enableCoreDump = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would suggest to keep the default rather than override this. If you need customizations, would suggest to do that in local CI environments rather than setting here.

## Setup file rotation - keep 3 files
vmsvc.maxOldLogFiles = 3
## Max log file size kept: 1 MB
vmsvc.maxLogSize = 1

[guestinfo]
exclude-nics=antrea-*,cali*,cilium*,lxc*,ovs-system,br*,flannel*,veth*,vxlan_sys_*,genev_sys_*,gre_sys_*,stt_sys_*,????????-??????
## This configuration ensures that any address in the interfaces matching en* is sorted on top of the list of IP addresses.
primary-nics=en*

## The configuration will exclude all interfaces with the names matching the patterns specified from GuestInfo.
exclude-nics=antrea-*,br*,cali*,cbr*,cilium*,cni*,docker*,dummy*,flannel*,genev_sys_*,gre_sys_*,kube-ipvs*,lo,lxc*,nodelocaldns*,ovs-system,stt_sys_*,tunl*,veth*,virbr*,vxlan_sys_*,wg*,????????-??????

## https://github.com/vmware/open-vm-tools/commit/065f09b94e09f1127901db29e73cc9b9f36df4fc
# max-ipv4-routes: Max IPv4 routes to gather. Set 0 to disable gathering.
# max-ipv6-routes: Max IPv6 routes to gather. Set 0 to disable gathering.
max-ipv4-routes=0
max-ipv6-routes=0
Comment on lines +1 to +20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what the default values are for these variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as i can see in the source: (https://github.com/vmware/open-vm-tools.git)

  • enableCoreDump = true (-> lib/include/vmware/tools/log.h)

  • maxOldLogFiles = 10 ( -> lib/include/vmware/tools/log.h, scripts/linux/network for each of vmware-network, vmware-vmsvc, and vmware-vmtoolsd logs)

  • primary-nics = (empty)

    • from man (7) systemd.net-naming-scheme
      Prefix | Description
      en | Ethernet
      ib | InfiniBand
      sl | Serial line IP (slip)
      wl | Wireless local area network (WLAN)

Perhaps InfiniBand is also used with pci passthrough but I can't imagine something like this is practical on vSphere with many k8s nodes

  • exclude-nics = empty (I extended it with nics I found on our systems)

  • max-ipv4-routes = no restriction

  • max-ipv6-routes = no restriction

    • however only the first 100 IPv4 + IPv6 will be placed into the VM metadata, We had some issued with high CPU without this setting in the past

Maybe someone from tthe capv devs (VMware / Broadcom) has better insights to tune this settings ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like
enableCoreDump = true (-> lib/include/vmware/tools/log.h)
could be set to default and you can toggle it in your builds.

The ones regarding max-ipv4/6-routes, I'm not sure what the implications of this would be. I do not know if NSX-T is looking for this information in some way. I understand that when large number of routes are present it causes high cpu issues. But what about the other cases when it can handle it.

After reading this

Added two switches "max-ipv4-routes" and "max-ipv6-routes"
(NICINFO_MAX_ROUTES by default) in tools.conf and let SlashProcNet_GetRoute*()
only read the first max ipv4/6 routes lines of /proc/net/[ipv6_]route to avoid
performance problem. 

I'm understanding that if it was set to say 100, then the cpu problem since they are now only reading the first 100 lines. Maybe that can be a solution instead of turning it off
What do you think?

Regarding other variable, I think the changes look good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like
enableCoreDump = true (-> lib/include/vmware/tools/log.h)
could be set to default and you can toggle it in your builds.

do you think here about a jinja2 template, with an additional var?

The ones regarding max-ipv4/6-routes, I'm not sure what the implications of this would be. I do not know if NSX-T is looking for this information in some way. I understand that when large number of routes are present it causes high cpu issues. But what about the other cases when it can handle it.

Hm, sure I haven't thought about NSX-T

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think here about a jinja2 template, with an additional var?
Yeah that would be the way.