Difference between revisions of "VMware"

From ArchWiki
Jump to: navigation, search
m (USB devices not recognized by VMware workstation 8)
m (Installation)
(9 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
This article is about installing VMware in Arch, you may also be interested in [[Installing Arch Linux in VMware]].
 
This article is about installing VMware in Arch, you may also be interested in [[Installing Arch Linux in VMware]].
 +
{{Note|This article supports '''only''' the latest VMware versions, meaning VMware Workstation 8 and VMware Player 4.}}
  
 
==Installation==
 
==Installation==
Line 15: Line 16:
 
{{Note| VMware Workstation/Player will '''not''' be manageable with pacman as the files are not installed with it.}}
 
{{Note| VMware Workstation/Player will '''not''' be manageable with pacman as the files are not installed with it.}}
  
'''1.''' Download [http://downloads.vmware.com/d/info/desktop_downloads/vmware_workstation/8_0 VMware Workstation] (you may also try the [http://communities.vmware.com/community/beta/ws testing (Beta/RC) versions]).
+
'''1.''' Download the latest [http://downloads.vmware.com/d/info/desktop_end_user_computing/vmware_workstation/8_0 VMware Workstation] or [http://downloads.vmware.com/d/info/desktop_end_user_computing/vmware_player/4_0 VMware Player] (you may also try the [http://communities.vmware.com/community/vmtn/beta testing (Beta/RC) versions]).
  
 
'''2.''' Start the installation ({{Ic|--console}} uses terminal instead of the GUI):
 
'''2.''' Start the installation ({{Ic|--console}} uses terminal instead of the GUI):
Line 26: Line 27:
 
  /etc/rc.d
 
  /etc/rc.d
  
'''5.''' (Optional) Enter the directory path to the Integrated Virtual Debugger for Eclipse, if it is installed.
+
'''5.''' (Optional) If Eclipse is installed, enter the directory path to the Integrated Virtual Debugger.
  
 
'''6.''' You will now get an error about the {{ic|"rc*.d style init script"}} not being set. This can, however, be safely ignored.
 
'''6.''' You will now get an error about the {{ic|"rc*.d style init script"}} not being set. This can, however, be safely ignored.
Line 37: Line 38:
  
 
===VMware module patches===
 
===VMware module patches===
{{Note|VMware Workstation 8 and VMware Player 4 only require patching for 3.1 kernels and up.}}
+
VMware Workstation 8 and VMware Player 4 only support kernels up to 3.0. Any later requires patching of the VMware modules.
{{Tip|There is also a package called {{AUR|vmware-patch}} in the [[Arch User Repository]] with the intention of trying to automate the patching process.}}
+
{{Tip|There is also a package called {{AUR|vmware-patch}} in the [[Arch User Repository]] with the intention of trying to automate the patching process (it also supports older VMware versions).}}
  
 
====3.2 kernels====
 
====3.2 kernels====
Line 48: Line 49:
  
 
====3.1 kernels====
 
====3.1 kernels====
With VMware Workstation 8 or VMware Player 4 you can use [http://weltall.heliohost.org/wordpress/2011/09/29/vmware-workstationplayer-fix-for-linux-3-1/ this] script:
+
The patch for 3.1 kernels is available [http://weltall.heliohost.org/wordpress/2011/09/29/vmware-workstationplayer-fix-for-linux-3-1/ here]:
 
  $ cd /tmp
 
  $ cd /tmp
 
  $ curl -O http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/09/vmware8linux31fix.tar.gz
 
  $ curl -O http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/09/vmware8linux31fix.tar.gz
 
  $ tar -xvzf vmware8linux31fix.tar.gz
 
  $ tar -xvzf vmware8linux31fix.tar.gz
 
  # ./patch-modules_3.1.0.sh
 
  # ./patch-modules_3.1.0.sh
 
With older VMware versions you need to use [http://weltall.heliohost.org/wordpress/2011/08/10/vmware-workstation-7-1-4-fix-for-linux-3-1/ this] one instead:
 
$ cd /tmp
 
$ curl -O http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/08/fullvmwarelinux310patch.tar.gz
 
$ tar -xvzf fullvmwarelinux310patch.tar.gz
 
# ./patch-modules_2.6.39.sh
 
 
{{Out of date}}
 
{{Box YELLOW||Unless proven otherwise the following kernel patches are redundant since VMware Workstation 8 and VMware Player 4 and will thus be removed from this article within 2 weeks (28th January).}}
 
 
====3.0 kernels====
 
The patch for 3.0 is available [http://weltall.heliohost.org/wordpress/2011/05/14/running-vmware-workstation-player-on-linux-2-6-39-updated/ here]:
 
$ cd /tmp
 
$ curl -O http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/05/vmware2.6.39patchv3.tar.bz2
 
$ tar -xvjf vmware2.6.39patchv3.tar.bz2
 
# ./patch-modules_2.6.39.sh
 
 
In addition, VMware module builder does not handle the new two-part version string (3.x instead of 2.6.x) of the kernel correctly. See [https://bbs.archlinux.org/viewtopic.php?id=123695 this] thread.
 
 
The easy solution is to patch two binaries:
 
# sed 's/\x83\xe8\x03\x83\xf8\x01\x0f\x96\xc0/\x83\xe8\x02\x83\xf8\x01\x0f\x96\xc0/' -i /usr/lib/vmware/lib/libvmware-modconfig-console.so/libvmware-modconfig-console.so
 
# sed 's/\x83\xe8\x03\x83\xf8\x01\x0f\x96\xc0/\x83\xe8\x02\x83\xf8\x01\x0f\x96\xc0/' -i /usr/lib/vmware/lib/libvmware-modconfig.so/libvmware-modconfig.so
 
 
====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
 
# curl -O 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 {{ic|sources/}} folder in a compressed tarball [http://www.fedoraforum.org/leigh123linux/vm/source.tar.lzma here].
 
 
====2.6.37 and .38 kernels====
 
$ cd /tmp
 
$ curl -O 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
 
$ curl -O 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
 
$ curl -O 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
 
  
 
===VMware module installation===
 
===VMware module installation===
Line 147: Line 101:
 
  # pacman -S linux-headers
 
  # pacman -S linux-headers
  
=== Printing does not work ===
+
=== Printing does not work {{ic|<-- Still an issue?}} ===
 
If printing from the guest OS is not working there may be a permission problem with the ThinPrint [[CUPS]] filter ('''thnucups'''), which is used by VMware. First make sure your {{ic|/var/log/cups/error_log}} says something like:
 
If printing from the guest OS is not working there may be a permission problem with the ThinPrint [[CUPS]] filter ('''thnucups'''), which is used by VMware. First make sure your {{ic|/var/log/cups/error_log}} says something like:
 
  E [22/Nov/2010:14:10:11 -0800] Unable to execute /usr/lib/cups/filter/thnucups: insecure file permissions (0104755)
 
  E [22/Nov/2010:14:10:11 -0800] Unable to execute /usr/lib/cups/filter/thnucups: insecure file permissions (0104755)
Line 164: Line 118:
 
==Uninstallation==
 
==Uninstallation==
  
Check the product name:
+
To uninstall VMware you need the product name (either {{ic|vmware-workstation}} or {{ic|vmware-player}}). To list all the installed products:
  
 
  # vmware-installer -l
 
  # vmware-installer -l

Revision as of 20:58, 28 January 2012

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 – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

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

Note: This article supports only the latest VMware versions, meaning VMware Workstation 8 and VMware Player 4.

Installation

Note: VMware Workstation/Player will not be manageable with pacman as the files are not installed with it.

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

2. Start the installation (--console uses terminal instead of the GUI):

# chmod +x VMware-<edition>-<version>.<release>.<architecture>.bundle
# ./VMware-<edition>-<version>.<release>.<architecture>.bundle --console

3. Read & accept the EULA to continue.

4. Set System service scripts to:

/etc/rc.d

5. (Optional) If Eclipse is installed, enter the directory path to the Integrated Virtual Debugger.

6. You will now get an error about the "rc*.d style init script" not being set. This can, however, be safely ignored.

7. Create links for the daemons:

# ln -s /etc/init.d/vmware /etc/rc.d/vmware
# ln -s /etc/init.d/vmware-workstation-server /etc/rc.d/vmware-workstation-server

Configuration

VMware module patches

VMware Workstation 8 and VMware Player 4 only support kernels up to 3.0. Any later requires patching of the VMware modules.

Tip: There is also a package called vmware-patchAUR in the Arch User Repository with the intention of trying to automate the patching process (it also supports older VMware versions).

3.2 kernels

The patch for 3.2 kernels is available here:

$ cd /tmp
$ curl -O http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/11/vmware8linux32fix.tar.gz
$ tar -xvzf vmware8linux32fix.tar.gz
# ./patch-modules_3.1.0.sh

3.1 kernels

The patch for 3.1 kernels is available here:

$ cd /tmp
$ curl -O http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/09/vmware8linux31fix.tar.gz
$ tar -xvzf vmware8linux31fix.tar.gz
# ./patch-modules_3.1.0.sh

VMware module installation

8. At this point you would want to install the modules. First you need to either change the lsmod binary path 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

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

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

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

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

Warning: When upgrading the kernel you will have to rebuild the VMware modules with the following command:
# vmware-modconfig --console --install-all
Failure to do so may result in a system crash upon powering up virtual machines.

Tips & Tricks

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

Using the modified BIOS

If and when you decide to modify the extractd BIOS you can make your virtual machine use it by moving it to Template:Filename:

$ mv bios440.rom ~/vmware/<Virtual machine name>/

then adding the name to the <Virtual machine name>.vmx file:

~/vmware/<Virtual machine name>/<Virtual machine name>.vmx
bios440.filename = "bios440.rom"

Troubleshooting

Could not open /dev/vmmon: No such file or directory.

The full error is:

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 vmmon VMware service is not running. All VMware services can be started with:

# rc.d start vmware

Kernel headers for version 3.x-xxxx were not found. If you installed them[...]

Install them with:

# pacman -S linux-headers

Printing does not work <-- Still an issue?

If printing from the guest OS is not working there may be a permission problem with the ThinPrint CUPS filter (thnucups), which is used by VMware. First make sure your /var/log/cups/error_log says something like:

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

In which case you may try:

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

The installer fails to start

If you just get back to the prompt when opening the .bundle, then you probably have an old version of the VMware installer and you should remove it (you may also refer to the uninstallation section of this article):

# rm -r /etc/vmware-installer

USB devices not recognized by VMware workstation 8

For some reason, some installations are missing the vmware-USBArbitrator script. To readd it manually see this forum post for more information

Uninstallation

To uninstall VMware you need the product name (either vmware-workstation or vmware-player). To list all the installed products:

# vmware-installer -l

and uninstall with:

# vmware-installer -u <vmware-product>

Manually included symlinks in /etc/rc.d have to be removed manually:

# unlink /etc/rc.d/vmware
# unlink /etc/rc.d/vmware-workstation-server

Remember to also remove vmware from the /etc/rc.conf DAEMONS array.