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

vmnet build fails for CentOS stream kernel 5.14.0-437.el9.x86_64 in branch workstation-17.5.1 #241

Open
dnadle opened this issue Apr 18, 2024 · 3 comments · May be fixed by #294
Open

vmnet build fails for CentOS stream kernel 5.14.0-437.el9.x86_64 in branch workstation-17.5.1 #241

dnadle opened this issue Apr 18, 2024 · 3 comments · May be fixed by #294

Comments

@dnadle
Copy link

dnadle commented Apr 18, 2024

I updated my system to kernel 5.14.0-437 and make fails with an error that seems to be a recurrence of a problem that has been fixed in the past:

make[2]: Entering directory '/usr/src/kernels/5.14.0-437.el9.x86_64'
MODPOST /[redacted]/repos/vmware-host-modules/vmnet-only/Module.symvers
ERROR: modpost: "csum_and_copy_to_user" [/[redacted]/repos/vmware-host-modules/vmnet-only/vmnet.ko] undefined!

I searched and saw results similar to this affecting Workstation 16.x but couldn't find a relevant patch or code edit that would help. Any tips would be appreciated.

@iangosling89
Copy link

iangosling89 commented Apr 19, 2024

I've also seen this, on 5.14.0-435.el9 and the 17.5.0 branch. The root cause is that csum_and_copy_to_user has been removed from Module.symvers.

These Redhat kernels appear to contain a lot of backports from kernel 6. Hence to get the vmware_host_modules code to compile I've implemented a quick and dirty patch to replace or add to the "#if kernel >= 6.x" type of compilation conditions with something like "#if kernel == 5.14.0".

In this case a patch is needed to vmnet-only/userif.c.

@dnadle
Copy link
Author

dnadle commented May 6, 2024

something like "#if kernel == 5.14.0".

This was still a problem after upgrading to kernel 5.14.0-444.el9.x86_64 so, similar to iangosling89, I edited vmnet-only/userif.c line 549:

#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) /* was (5, 19, 0) */

@syslogic
Copy link

syslogic commented Dec 26, 2024

Despite it builds alike this, it will ultimately fail when starting a VM:

Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.

Failed to initialize monitor device.

Unable to change virtual machine power state: Transport (VMDB) error -14: Pipe connection has been broken.

Which means that not only module vmnet, but likely also vmmon seems to be affected.


@mkubecek This appears to be partially related to vmlinux.

Skipping BTF generation for vmware-host-modules/vmmon-only/vmmon.ko due to unavailability of vmlinux

A sane build environment can be provided with:

sudo dnf install dwarves
sudo cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/build/

Then it builds without errors, but the vmmon module will not be inserted into the kernel, for some reason. Also not the vmnet module, as it turned out later, once being able to boot. This can be fixed by manually inserting them:

sudo insmod vmnet-only/vmnet.ko
sudo insmod vmmon-only/vmmon.ko

Beside that. this PR has all changes required to build on current Rocky Linux 9.5 and start a VM: fd37b30

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

Successfully merging a pull request may close this issue.

3 participants