Skipping BTF generation xxx. due to unavailability of vmlunux on ubuntu 21.04 generic version

OK, this is sort of the answer.

Previously a start of any Virtual Machine under my Ubuntu 21.10 failed. The problem from VMWare's perspective was

Could not open /dev/vmmon: No such file or directory.

Please make sure that the kernel module `vmmon' is loaded.

(and vmnet also)

This command: sudo vmware-modconfig --console --install-all gave this error (and still does!)

Skipping BTF generation for /tmp/modconfig-9O1P2c/vmmon-only/vmmon.ko due to unavailability of vmlinux

SOLUTION

  • In my situation I was making a move of a Virtual machine from a Windows platform to a Ubuntu laptop installed with secure boot

  • Although the above compilation was not perfect it WAS CREATING the necessary binaries, but because they are not signed they cannot be loaded at Ubuntu boot time

  • So I got the BTF error messages that I thought was preventing VMNware to start but I was wrong.

  • This link https://github.com/mkubecek/vmware-host-modules/issues/87#issuecomment-800051833 explains the torture necessary to sign the binaries

    generate a key

    openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/"

    import to UEFI database

    sudo mokutil --import MOK.der (generate a password need next step)

    reboot system and import in UEFI BIOS

    (use same password)

    sudo shutdown -r now

    once rebooted need to sign the binaries

    sudo kmodsign sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)

    sudo kmodsign sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)

    on reboot new signed binaries used

    sudo shutdown -r now

    now good to start VMware and use any VM

  • Once the UEFI BIOS is informed and the driver binaries signed then VMware can operate fine and the world is saved again


So I did not totally fix the compilation issue, but it seems I was conflating this error message with the inability of VMware to run, which was wrong.