VMware
ovftool
To make an OVA file from a VMware virtual machine, use the following command:
$ /usr/bin/ovftool /path/to/*.vmx /path/to/*.ova
Troubleshooting
Log files are located in:
- /var/log/vmware/
- /tmp/vmware-(username)/
Issues
VMware complaining gcc4 9.3 was not found
I'm using Debian testing (stretch/sid). When I recently reinstalled VMware Workstation, I had an error message that said gcc-4.9.3 was not found:
If you list gcc installations available in /usr/bin/, you will notice that gcc-4.9 exists but the default gcc command is a symbolic link to gcc-5:
All you need to do is to temporarily change the pointer to gcc-4.9:
$ sudo ln -s -f /usr/bin/gcc-4.9 /usr/bin/gcc
Then proceed with the VMware installation and recreate the symbolic link to make it point to gcc-5:
$ sudo ln -s -f /usr/bin/gcc-5 /usr/bin/gcc
Failed to load module "atk-bridge"
If you have the following error:
$ vmware-installer -l Gtk-Message: Failed to load module "atk-bridge": /usr/lib/x86_64-linux-gnu/libatspi.so.0: undefined symbol: g_type_class_adjust_private_offset Product Name Product Version ==================== ==================== vmware-workstation 12.0.0.2985596
Try this:
$ export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libatspi.so.0:$LD_LIBRARY_PATH
To make the change permanent, the best is to add the above line to /usr/bin/vmware-installer.
libvmwareui.so: undefined symbol
If you have a similar log in {{menuitem|/tmp/vmware-{username}/}}:
2015-10-27T18:48:56.121+01:00| appLoader| W115: Unable to load libvmwareui.so from /usr/lib/vmware/lib/libvmwareui.so/libvmwareui.so: /usr/lib/vmware/lib/libvmwareui.so/libvmwareui.so: undefined symbol: _ZN4Glib10spawn_syncERKSsRKNS_11ArrayHandleISsNS_17Container_Helpers10TypeTraitsISsEEEENS_10SpawnFlagsERKN4sigc4slotIvNSA_3nilESC_SC_SC_SC_SC_SC_EEPSsSG_Pi 2015-10-27T18:48:56.121+01:00| appLoader| W115: Unable to load dependencies for /usr/lib/vmware/lib/libvmware-modconfig.so/libvmware-modconfig.so 2015-10-27T18:48:56.121+01:00| appLoader| W115: Unable to execute /usr/lib/vmware/bin/vmware-modconfig.
Here is how you can fix it:
$ export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libglibmm-2.4.so.1:$LD_LIBRARY_PATH
To make this permanent, add the above line to /usr/bin/vmware.
You should also apply this change to /usr/bin/vmware-netcfg, the network configuration panel.
"Failed to build vmnet. Failed to execute the build command."
Issue affecting following environments:
- kernel 4.6.0-1 on Debian Stretch
- kernel 4.6.1-2 on Archlinux
Symptoms: compilation fails:
# tail /tmp/vmware-root/vmware-5015.log 2016-07-23T08:02:21.659+02:00| vthread-4| I125: Setting destination path for vmmon to "/lib/modules/4.6.0-1-amd64/misc/vmmon.ko". 2016-07-23T08:02:21.659+02:00| vthread-4| I125: Extracting the vmmon source from "/usr/lib/vmware/modules/source/vmmon.tar". 2016-07-23T08:02:21.663+02:00| vthread-4| I125: Successfully extracted the vmmon source. 2016-07-23T08:02:21.663+02:00| vthread-4| I125: Building module with command "/usr/bin/make -j8 -C /tmp/modconfig-gTY5OH/vmmon-only auto-build HEADER_DIR=/lib/modules/4.6.0-1-amd64/build/include CC=/usr/bin/gcc IS_GCC_3=no" 2016-07-23T08:02:22.628+02:00| vthread-4| W115: Failed to build vmmon. Failed to execute the build command. 2016-07-23T08:02:22.629+02:00| vthread-4| I125: Setting destination path for vmnet to "/lib/modules/4.6.0-1-amd64/misc/vmnet.ko". 2016-07-23T08:02:22.629+02:00| vthread-4| I125: Extracting the vmnet source from "/usr/lib/vmware/modules/source/vmnet.tar". 2016-07-23T08:02:22.632+02:00| vthread-4| I125: Successfully extracted the vmnet source. 2016-07-23T08:02:22.632+02:00| vthread-4| I125: Building module with command "/usr/bin/make -j8 -C /tmp/modconfig-gTY5OH/vmnet-only auto-build HEADER_DIR=/lib/modules/4.6.0-1-amd64/build/include CC=/usr/bin/gcc IS_GCC_3=no" 2016-07-23T08:02:23.821+02:00| vthread-4| W115: Failed to build vmnet. Failed to execute the build command.
When manually trying to compile, we notice that this is due to the get_user_pages function:
root@unknown:/tmp/modconfig-gTY5OH/vmmon-only# /usr/bin/make -j8 -C /tmp/modconfig-gTY5OH/vmmon-only auto-build HEADER_DIR=/lib/modules/4.6.0-1-amd64/build/include CC=/usr/bin/gcc IS_GCC_3=no [SNIP] long get_user_pages(unsigned long start, unsigned long nr_pages, ^ /tmp/modconfig-gTY5OH/vmmon-only/linux/hostif.c:1165:13: error: too many arguments to function ‘get_user_pages’ retval = get_user_pages(current, current->mm, (unsigned long)uvAddr, [SNIP]
Fix:
It fails to compile because there has been a change in the get_user_pages function. To fix that, do as follows (scripted from this post):
# cd /usr/lib/vmware/modules/source/ # tar xf vmmon.tar # sed -i "s/get_user_pages/get_user_pages_remote/g" vmmon-only/linux/hostif.c # tar cf vmmon.tar vmmon-only # rm -fR vmmon-only
Then
# cd /usr/lib/vmware/modules/source/ # tar xf vmnet.tar # sed -i "s/get_user_pages/get_user_pages_remote/g" vmnet-only/userif.c # sed -i -e 's/dev->trans_start = jiffies/netif_trans_update(dev)/g' vmnet-only/netif.c # tar cf vmnet.tar vmnet-only # rm -fR vmnet-only
Fedora specific installation procedure
(Source: http://vcojot.blogspot.fr/2015/11/vmware-worksation-12-on-fedora-core-23.html)
$ sudo dnf install kernel-headers kernel-devel gcc glibc-headers $ sudo vmware-modconfig --console --install-all $ cd /tmp/ $ wget https://raw.githubusercontent.com/ElCoyote27/krynn-tools/master/Update_VMW.sh $ sudo ./Update_VMW.sh $ VMWARE_USE_SHIPPED_LIBS=force vmware
Compilation issue VMWare 12.5.2 with Kernel 4.9.5
Inspired from this post
# cd /usr/lib/vmware/modules/source/ # tar xf vmnet.tar # wget https://raw.githubusercontent.com/sebastiendamaye/public/master/patch/vmware-12.5.2-kernel-4.9.5/userif.patch -O /tmp/userif.patch # cd /usr/lib/vmware/modules/source/vmnet-only/ # patch -p0 < /tmp/userif.patch # cd /usr/lib/vmware/modules/source/ # tar cf vmnet.tar vmnet-only # rm -fR vmnet-only
# cd /usr/lib/vmware/modules/source/ # tar xf vmmon.tar # wget https://raw.githubusercontent.com/sebastiendamaye/public/master/patch/vmware-12.5.2-kernel-4.9.5/hostif.patch -O /tmp/hostif.patch # cd /usr/lib/vmware/modules/source/vmmon-only/linux/ # patch -p0 < /tmp/hostif.patch # cd /usr/lib/vmware/modules/source/ # tar cf vmmon.tar vmmon-only # rm -fR vmmon-only
build environment error! a required application is missing and modconfig can not continue. xzcheck the log for more details
If you have the following error message on Fedora:
build environment error! a required application is missing and modconfig can not continue. xzcheck the log for more details
Install the following dependencies:
sudo dnf install gcc make kernel-header kernel-devel
Can't open OVA
If you are not able to open OVA files (nothing happens), check the errors reported by ovftool:
$ ovftool /usr/lib/vmware-ovftool/ovftool.bin: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory $ dnf whatprovides libnsl.so.1 Last metadata expiration check: 23:24:40 ago on Thu 21 May 2020 10:08:32 PM CEST. libnsl-2.31-2.fc32.i686 : Legacy support library for NIS Repo : fedora Matched from: Provide : libnsl.so.1 $ sudo dnf install libnsl
stddef.h and stdarg.h files not found while compiling VMware Workstation 16.2.1 with Kernel 5.16.0-1
If you have compilation issues claiming that stddef.h
and stdarg.h
are not found, try this:
# CPATH=/usr/src/linux-headers-5.16.0-1-common/include/linux vmware-modconfig --console --install-all
Compilation error with VMware Workstation 16.2.3 and kernel 5.18.0-2
If you have the following compilation error with kernel 5.18.0.2 and VMware Workstation 16.2.3:
/tmp/modconfig-5DhCLa/vmmon-only/linux/hostif.c:2363:4: error: unknown type name ‘mm_segment_t’ 2363 | mm_segment_t old_fs; | ^~~~~~~~~~~~ /tmp/modconfig-5DhCLa/vmmon-only/linux/hostif.c:2365:13: error: implicit declaration of function ‘get_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration] 2365 | old_fs = get_fs(); | ^~~~~~ | sget_fc /tmp/modconfig-5DhCLa/vmmon-only/linux/hostif.c:2366:4: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration] 2366 | set_fs(KERNEL_DS); | ^~~~~~ | sget_fc /tmp/modconfig-5DhCLa/vmmon-only/linux/hostif.c:2366:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNEL_2_1’? 2366 | set_fs(KERNEL_DS); | ^~~~~~~~~ | KERNEL_2_1
You can fix as follows:
$ git clone https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.3.tar.gz $ tar xzvf vmware-host-modules-workstation-16.2.3.tar.gz $ cd vmware-host-modules-workstation-16.2.3/ $ make $ 'sudo make install $ sudo systemctl restart vmware.service
Compilation error with VMware Workstation 16.2.4 and kernel 5.19.0-1
If you have compilation errors while trying to build VMWare Workstation 16.2.4 and kernel 5.19.0-1, like the one below:
make[2]: *** [/usr/src/linux-headers-5.19.0-1-common/scripts/Makefile.build:254: /tmp/modconfig-Wevtez/vmnet-only/netif.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /tmp/modconfig-Wevtez/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’: /tmp/modconfig-Wevtez/vmnet-only/bridge.c:694:10: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration] 694 | netif_rx_ni(clone); | ^07:43, 11 September 2022 (CEST)07:43, 11 September 2022 (CEST) | netif_rx
Then try this:
$ git clone https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.4.tar.gz $ tar xzvf vmware-host-modules-workstation-16.2.4.tar.gz $ cd vmware-host-modules-workstation-16.2.4/ $ make $ 'sudo make install $ sudo systemctl restart vmware.service