Skip to content
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

workstation 17.5.1 make failed when using RHEL with kernel version: 5.14.0-427.13.1.el9_4.x86_64 #244

Open
Paperside opened this issue May 2, 2024 · 20 comments

Comments

@Paperside
Copy link

Briefly speaking, you may do following things to fix the problem:

Find the following part in ./vmmon-only/include/pgtbl.h and ./vmnet-only/bridge.c then modify them as follows:

  • pgtbl.h
...
 91#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
 92             pte_t *pte = pte_offset_kernel(pmd, addr);
 93 #else
 94             pte_t *pte = pte_offset_map(pmd, addr);
 95 #endif
...

line 94: replace pte_offset_map with pte_offset_kernel to make kernel version check invalid

 94             pte_t *pte = pte_offset_kernel(pmd, addr);
  • bridge.c
...
  28
  29 #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10)
  30 #include <net/gso.h>
  31 #endif
...

line 28: add #include <net/gso.h> so that net/gso.h will be included anyway

  28 #include <net/gso.h>

Hopefully that may solve the problems!

The Following part is my analysing experience:

VMWare workstation cannot automatically install vmmon and vmnet modules with error logs like this:

2024-05-02T04:02:14.437Z In(05) host-6681 ERROR: modpost: "__pte_offset_map" [/tmp/modconfig-HY9acv/vmmon-only/vmmon.ko] undefined!
2024-05-02T04:02:14.437Z In(05) host-6681 make[2]: *** [scripts/Makefile.modpost:134: /tmp/modconfig-HY9acv/vmmon-only/Module.symvers] Error 1
2024-05-02T04:02:14.437Z In(05) host-6681 make[2]: *** Deleting file '/tmp/modconfig-HY9acv/vmmon-only/Module.symvers'
2024-05-02T04:02:14.437Z In(05) host-6681 make[1]: *** [Makefile:1848: modules] Error 2
2024-05-02T04:02:14.437Z In(05) host-6681 make: *** [Makefile:117: vmmon.ko] Error 2
2024-05-02T04:02:14.437Z In(05) host-6681 Using kernel build system.
2024-05-02T04:02:14.437Z In(05) host-6681 /tmp/modconfig-HY9acv/vmnet-only/bridge.c: In function ‘VNetBridgeSendLargePacket’:
2024-05-02T04:02:14.437Z In(05) host-6681 /tmp/modconfig-HY9acv/vmnet-only/bridge.c:1416:11: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘tcp_gso_segment’? [-Werror=implicit-function-declaration]
2024-05-02T04:02:14.437Z In(05) host-6681  1416 |    segs = skb_gso_segment(skb, 0);
2024-05-02T04:02:14.437Z In(05) host-6681       |           ^~~~~~~~~~~~~~~
2024-05-02T04:02:14.437Z In(05) host-6681       |           tcp_gso_segment
2024-05-02T04:02:14.437Z In(05) host-6681 /tmp/modconfig-HY9acv/vmnet-only/bridge.c:1416:9: warning: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
2024-05-02T04:02:14.437Z In(05) host-6681  1416 |    segs = skb_gso_segment(skb, 0);
2024-05-02T04:02:14.437Z In(05) host-6681       |         ^
2024-05-02T04:02:14.437Z In(05) host-6681 cc1: some warnings being treated as errors
2024-05-02T04:02:14.437Z In(05) host-6681 make[2]: *** [scripts/Makefile.build:299: /tmp/modconfig-HY9acv/vmnet-only/bridge.o] Error 1
2024-05-02T04:02:14.437Z In(05) host-6681 make[2]: *** Waiting for unfinished jobs....
2024-05-02T04:02:14.437Z In(05) host-6681 make[1]: *** [Makefile:1934: /tmp/modconfig-HY9acv/vmnet-only] Error 2

Thus I cloned this git repo to mannually compile and install vmmon and vmnet. But when I switched to the correct branch and began to make, the same error occurs:

ERROR: modpost: "__pte_offset_map" [/root/Downloads/vmware-host-modules/vmmon-only/vmmon.ko] undefined!
make[3]: *** [scripts/Makefile.modpost:134: /root/Downloads/vmware-host-modules/vmmon-only/Module.symvers] Error 1
make[3]: *** Deleting file '/root/Downloads/vmware-host-modules/vmmon-only/Module.symvers'
make[2]: *** [Makefile:1848: modules] Error 2
make[2]: Leaving directory '/usr/src/kernels/5.14.0-427.13.1.el9_4.x86_64'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/root/Downloads/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2
/root/Downloads/vmware-host-modules/vmnet-only/bridge.c: In function ‘VNetBridgeSendLargePacket’:
/root/Downloads/vmware-host-modules/vmnet-only/bridge.c:1418:11: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘tcp_gso_segment’? [-Werror=implicit-function-declaration]
 1418 |    segs = skb_gso_segment(skb, 0);
      |           ^~~~~~~~~~~~~~~
      |           tcp_gso_segment
/root/Downloads/vmware-host-modules/vmnet-only/bridge.c:1418:9: warning: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1418 |    segs = skb_gso_segment(skb, 0);
      |         ^
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:299: /root/Downloads/vmware-host-modules/vmnet-only/bridge.o] Error 1
make[2]: *** [Makefile:1934: /root/Downloads/vmware-host-modules/vmnet-only] Error 2
make[2]: Leaving directory '/usr/src/kernels/5.14.0-427.13.1.el9_4.x86_64'
make[1]: *** [Makefile:117: vmnet.ko] Error 2
make[1]: Leaving directory '/root/Downloads/vmware-host-modules/vmnet-only'
make: *** [Makefile:21: vmnet-only] Error 2

Eventually I checked ./vmmon-only/include/pgtbl.h and ./vmnet-only/bridge.c then found out why:
Linux branches like RHEL CentOS and Fedora have different linux kernel version name definition compare to other branches like Ubuntu, who uses standard linux kernel version name instead. If you execute uname -r to get kernel version in ubuntu 22.04, you are likely to get this :

6.5.0-28-generic

But when you run that in RHEL9 or CentOS 9 Stream...You will get this:

5.14.0-427.13.1.el9_4.x86_64

RHEL 9 actually have a newer kernel but its version is even lower!

Now let's check out what is in ./vmmon-only/include/pgtbl.h and ./vmnet-only/bridge.c :

  • pgtbl.h
...
 91#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
 92             pte_t *pte = pte_offset_kernel(pmd, addr);
 93 #else
 94             pte_t *pte = pte_offset_map(pmd, addr);
 95 #endif
...
  • bridge.c
...
  29 #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10)
  30 #include <net/gso.h>
  31 #endif
...

Have you figured out where the problem lies in? That's exactly: Your linux kernel version(5.14.0) is probably misjudjed as "OUT OF DATE(>=6.5.0|>=6.4.10)" in the two files. But that's not true.
Now that we have known the possible reason, it's comparatively easy to fix them up though the way may not be very elegant, just edit the two files like this:

  • pgtbl.h
...
 91#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
 92             pte_t *pte = pte_offset_kernel(pmd, addr);
 93 #else
 94             pte_t *pte = pte_offset_kernel(pmd, addr);//replace "pte_offset_map" with "pte_offset_kernel" to make kernel version check invalid
 95 #endif
...
  • bridge.c
...
  28 #include <net/gso.h> //add this line so that net/gso.h will be included anyway
  29 #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10)
  30 #include <net/gso.h>
  31 #endif
...

I have no idea about whether there are still other files have similar problems, but I installed vmmon and vmnet successfully after fixed up only both of the two files.

@mkubecek
Copy link
Owner

mkubecek commented May 2, 2024

Please don't suggest the pte_offset_kernel() hack that has been known to be broken for quite some time.

@Paperside
Copy link
Author

Paperside commented May 2, 2024

One more thing

Since the vmmon and vmnet are embbed in the kernel as kernel modules, and the solution above actually hacked original code of both modules, their secure signature will be be invalid and they will be prevented if the Secure Boot option is enabled in your computer.

More specific, the two modules will be installed into /lib/modules/<dir_named_with_your_current_kernel_version>/misc/ as vmmon.ko and vmnet.ko .

You can use following command to get the current Secure Boot status of your computer:

mokutil --sb-state

And the output is like:

SecureBoot enabled

If you try to load them mannually:

insmod vmmon.so
insmod vmnet.so
dmesg

Then you are likely to see something like this:

insmod: ERROR: could not insert module vmmon.ko: Key was rejected by service
insmod: ERROR: could not insert module vmnet.ko: Key was rejected by service
...
ERROR: could not insert module: Key was rejected by service

which means the module have a key but that is invalid.

The most convenient way to avoid this problem is just disabling Secure Boot in your computer’s UEFI Setup(BIOS).

Or, you can also look for other ways to get rid of this side effect, such as sign them mannually.

@Paperside
Copy link
Author

Please don't suggest the pte_offset_kernel() hack that has been known to be broken for quite some time.

Sorry, I have no idea about this before and I didn't find out any related infomation. Hacking pte_offset_kernel() should not be recommended indeed if it will get broken from time to time. I would appreciate it if you can offer me some ways to learn more about the bug.

@GlacierFox
Copy link

Same problem here. Updated to RHEL 9.4 and can't get the bundle to install either of the modules. I'll hold off on trying your hack incase some other more robust solution comes up...

@SysAdminShed
Copy link

@mkubecek tried the solution recommended at top of rebuilding vmmon and vmnet, no joy, with or without Secure Boot enabled.

I'm available to test with some guidance to make Workstation 17.5.2 or 17.5.1.

Tried to reached out to Broadcom / VMware support and the answer was, reach out to RHEL / or any EL9 distro to resolve this.

Thanks in advance,

@Legends0
Copy link

Legends0 commented Jun 6, 2024

Simply adjusting the preprocessor definitions to include RHEL 9.4+ as part of the list of kernels to accept for the newer kernel definitions resolved it for me.

In vmmon-only/include/pgtbl.h:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)

In vmnet-only/bridge.c:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)

@MeatBunny
Copy link

Simply adjusting the preprocessor definitions to include RHEL 9.4+ as part of the list of kernels to accept for the newer kernel definitions resolved it for me.

In vmmon-only/include/pgtbl.h: #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)

In vmnet-only/bridge.c: #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)

For those of us without experience in C, where exactly do we put this? Thanks!

@Legends0
Copy link

Legends0 commented Jun 6, 2024

For those of us without experience in C, where exactly do we put this? Thanks!

It's in the same locations that @Paperside is referencing:
Line 91 in vmmon-only/include/pgtbl.h:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)
                 pte_t *pte = pte_offset_kernel(pmd, addr);
#else
                 pte_t *pte = pte_offset_map(pmd, addr);
#endif

Line 29 in vmnet-only/bridge.c:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)
#include <net/gso.h>
#endif

@alanbaugher
Copy link

alanbaugher commented Jun 13, 2024

Positive feedback on this process in this ticket with RHEL 9.4 OS

Two (2) challenges:

  1. Minor - Fresh install of RHEL 9.4 had missing kernel-headers and kernel-devel via official RHEL repos. These had to be downloaded & applied via a RHEL security advisory. https://access.redhat.com/errata/RHSA-2024:2394

$ rpm -qa kernel*
kernel-tools-libs-5.14.0-427.13.1.el9_4.x86_64
kernel-modules-core-5.14.0-427.13.1.el9_4.x86_64
kernel-core-5.14.0-427.13.1.el9_4.x86_64
kernel-modules-5.14.0-427.13.1.el9_4.x86_64
kernel-tools-5.14.0-427.13.1.el9_4.x86_64
kernel-5.14.0-427.13.1.el9_4.x86_64
kernel-srpm-macros-1.0-13.el9.noarch

  1. Typical error from sudo vmware-modconfig --console --install-all

[AppLoader] GLib does not have GSettings support.
(process:95861): GLib-CRITICAL **: 12:43:01.941: g_file_test: assertion 'filename != NULL' failed

Resolution:

Used the steps mentioned above by @Legends0 and others, with @mkubecek git repo for 7.5.1.

I can confirm this process worked for both VMware Workstation Pro 7.5.1 (with license) and 7.5.2 (personal edition from Broadcom) on RHEL 9.4 5.14.0-427.13.1.el9_4.x86_64

Supporting details below for validation

$ systemctl status vmware.service
● vmware.service - VMware host virtualization and network services for Workstation
Loaded: loaded (/usr/lib/systemd/system/vmware.service; enabled; preset: disabled)
Active: active (running) since Thu 2024-06-13 17:40:34 CDT; 16min ago
Process: 151074 ExecStart=/usr/lib/vmware/scripts/init/vmware start (code=exited, status=0/SUCCESS)
Tasks: 6 (limit: 3296082)
Memory: 3.4M
CPU: 152ms
CGroup: /system.slice/vmware.service
├─151134 /usr/bin/vmnet-netifup -s 6 -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
├─151140 /usr/bin/vmnet-dhcpd -s 6 -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vm>
├─151144 /usr/bin/vmnet-natd -s 6 -m /etc/vmware/vmnet8/nat.mac -c /etc/vmware/vmnet8/nat/nat.conf
├─151146 /usr/bin/vmnet-netifup -s 6 -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
├─151149 /usr/bin/vmnet-dhcpd -s 6 -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vm>
└─151166 /usr/sbin/vmware-authdlauncher

$ vmware --version
VMware Workstation 17.5.2 build-23775571

$ uname -a
Linux hostname.here 5.14.0-427.13.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 10 10:29:16 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux

$ sudo /usr/bin/vmware-networks --stop ; sudo /usr/bin/vmware-networks --verbose --start
Stopped Bridged networking on vmnet0
Stopped DHCP service on vmnet1
Disabled hostonly virtual adapter on vmnet1
Stopped DHCP service on vmnet8
Stopped NAT service on vmnet8
Disabled hostonly virtual adapter on vmnet8
Stopped all configured services on all networks
Commands specified: start
Features configured on vmnet0 are: Bridge
Started Bridge networking on vmnet0
Features configured on vmnet1 are: subnet DHCP HostOnlyAdapter
Creating thread #: 0 to ping subnet on vmnet1
Checking availability of subnet configured for vmnet1
Features configured on vmnet8 are: subnet DHCP NAT HostOnlyAdapter
Creating thread #: 1 to ping subnet on vmnet8
Checking availability of subnet configured for vmnet8
Subnet configured for vmnet1 is available
Subnet configured for vmnet8 is available
Checking if services on vmnet1 can be started, thread #0
Enabled hostonly virtual adapter on vmnet1
Started DHCP service on vmnet1
Finished processing thread #0 on vmnet1
Checking if services on vmnet8 can be started, thread #1
Started NAT service on vmnet8
Enabled hostonly virtual adapter on vmnet8
Started DHCP service on vmnet8
Finished processing thread #1 on vmnet8
Started all configured services on all networks

Follow up

Related to RHEL 9.4 glibc library. The 'ovftool' CLI and VMware Workstation UI OVA import require a deprecated library, libnsl. The UI did not report an error message, but the 'ovftool' CLI did. Used 'strace -e openat ovftool' to confirm.

Per RHEL, this is known issue with glibc: https://access.redhat.com/solutions/4975641

Added libnsl to the OS: dnf install -y libnsl and can report no import issue.

@habig
Copy link

habig commented Jun 24, 2024

Related, I think. alma linux 9.4, but with Workstation 16.2.5:

LD [M] /localhome/habig/vmware/vmware-host-modules/vmmon-only/vmmon.o
MODPOST /localhome/habig/vmware/vmware-host-modules/vmmon-only/Module.symvers
ERROR: modpost: "__pte_offset_map" [/localhome/habig/vmware/vmware-host-modules/vmmon-only/vmmon.ko] undefined!

Tried jamming the RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4) cpp directives in there as suggested above, no luck.

Also just discovered that Broadcom's vmware support is currently totally fubar at the moment so I can't get into vmware to re-download their tarballs. Not that I have any optimism that it's fixed upstream, but thought it was worth a try.

@alanbaugher
Copy link

@habig

If you can't access the Broadcom site, another option is to follow the help/update link provided in the VMware Workstation UI.

Broadcom has the "core" release of VMware Workstation available as a public download. These included the newer public license versions.

If you use wget or curl, you can access these directly to your Linux box instead of using your Broadcom account to access the "full" release with the "vmware tools" built-in. You can also use a browser to the links to get the "vmware-tools" tar files as well.

Example(s): Broadcom/Vmware software update URLs for "core" workstation of VMworkstation 17.5.2 for both Linux/Win.

wget https://softwareupdate.vmware.com/cds/vmw-desktop/ws/17.5.2/23775571/linux/core/VMware-Workstation-17.5.2-23775571.x86_64.bundle.tar

wget https://softwareupdate.vmware.com/cds/vmw-desktop/ws/17.5.2/23775571/windows/core/VMware-workstation-17.5.2-23775571.exe.tar

Side note: One minor gotcha that I found was within the VMware UI logs (/tmp/vmware-USERNAME): older VMware images built with earlier releases need to be updated to version 17 to access the "heartbeat" checks. Otherwise, the VMware-UI logs will grow quite a bit.

@kidkaos32
Copy link

Hi everyone,

So found this post while trying to fix the vmmon vmnet module compile issue. The solution from Legends0 worked fine until this evening when I was trying to install the CORE network emulator and had to install updates for RHEL 9.4 and now VMWare 17.5.1 workstation is broken again, and the previous solution doesn't work anymore. So how do I fix the compile error this time, or should I just give up on running VMWare workstation on RHEL? If I have to give up vmware what is solid stable replacement. If vmware is the best game in town, how do I learn to troubleshoot and fix this issue. This really irritating because every time I make progress setting up my vm lab this happens and it's three weeks before I getting it working again

TNX
Folks

@habig
Copy link

habig commented Jul 3, 2024

@alanbaugher , thanks! I'd avoided upgraded to v17 because VMWare support was almost actively hostile when I had some problems with my v16, the features I was asking about (headless workstation instances) were depreciated and being removed anyway so they wouldn't help me make them work in the version that had them. So, didn't want to send them money for the upgrade to just get functionality removed :)

However, in the interest of seeing what I could make work, I grabbed that 17.5.2 bundle as suggested. This repo knows about 17.5.1 and not .2 yet, but OK, let's see where can I get.

The answer is even with the latest 17.5.1 branch from here, the same build problem with

ERROR: modpost: "__pte_offset_map" [/localhome/habig/vmware/new/vmware-host-modules-workstation-17.5.1/vmmon-only/vmmon.ko] undefined!

Like @kidkaos32, I might be better served finding a vmware alternative at this point. A shame, been using vmware more or less since they became a thing, but there have to be open source alternatives that do the job these days.

@3nkl1
Copy link

3nkl1 commented Jul 12, 2024

I am on Rocky linux 9.4 and I had workstation 16.2.4 woking.. AS per kernel version 17 is not supported. No with update of kernel
I cannot compile anymore..
I am trying with 16.2.5. Bridge.c works for me with that modification but not ptgbl.h does not work..
It does not have those lines mentioned above...

@habig
Copy link

habig commented Jul 12, 2024

A workaround that meets my use case, which is primarily having a windows VM around for things like Acrobat:

I installed VirtualBox from the repos with dnf. Installed a fresh copy of windows (there are apparently ways to import a VMWare image, but I didn't have anything on there that needed saving anyway). And tried it out. It works way better these days than it first did way back when.

So far, only thing so far that I like VMWare better for is a better selection of screen resolutions. But there's one setting in VirtualBox that's OK enough to use, so good enough.

VirtualBox also seems snappier performancewise, although the "shiny new windows install hasn't unravelled yet" effect could be in play. VMWare Workstation had gotten awful after upgrading from SL7 to Alma9 though, even with a fresh windows install. Eventually found that having the virtual disk not think it needed to go into powersaving mode made a huge difference, but it was still pretty laggy compared to what it used to be.

I don't think VirtualBox supports headless VMs, but neither does VMWare Workstation anymore anyway.

So, my immediate need for a Windows VM is satisfied. I'll keep the VMWare images around in case debugging is needed to see if it can eventually be made to work again, but will eventually free up their GB. Won't need to send anymore money VMWare^h^h^h^h^h^hBroadcomm's way, which is nice. Will feel sad that software I'd used for decades doesn't work anymore.

@alanbaugher
Copy link

alanbaugher commented Jul 15, 2024

@habig

Hope you have better luck or Broadcom updates their embedded features for RHEL type OSes.

I saw your comment about headless features with VMware workstation and wanted to share my experience.

When my primary host restarts, I start the VMware images with several automation processes.

To expand on the default host-only networking with vmware workstation, I used a vyos software router, and have built a systemd process to autostart it.

cat vyosauto.service

# Auto Start Vyos Router on Vmware Image
# To add this service:
# sudo setenforce 0
# sudo systemctl enable /tmp/vyos.service
# sudo systemctl start       vyos.service
# sudo systemctl status      vyos.service
# sudo setenforce 1

[Unit]
Description=Vyos Software Router Auto ReStart
After=vmware.service

[Service]
Type=forking
User=me
ExecStartPre=+/usr/bin/chown -R me /vmware/vyos-1.2.9-S1
ExecStart=/usr/bin/vmrun -T ws start /vmware/vyos-1.2.9-S1/vyos-1.2.9-S1.vmx nogui -nowait
Restart=always
RestartSec=60
ExecStop=/usr/bin/vmrun -T ws stop /vmware/vyos-1.2.9-S1/vyos-1.2.9-S1.vmx nogui -nowait

[Install]
WantedBy=multi-user.target

I have used VMware workstation for both Kubernetes and OpenShift deployments, using the headless features. I haven't seen a change in release 17 yet to prevent me from still using these features.

Examples of some additional useful commands:

  • To list all running vmware workstation images & sort them.
    alias v="vmrun -T ws list | (sed -u 1q; sort)"

  • After starting the headless image, get the IP address (if not static) that was granted.
    alias vip1="time vmrun -T ws getGuestIPAddress ${VYOS_HOME}/vyos.vmx -wait "

@alanbaugher
Copy link

alanbaugher commented Jul 15, 2024

I am enclosing all the steps to resolve this issue for a fresh install of the RHEL 9.4 OS.

Observations:

  1. Fresh install of RHEL 9.4 (uname -a)

Linux hostname.here 5.14.0-427.13.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 10 10:29:16 EDT 2024 x86_64 x86_64 x86_64 GNU/Linu

  1. Install of the latest VMware workstation had no initial issues
sudo ./VMware-Workstation-Full-17.5.1-23298084.x86_64.bundle

3a) Attempted to update VMware mods with post-step but had a first minor issue.

sudo vmware-modconfig --console --install-all

[AppLoader] Use shipped PC/SC Lite smart card framework.
An up-to-date "pcsc-lite-libs" or "libpcsclite1" package from your system is preferred.
[AppLoader] GLib does not have GSettings support.
Failed to get gcc information.

3b) Install requested components on RHEL 9.4 OS

sudo dnf -y install pcsc-lite-libs
sudo dnf -y install gcc
  1. I attempted to update VMware mods with post-step but had a second issue that had a significant impact.
sudo vmware-modconfig --console --install-all

[AppLoader] GLib does not have GSettings support.
(process:95861): GLib-CRITICAL **: 12:43:01.941: g_file_test: assertion 'filename != NULL' failed

  1. Research indicated I had two missing kernel packages.
    The default RHEL 9.4 repo did not install or allow installation of kernel-headers nor kernel-devel
rpm -qa kernel*

kernel-tools-libs-5.14.0-427.13.1.el9_4.x86_64
kernel-modules-core-5.14.0-427.13.1.el9_4.x86_64
kernel-core-5.14.0-427.13.1.el9_4.x86_64
kernel-modules-5.14.0-427.13.1.el9_4.x86_64
kernel-tools-5.14.0-427.13.1.el9_4.x86_64
kernel-5.14.0-427.13.1.el9_4.x86_64
kernel-srpm-macros-1.0-13.el9.noarch

yum list kernel-devel-$(uname -r)
yum list kernel-headers-$(uname -r)
  1. These packages need to be downloaded & installed via the RHEL security advisory page:
    Ref. https://access.redhat.com/errata/RHSA-2024:2394
sudo rpm -ivh /os-patches/kernel-headers-5.14.0-427.13.1.el9_4.x86_64.rpm
sudo dnf -y install elfutils-libelf-devel
sudo dnf -y install openssl-devel
sudo rpm -ivh /os-patches/kernel-devel-5.14.0-427.13.1.el9_4.x86_64.rpm
  1. Validate that "secure boot" was not enabled & not the root issue. This was mentioned as a possible root cause.
    Ref. https://access.redhat.com/articles/5337691
mokutil --sb-state
  1. Used information provided by https://github.com/mkubecek/vmware-host-modules
    & ticket: workstation 17.5.1 make failed when using RHEL with kernel version: 5.14.0-427.13.1.el9_4.x86_64 #244

8a) Download the git repo and checkout git that matches the current VMware workstation release.
Note: 17.5.2 did not exist at this time, so I checked-out the 17.5.1 version as a test.

mkdir vmware-module-git ; cd vmware-module-git
git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules/
vmware --version
git checkout workstation-17.5.1

8b) STOP and edit two (2) files:
Ref: #244

cd vmmon-only/include/
cp -r -p pgtbl.h pgtbl.h.prior.20240612

vi pgtbl.h 

and change this line from:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
to:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,10) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)

cd vmnet-only/
cp -r -p bridge.c bridge.c.prior.20240612

vi bridge.c 

and change this line from:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10)
to:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 4)

8c) Continue with the "make" process for the two modules

sudo make clean
make
sudo make install
sudo systemctl restart vmware.service
sudo systemctl status vmware.service
  1. Validate that the VMware workstation is working and that it is able to access networking features.

Able to enter license into the VMware Workstation UI and continue with access. (used the RHEL GUI to access this UI)

  1. IMPORTANT SIDE NOTE: Do NOT run the vmware-modconfig as it will still fail.
    {Otherwise, we will have to repeat steps 8a-8c}
    [With strace -e openat process, we can see Broadcom creates a /tmp/XXXXX folder to execute their embedded process, then immediately remove this folder, when running vmware-modconfig]
sudo vmware-modconfig --console --install-all
  1. Follow up: OVF import failed. Needed a deprecated library to be installed on RHEL 9.x

This is related to the RHEL 9.4 glibc library. The 'ovftool' CLI and VMware Workstation UI OVA import require the deprecated library libnsl. The VMware UI did not report an error message during import of a OVA file, but the 'ovftool' CLI did.

I used 'strace -e openat ovftool' to confirm the missing library file.

Per RHEL, this is a known issue with glibc: https://access.redhat.com/solutions/4975641

Added libnsl to the OS:

dnf install -y libnsl

and can report no import issue with VMware-Workstation-Full-17.

Hopefully, these steps will help others.



If we look at RHEL tech note: https://access.redhat.com/solutions/37608

We can see information supporting the OR statement's use in the above workaround with RHEL_RELEASE_VERSION string why it is needed, as the KERNEL_VERSION string would not match the IF statement.

[root@labs /]# cat /usr/include/linux/version.h
#define LINUX_VERSION_CODE 331264
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
#define LINUX_VERSION_MAJOR 5
#define LINUX_VERSION_PATCHLEVEL 14
#define LINUX_VERSION_SUBLEVEL 0
#define RHEL_MAJOR 9
#define RHEL_MINOR 4
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
#define RHEL_RELEASE_CODE 2308
#define RHEL_RELEASE "427.13.1"

@habig
Copy link

habig commented Jul 22, 2024

Thank you @alanbaugher for the headless suggestions. I was going on my experiences with filing a support ticket with problems doing headless with Workstation. The VMWare support people refused to help me with it on the excuse that it was depreciated anyway, I shouldn't be using it, and should go buy the expensive datacenter version instead of the Workstation which was still allegedly under support.

I'll try backporting your current version fixes to see if I can get 16.2.5 to compile on alma9, but won't be sending good money after bad to upgrade to v17 first :(

@SysAdminShed
Copy link

@habig Just so you know I have VMware Enterprise support 24/7 support contract and I've been in a fight with them regarding this for months now.

They just agreed on the ticket that this is an issue and that it should be corrected to be installed and working correctly with either 17.5.1 or 17.5.2 under 9.4.

I'll update once I have a final answer with fix.

@kluivertmv
Copy link

Hi everyone, Can You help me guys?
I've been facing the same problem so I need a solution to compile vmware-host-modules on Centos 9 so I'm using the kernel version "5.14.0-480.el9.x86_64" and VMware version "17.5.2.23775571".When I try to compile the kernel I got the error message just below:

ERROR: modpost: "__pte_offset_map" [/home/marcos/drives_compilados_kernel/vmware-host-modules-workstation-17.5.2-k6.9-/vmmon-only/vmmon.ko] undefined!
make[3]: *** [scripts/Makefile.modpost:133: /home/marcos/drives_compilados_kernel/vmware-host-modules-workstation-17.5.2-k6.9-/vmmon-only/Module.symvers] Erro 1
make[2]: *** [Makefile:1858: modules] Erro 2
make[2]: Saindo do diretório '/usr/src/kernels/5.14.0-480.el9.x86_64'

make[1]: *** [Makefile:117: vmmon.ko] Erro 2
make[1]: Saindo do diretório '/home/marcos/drives_compilados_kernel/vmware-host-modules-workstation-17.5.2-k6.9-/vmmon-only'

make: *** [Makefile:21: vmmon-only] Erro 2

...

When I try the second method I got the error message after the command "sudo vmware-modconfig --console --install-all":

...

-declaration]
1444 | segs = skb_gso_segment(skb, 0);
| ^~~~~~~~~~~~~~~
| tcp_gso_segment
/tmp/modconfig-LKllVe/vmnet-only/bridge.c:1444:9: warning: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1444 | segs = skb_gso_segment(skb, 0);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /tmp/modconfig-LKllVe/vmnet-only/bridge.o] Erro 1
make[1]: *** [Makefile:1944: /tmp/modconfig-LKllVe/vmnet-only] Erro 2
make[1]: Saindo do diretório '/usr/src/kernels/5.14.0-480.el9.x86_64'

make: *** [Makefile:117: vmnet.ko] Erro 2
make: Saindo do diretório '/tmp/modconfig-LKllVe/vmnet-only'

Unable to install all modules. See log for details.

....

Any solution?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests