VMware

From aldeid
Jump to: navigation, search

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/
  • {{menuitem|/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:

Linux-vmware-workstation-gcc-4.9.3-not-found.png

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
:

Linux-list-gcc.png

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:
[email protected]:/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