3

I got following error when I open the virtual machine in vmware workstation:

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

Then I clicked ok, and another error like bellow reported and vmware workstation quit launching my virtual machine for me:

Failed to initialize monitor device.

Maybe this has something to do with my system updating.

I found this post, and I did like they said:

 1. openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform
    DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/"
 2. openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform
    DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/"
 3. sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256
    ./MOK.priv ./MOK.der $(modinfo -n vmnet)
 4. sudo mokutil --import MOK.der

But when I exec sudo mokutil --import MOK.der, I got an error:

EFI variables are not supported on this system

and when I exec sudo modprobe vmmon, I got an error:

modprobe: ERROR: could not insert 'vmmon': Exec format error

and when I exec sudo vmware-modconfig --console --install-all

[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
   VMware Authentication Daemon                                        done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
Using kernel build system.
make: Entering directory `/tmp/modconfig-iwyoC2/vmmon-only'
/usr/bin/make -C /lib/modules/4.4.0-116-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-4.4.0-116-generic'
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/vmcore/moduleloop.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-iwyoC2/vmmon-only/bootstrap/monLoaderVmmon.o
/tmp/modconfig-iwyoC2/vmmon-only/linux/driver.c:985:1: warning: always_inline function might not be inlinable [-Wattributes]
 LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
 ^
  LD [M]  /tmp/modconfig-iwyoC2/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-iwyoC2/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/modconfig-iwyoC2/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-116-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-iwyoC2/vmmon-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-iwyoC2/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/modconfig-iwyoC2/vmmon-only'
Using kernel build system.
make: Entering directory `/tmp/modconfig-iwyoC2/vmnet-only'
/usr/bin/make -C /lib/modules/4.4.0-116-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-4.4.0-116-generic'
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/vnetEvent.o
In file included from include/linux/pci.h:35:0,
                 from /tmp/modconfig-iwyoC2/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-iwyoC2/vmnet-only/netif.c:43:
include/linux/pci_ids.h:2253:0: warning: "PCI_VENDOR_ID_VMWARE" redefined [enabled by default]
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
In file included from /tmp/modconfig-iwyoC2/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-iwyoC2/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-iwyoC2/vmnet-only/netif.c:42:
/tmp/modconfig-iwyoC2/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
  CC [M]  /tmp/modconfig-iwyoC2/vmnet-only/vnetUserListener.o
In file included from /tmp/modconfig-iwyoC2/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-iwyoC2/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-iwyoC2/vmnet-only/bridge.c:53:
/tmp/modconfig-iwyoC2/vmnet-only/vm_device_version.h:56:0: warning: "PCI_VENDOR_ID_VMWARE" redefined [enabled by default]
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
In file included from include/linux/pci.h:35:0,
                 from /tmp/modconfig-iwyoC2/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-iwyoC2/vmnet-only/bridge.c:52:
include/linux/pci_ids.h:2253:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
  LD [M]  /tmp/modconfig-iwyoC2/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-iwyoC2/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/modconfig-iwyoC2/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-116-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-iwyoC2/vmnet-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-iwyoC2/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/modconfig-iwyoC2/vmnet-only'
Starting VMware services:
   Virtual machine monitor                                            failed
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                   failed
   VMware Authentication Daemon                                        done
Unable to start services

What does this mean? How to solve it? I have tried so many ways but all of them are invalid, please help.

BTW: my computer secure boot is disabled

cong
  • 133

2 Answers2

2

I had exactly the same issues. The only thing which helped me was going back to the previous kernel version. Did that by following the instructions here: http://karlcode.owtelse.com/blog/2017/03/13/reverting-to-a-previous-kernel/

noname
  • 36
0

In case anyone else ends up here trying to figure out why you are getting this even after you add the keys:

I usually run the below script to fix this problem, but suddenly found it didn't work. I don't know why, but in this last update, I discovered the vmmon module just isn't loading on boot even after you enroll it. Run sudo modprobe vmmon after you have run the below fixed the problem for me.

#!/bin/bash

echo "Running VMWare configuration..." sudo vmware-modconfig --console --install-all

Expected issues with monitor and net

echo "Generating a key for signing..." openssl req -new -x509 -newkey rsa:2048 -keyout VMWARE15.priv -outform DER -out VMWARE15.der -nodes -days 36500 -subj "/CN=VMWARE/"

Confirmation of successful key generation

echo "Signing kernel modules with the generated key..." sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWARE15.priv ./VMWARE15.der $(modinfo -n vmmon) sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWARE15.priv ./VMWARE15.der $(modinfo -n vmnet)

No feedback expected here

echo "Checking signatures on kernel modules..." tail $(modinfo -n vmmon) | grep "Module signature appended"

Expect 'Binary file (standard input) matches'

echo "Importing the key to the machine owner key (MOK) management system..." echo -e "somepassword\nsomepassword" | sudo mokutil --import VMWARE15.der

echo "Please reboot your system to complete the setup. Follow the prompts to enroll the key."