- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
EDIT Update Dec30 2021: Likely the methods shown in this post are better solutions than what I have posted here though this still works for 16.2.1 on Pop!_OS 21.10
---
I will try my best to clean up the steps and add more detail and linux commands
But first to make it clear I was not able to compile vmnet only vmmon after I modified the file vm_asm_x86.h found in the vmmon-only directory. I could not find the equivalent file in vmnet-only directory.
I'm not sure what the side effects may be by not having vmnet compiled correctly but for now everything seems ok on my Pop!_OS 21.10 install of VMWare WS 16.2
Also there are a couple differences in compile errors depending on where you are starting from "I think ...?"
I believe if you previously had a working copy of VMWare WS and then did the kernal upgrade only the vmmon failed to compile correctly.
However I uninstalled my VMware 16.1 and tried 16.2 hoping it would solve the compile issue and thus "I think" is the reason why I'm seeing the vmnet compile issue as well as the vmmon (I'm guessing totally guessing).
This procedure is written from the point where I've just done a fresh install of VMware WS 16.2
With that out of the way here are the detailed steps of updating vmmon
(vmnet would be almost the same with exception to whatever file would be modified and perhaps the directory structure)
Assumptions:
1. You have access to elevated priviledges meaning you can use the 'sudo' command
2. You have a perferred text editor like gedit, vim, leaf, etc installed
3. You have VMware Workstation installed.
4. You know how to open a terminal session
Steps to compile vmmon:
1. Navigate to the directory '/usr/lib/vmware/modules/source/'
I perfer the command line (CLI) to do this, open your terminal application and type cd /usr/lib/vmware/modules/source/
Like this: scott@lenovow540:~$ cd /usr/lib/vmware/modules/source/
2. Depending on your current VMware setup you may or may not see the directories vmnet-only and vmmon-only. If you're using the terminal use the ls command to see the directory contents. At the very least you should see two 'tar' files 'vmmon.tar' and 'vmnet.tar'
3. If the 'vmnet-only' and 'vmmon-only' directoy do NOT exist then use the following command with elevated priviledges in terminal 'sudo tar xvf vmmon.tar'
Your terminal screen should look something like this but the underline part will be your computer information and the bold is what you need to enter on the command line:
scott@lenovow540:/usr/lib/vmware/modules/source$ sudo tar xvf vmmon.tar
4. In the terminal type cd vmmon-only
You terminal prompt should look something like this: scott@lenovow540:/usr/lib/vmware/modules/source$ cd vmmon-only/include/
5. Use a text editor in elevated privilege mode (sudo). I believe gedit is preinstalled with ubuntu and pop!_os but any text editor will do such as vi or vim etc.
So using gedit command like this: scott@lenovow540:/usr/lib/vmware/modules/source/vmmon-only/include$ sudo gedit vm_asm_x86.h
6. Edit the vm_asm_x86.h file commenting out the compile issues from line 65 to 70 NOT 71 then 72. Just in case you're not aware, programmers place comments in their code, for example to explain what the following code function performs or to remove old code etc. Depending on the code there different methods to comment "out" a line of code. I think the code here is in "C" so any line with double "//" (not including the quotes) is ignored by the computer (compiler). Basically scroll down to line 65.
If you're using gedit the line numbers are on the left hand side. Make sure you add the double // on lines 65,66,67,68,69,70 and 72 as shown by @tomarmistead
Update EDIT: Originally I referenced earlier in my post commenting out line 65 to 72 (because lazy) tho I did identify the lines specifically to comment out plus referencing @tomarmistead original code change after but by then it's too late.
DO NOT COMMENT OUT LINE 71. The line of code that says "#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)"
65 //#ifndef USE_UBSAN
66 //#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) \
67 // ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
68 // ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
69 // sizeof(expr) <= 2))
70 //#else
71 #define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) <<<---- DO NOT COMMENT OUT this line
72 //#endif
7. Save and close gedit.
8. Back in the terminal type: cd ..
Like this: scott@lenovow540:/usr/lib/vmware/modules/source/vmmon-only/include$ cd ..
9. In the terminal type: sudo make
Like this: scott@lenovow540:/usr/lib/vmware/modules/source/vmmon-only$ sudo make
10. In the terminal type: cd ..
11. You should be back in the sources directory
Like this: scott@lenovow540:/usr/lib/vmware/modules/source$
12. NOTE: Now its rinse and repeat minus the file edit because I'm not a coder and don't know what file or what to change for the vmnet. That said I believe you still need to do the 'make' even though it doesn't complete successfully. The next steps look like this from the terminal (CLI)...
13. sudo tar xvf vmnet.tar
14. cd vmnet-only
15. sudo make
16. cd ..
17. sudo cp vmmon.o /lib/modules/`uname -r`/kernel/drivers/misc/vmmon.ko
18. sudo cp vmnet.o /lib/modules/`uname -r`/kernel/drivers/misc/vmnet.ko
19. sudo depmod -a
20. sudo systemctl restart vmware.service
21. Start VMware WS from the graphical interface. Clicky the icon ![]()
Sorry I don't know a way to do all this from a graphical interface point of view (aka windows) specifically the "make" function.
Good luck I hope this works for you. I have a second machine running Pop!_OS and repeated these steps and it worked for me the second time.