From ArchWiki
Revision as of 17:42, 11 August 2011 by Sputnick (Talk | contribs) (replace wrong template "Codeline" by "Filename")

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

This article is about installing VMware in Arch, you may also be interested in Installing Arch Linux in VMware.

VMware Server Installation

1. Install vmware-server from the AUR.

2. Install vmware-server-console. Alternatively, on Arch64, the bin32 version can also be installed.

3. Download the image from VMWare website.

4. Copy the image to the build directory.

5. Finish building.

VMware Workstation or VMware Player


Note: This will not install with pacman, so the files installed will not be traceable/removable with pacman.
Note: For a 2.6.39 kernel you may also use this automated script: http://kaslit.com/downloads/vmwareinstallshell.sh - note that you still need to do steps 3, 4, 5(6), 10 and 11

To install Workstation or Player on a Linux host using a bundle:

1. Download VMware Workstation or VMware Player (you may also try the testing (Beta/RC) versions).

2. Create a fake System V init style directory for VMware and start the installation (the Template:Codeline flag uses terminal instead of the GUI and the Template:Codeline we need it to select the Template:Codeline runlevels directory):

# mkdir -p /etc/rc.d/vmware.d/{rc{0..6},init}.d
# chmod +x VMware-<edition>-<version>.<release>.<architecture>.bundle
# ./VMware-<edition>-<version>.<release>.<architecture>.bundle --console --custom

3. Read & accept the EULA to continue.

4. Accept the default settings until it prompts for Template:Codeline - set it to:


5. Set Template:Codeline to:


6. (Optional) Enter the directory path to the Integrated Virtual Debugger for Eclipse if Eclipse is installed.

VMware modules and patches

There is also a package called vmware-patch in the AUR with the intention of trying to automate the patching process.

2.6.39 kernels

mkdir /tmp/vmware && cd /tmp/vmware
# for t in /usr/lib/vmware/modules/source/*.tar; do tar xf $t; mv $t{,.original}; done
# wget -qO- http://kaslit.com/downloads/vmware2.6.39fixed.patch | patch -Np1
# for d in *-only; do tar cf /usr/lib/vmware/modules/source/${d/%-only/}.tar $d; done

A Fedora community member has also uploaded the Template:Filename folder in a compressed tarball here: http://www.fedoraforum.org/leigh123linux/vm/source.tar.lzma

2.6.37 and .38 kernels

cd /tmp
wget http://www.russo79.com/vmware7.1.3-patch-kernel-2.6.37.sh
# chmod +x vmware7.1.3-patch-kernel-2.6.37.sh
# ./vmware7.1.3-patch-kernel-2.6.37.sh

2.6.36 kernels

cd /tmp
wget http://files.archlinux.org.il/vmmon_fix_2.6.36.sh
# chmod +x vmmon_fix_2.6.36.sh
# ./vmmon_fix_2.6.36.sh

2.6.35 kernels

cd /tmp
wget http://www.sputnick-area.net/scripts/vmware7.1.1-patch-kernel-2.6.35.bash
# chmod +x vmware7.1.1-patch-kernel-2.6.35.bash
# ./vmware7.1.1-patch-kernel-2.6.35.bash

Installation (concluded)

7. At this point you would want to install the modules. First you need to either change the Template:Codeline in Template:Filename from Template:Filename to Template:Filename:

# sed -i "s|/sbin/lsmod|/bin/lsmod|g" /etc/rc.d/vmware

or create a symlink with:

# ln -s /bin/lsmod /sbin/lsmod

8. Now you can install the modules. You can do this with either by launching VMware and letting it install the modules with the GUI or executing:

# vmware-modconfig --console --install-all

9. (Optional) Add vmware to the DAEMONS array in Template:Filename so that the service is started automatically on boot.

10. Install and run HAL:

# pacman -S hal
# rc.d start hal

11. Now, open your VMware Workstation (Template:Codeline in the console) or VMware Player (Template:Codeline in the console) to configure & use!


Check the product name

# vmware-installer -l

uninstall product

# vmware-installer -u <vmware-product>

Manually included parts in /etc/rc.d have to be deleted manually. Don't forget to remove vmware from the Template:Filename DAEMONS array.

Extracting the VMware BIOS

To extract the VMware BIOS, which can be manipulated and later used with your virtual machines:

$ objcopy /usr/lib/vmware/bin/vmware-vmx -O binary -j bios440 --set-section-flags bios440=a bios440.rom.Z
$ perl -e 'use Compress::Zlib; my $v; read STDIN, $v, '$(stat -c%s "./bios440.rom.Z")'; $v = uncompress($v); print $v;' < bios440.rom.Z > bios440.rom

Once you've modified the BIOS in whatever way required, move it to the directory where your VM is stored, and add it to the Template:Codeline file:

bios440.filename = "bios440.rom"


Kernel upgrades and VMware modules

If you get back to the prompt when opening the Template:Filename and VMware don't ask you to makes choices, then you probably have an old Template:Codeline that you should remove (you may also refer to the Uninstallation section of this article):

# rm /etc/vmware-installer

If you get:

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

This means that at least the one VMware service isn't started up. You can start them all up by running (as root):

# rc.d start vmware

If you get:

Kernel headers for version 2.6.xx-xxxx were not found. If you installed them.......

Install them with the following:

# pacman -S linux-headers

error: implicit declaration of function ‘iommu_unmap_range’

If the following error happens while compiling modules

/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:403:7: erreur: implicit declaration of function ‘iommu_unmap_range’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/iommu.o] Erreur 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.35-ARCH »
make: *** [vmmon.ko] Erreur 2

This error is due to a change in the kernel API, the change is merely just a change of name which removes the suffixed '_range' from the iommu functions. You can manually patch the sources by removing the _range suffix with a quick sed expression:

cd /tmp
tar xvf /usr/lib/vmware/modules/source/vmmon.tar
sed 's/_range//' -i vmmon-only/linux/iommu.c
tar cvf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only

Please note that when upgrading the kernel you will have to rebuild the vmware modules with:

$ vmware-modconfig --console --install-all

Otherwise your whole system might crash when trying to power up VMs so keep that in mind.

error: implicit declaration of function ‘kernel_locked’

If you're getting this error it means you're most likely on a 2.6.36 > kernel and require some additional attention. Attention that VMware rarely pays.

There's a patch available for this and several more compile errors over at [1]

error: ‘struct sock’ has no member named ‘sk_sleep’

This error often occures when compiling the vsock module, the error looks something like:

make[1]: Entering directory `/usr/src/linux-headers-2.6.35-7-generic-pae'
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:312: warning: initialization from incompatible pointer type
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:359: warning: initialization from incompatible pointer type
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciStreamConnect’:
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3224: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3247: error: ‘struct sock’ has no member named ‘sk_sleep’

To fix this we do a similar approach as the one mentioned above:

cd /tmp
# tar xvf /usr/lib/vmware/modules/source/vsock.tar
# sed 's/\([a-z_]*\)->compat_sk_sleep/compat_sk_sleep(\1)/g' -i vsock-only/linux/af_vsock.c
# tar cvf /usr/lib/vmware/modules/source/vsock.tar vsock-only

Then rerun:

# vmware-modconfig --console --install-all

Printing from the guest OS

If you've configured your guest OS to use the printers on your host, and the print jobs aren't going through, there may be a permissions problem with the ThinPrint CUPS filter (thnucups), which is used by VMware.

From Template:Filename:

E [22/Nov/2010:14:10:11 -0800] Unable to execute /usr/lib/cups/filter/thnucups: insecure file permissions (0104755)

This should fix that:

# chmod u-sw /usr/lib/cups/filter/thnucups
# /etc/rc.d/cupsd restart