Difference between revisions of "VMware"
m |
(→Module tool paths: Directly modify package files are not a good idea. Symlinks is cleaner and better. /sbin will be merged to /usr/bin in the future. See https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 30: | Line 30: | ||
'''3.''' Read & accept the EULA to continue. | '''3.''' Read & accept the EULA to continue. | ||
− | '''4.''' Set {{Ic|System service scripts directory}} to {{ic|/etc/ | + | '''4.''' Set {{Ic|System service scripts directory}} to {{ic|/etc/init.d}}. |
'''5.''' (Optional) If Eclipse is installed, enter the directory path to the Integrated Virtual Debugger. | '''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 directories"}} not being set. This can, however, be safely ignored. | '''6.''' You will now get an error about the {{ic|"rc*.d style init script directories"}} not being set. This can, however, be safely ignored. | ||
− | |||
− | |||
− | |||
− | |||
==Configuration== | ==Configuration== | ||
Line 45: | Line 41: | ||
===Module tool paths=== | ===Module tool paths=== | ||
− | ''' | + | '''7.''' The {{ic|module tool paths}} of certain Workstation scripts now need to be pointed to {{ic|/usr/bin/}} instead of {{ic|/sbin/}}. These include the service script in {{ic|/etc/init.d/}} and some other ones in {{ic|/usr/bin/}}. You could also just create symlinks with: |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | You could also just create symlinks with: | ||
# for i in {ins,ls,rm}mod modinfo; do ln -s /usr/bin/$i /sbin/$i; done | # for i in {ins,ls,rm}mod modinfo; do ln -s /usr/bin/$i /sbin/$i; done | ||
Line 77: | Line 57: | ||
==Finishing up== | ==Finishing up== | ||
− | ''' | + | '''8.''' (Optional) Instead of using {{ic|<nowiki># /etc/init.d/vmware {start|stop|status|restart}</nowiki>}} directly to manage the services you may also create a {{ic|.service}} file (or [http://communities.vmware.com/docs/DOC-20855 files]): |
+ | |||
+ | {{hc|/etc/systemd/system/vmware.service| | ||
+ | 2=[Unit] | ||
+ | Description=VMware daemon | ||
+ | [Service] | ||
+ | ExecStart=/etc/init.d/vmware start | ||
+ | ExecStop=/etc/init.d/vmware stop | ||
+ | PIDFile=/var/lock/subsys/vmware | ||
+ | TimeoutSec=0 | ||
+ | RemainAfterExit=yes | ||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | }} | ||
+ | |||
+ | To start the {{ic|.service}} on boot: | ||
+ | # systemctl enable vmware | ||
− | ''' | + | '''9.''' Now, open your VMware Workstation ({{Ic|vmware}} in the console) or VMware Player ({{Ic|vmplayer}} in the console) to configure & use! |
{{Warning|When upgrading the kernel you '''will''' have to rebuild the VMware modules with the following command: | {{Warning|When upgrading the kernel you '''will''' have to rebuild the VMware modules with the following command: | ||
Line 110: | Line 106: | ||
# pacman -S dkms | # pacman -S dkms | ||
− | then create a source directory for the {{ic|Makefile}} and the | + | then create a source directory for the {{ic|Makefile}} and the {{ic|dkms.conf}}. |
# mkdir /usr/src/vmware-modules-9 | # mkdir /usr/src/vmware-modules-9 | ||
− | + | The {{ic|dkms.conf}} describes the module names and the compilation/installation procedure. {{ic|1=AUTOINSTALL="yes"}} tells the modules to be recompiled/installed automatically each time: | |
− | {{hc|dkms.conf| | + | {{hc|/usr/src/vmware-modules-9/dkms.conf| |
2=PACKAGE_NAME="vmware-modules" | 2=PACKAGE_NAME="vmware-modules" | ||
PACKAGE_VERSION="9" | PACKAGE_VERSION="9" | ||
Line 144: | Line 140: | ||
AUTOINSTALL="yes" | AUTOINSTALL="yes" | ||
− | |||
}} | }} | ||
and now the {{ic|Makefile}}: | and now the {{ic|Makefile}}: | ||
− | {{hc|Makefile| | + | {{hc|/usr/src/vmware-modules-9/Makefile| |
2=KERNEL := $(KERNELRELEASE) | 2=KERNEL := $(KERNELRELEASE) | ||
HEADERS := /usr/src/linux-$(KERNEL)/include | HEADERS := /usr/src/linux-$(KERNEL)/include | ||
Line 171: | Line 166: | ||
clean: | clean: | ||
rm -rf modules/ | rm -rf modules/ | ||
− | |||
}} | }} | ||
The modules can then be registered: | The modules can then be registered: | ||
− | + | # dkms -m vmware-modules -v 9 -k `uname -r` add | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
built: | built: | ||
− | + | # dkms -m vmware-modules -v 9 -k `uname -r` build | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
and installed: | and installed: | ||
− | + | # dkms -m vmware-modules -v 9 -k `uname -r` install | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
If everything went well, the modules will now be recompiled automatically the next time the kernel changes. | If everything went well, the modules will now be recompiled automatically the next time the kernel changes. | ||
Line 219: | Line 189: | ||
Please make sure that the kernel module `vmmon' is loaded. | Please make sure that the kernel module `vmmon' is loaded. | ||
− | This means that at least the {{Ic|vmmon}} VMware service is not running. | + | This means that at least the {{Ic|vmmon}} VMware service is not running. If using the {{ic|.service}} file from step 8. all VMware services can be started with: |
− | + | # systemctl start vmware | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | otherwise use: | |
− | # | + | # /etc/init.d/vmware start |
===Kernel headers for version 3.x-xxxx were not found. If you installed them[...]=== | ===Kernel headers for version 3.x-xxxx were not found. If you installed them[...]=== | ||
Line 250: | Line 205: | ||
For some reason, some installations are missing the {{ic|vmware-USBArbitrator}} script. To readd it manually see [https://bbs.archlinux.org/viewtopic.php?pid=1003117#p1003117 this forum post]. | For some reason, some installations are missing the {{ic|vmware-USBArbitrator}} script. To readd it manually see [https://bbs.archlinux.org/viewtopic.php?pid=1003117#p1003117 this forum post]. | ||
− | You may also manually extract the VMware bundle and copy the {{ic|vmware-USBArbitrator}} script from {{ic|<destination folder>/vmware-usbarbitrator/etc/init.d/}} to | + | You may also manually extract the VMware bundle and copy the {{ic|vmware-USBArbitrator}} script from {{ic|<destination folder>/vmware-usbarbitrator/etc/init.d/}} to {{ic|/etc/init.d/}}: |
$ ./VMware-<edition>-<version>.<release>.<architecture>.bundle --console --extract /tmp/vmware-bundle | $ ./VMware-<edition>-<version>.<release>.<architecture>.bundle --console --extract /tmp/vmware-bundle | ||
− | # cp /tmp/vmware-bundle/vmware-usbarbitrator/etc/init.d/vmware-USBArbitrator /etc/ | + | # cp /tmp/vmware-bundle/vmware-usbarbitrator/etc/init.d/vmware-USBArbitrator /etc/init.d/ |
====2) The {{ic|vmware-usbarbitrator}} binary is segfaulting==== | ====2) The {{ic|vmware-usbarbitrator}} binary is segfaulting==== | ||
Line 263: | Line 218: | ||
This is caused by an empty {{ic|/etc/arch-release}} (owned by {{pkg|filesystem}}). It is used by the service to alter its behavior based on the distribution's release version. | This is caused by an empty {{ic|/etc/arch-release}} (owned by {{pkg|filesystem}}). It is used by the service to alter its behavior based on the distribution's release version. | ||
− | To fix it, add a version string in the form of {{ic|<year>.<month>(.<day>)}} (e.g. {{ic|[https://www.archlinux.org/news/ | + | To fix it, add a version string in the form of {{ic|<year>.<month>(.<day>)}} (e.g. {{ic|[https://www.archlinux.org/news/install-medium-20121006-introduces-systemd/ 2012.10.06]}}). |
===process XXXX: Attempt to remove filter function[...]=== | ===process XXXX: Attempt to remove filter function[...]=== | ||
Line 315: | Line 270: | ||
# vmware-installer -u <vmware-product> | # vmware-installer -u <vmware-product> | ||
− | Manually included symlinks have to be removed manually in | + | Manually included symlinks have to be removed manually in {{ic|/sbin/}}: |
− | # rm | + | # rm /sbin/insmod /sbin/lsmod /sbin/modinfo /sbin/rmmod |
− | Remember to also remove {{ | + | Remember to also remove the {{ic|.service}} file: |
+ | # systemctl disable vmware | ||
+ | # rm /etc/systemd/system/vmware.service |
Revision as of 01:58, 24 November 2012
zh-CN:VMware Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end
This article is about installing VMware in Arch Linux; you may also be interested in Installing Arch Linux in VMware.
Contents
- 1 Installation
- 2 Configuration
- 3 Finishing up
- 4 Tips & Tricks
- 5 Troubleshooting
- 5.1 Could not open /dev/vmmon: No such file or directory.
- 5.2 Kernel headers for version 3.x-xxxx were not found. If you installed them[...]
- 5.3 USB devices not recognized
- 5.4 process XXXX: Attempt to remove filter function[...]
- 5.5 The installer fails to start
- 5.6 Incorrect login/password when trying to access VMware remotely
- 5.7 Issues with ALSA output
- 6 Uninstallation
Installation
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 directory
to /etc/init.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 directories"
not being set. This can, however, be safely ignored.
Configuration
Module tool paths
7. The module tool paths
of certain Workstation scripts now need to be pointed to /usr/bin/
instead of /sbin/
. These include the service script in /etc/init.d/
and some other ones in /usr/bin/
. You could also just create symlinks with:
# for i in {ins,ls,rm}mod modinfo; do ln -s /usr/bin/$i /sbin/$i; done
VMware module patches and installation
VMware Workstation 9 and Player 5 both support kernels up to 3.6.
3.5 / 3.6 kernels
A change in the format of the kernel exception table introduced back in April affecting the vmmon
module is known to cause crashes in Fedora guests. The patch here creates a portable exception table (packaged together with the script in here) and will also install the modules afterwards by executing # vmware-modconfig --console --install-all
(this will also reload the vmmon
module):
$ cd /tmp $ curl -O http://communities.vmware.com/servlet/JiveServlet/download/2103172-94260/vmware9_kernel35_patch.tar.bz2 $ tar --strip-components=1 -xvf vmware9_kernel35_patch.tar.bz2 # The "--strip-components=1" flag extracts the files only # ./patch-modules_3.5.0.sh
Finishing up
8. (Optional) Instead of using # /etc/init.d/vmware {start|stop|status|restart}
directly to manage the services you may also create a .service
file (or files):
/etc/systemd/system/vmware.service
[Unit] Description=VMware daemon [Service] ExecStart=/etc/init.d/vmware start ExecStop=/etc/init.d/vmware stop PIDFile=/var/lock/subsys/vmware TimeoutSec=0 RemainAfterExit=yes [Install] WantedBy=multi-user.target
To start the .service
on boot:
# systemctl enable vmware
9. Now, open your VMware Workstation (vmware
in the console) or VMware Player (vmplayer
in the console) to configure & use!
# vmware-modconfig --console --install-allFailure to do so may result in a system crash upon powering up virtual machines.
Tips & Tricks
Entering the Workstation License Key from terminal
# /usr/lib/vmware/bin/vmware-vmx-debug --new-sn XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Where XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
is your license key.
Extracting the VMware BIOS
$ 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 extracted BIOS you can make your virtual machine use it by moving it to ~/vmware/<Virtual machine name>
:
$ 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"
Using DKMS to manage the modules
The Dynamic Kernel Module Support (DKMS) can be used to manage Workstation modules and to void from re-running vmware-modconfig
each time the kernel changes. The following example uses a custom Makefile
to compile and install the modules through vmware-modconfig
. Afterwards they are removed from the current kernel tree.
First install dkms from the Community repository:
# pacman -S dkms
then create a source directory for the Makefile
and the dkms.conf
.
# mkdir /usr/src/vmware-modules-9
The dkms.conf
describes the module names and the compilation/installation procedure. AUTOINSTALL="yes"
tells the modules to be recompiled/installed automatically each time:
/usr/src/vmware-modules-9/dkms.conf
PACKAGE_NAME="vmware-modules" PACKAGE_VERSION="9" MAKE[0]="make all" CLEAN="make clean" BUILT_MODULE_NAME[0]="vmmon" BUILT_MODULE_LOCATION[0]="modules" BUILT_MODULE_NAME[1]="vmnet" BUILT_MODULE_LOCATION[1]="modules" BUILT_MODULE_NAME[2]="vmblock" BUILT_MODULE_LOCATION[2]="modules" BUILT_MODULE_NAME[3]="vmci" BUILT_MODULE_LOCATION[3]="modules" BUILT_MODULE_NAME[4]="vsock" BUILT_MODULE_LOCATION[4]="modules" DEST_MODULE_LOCATION[0]="/extra/vmware" DEST_MODULE_LOCATION[1]="/extra/vmware" DEST_MODULE_LOCATION[2]="/extra/vmware" DEST_MODULE_LOCATION[3]="/extra/vmware" DEST_MODULE_LOCATION[4]="/extra/vmware" AUTOINSTALL="yes"
and now the Makefile
:
/usr/src/vmware-modules-9/Makefile
KERNEL := $(KERNELRELEASE) HEADERS := /usr/src/linux-$(KERNEL)/include GCC := $(shell vmware-modconfig --console --get-gcc) DEST := /lib/modules/$(KERNEL)/vmware TARGETS := vmmon vmnet vmblock vmci vsock LOCAL_MODULES := $(addsuffix .ko, $(TARGETS)) all: $(LOCAL_MODULES) mkdir -p modules/ mv *.ko modules/ rm -rf $(DEST) depmod %.ko: vmware-modconfig --console --build-mod -k $(KERNEL) $* $(GCC) $(HEADERS) vmware/ cp -f $(DEST)/$*.ko . clean: rm -rf modules/
The modules can then be registered:
# dkms -m vmware-modules -v 9 -k `uname -r` add
built:
# dkms -m vmware-modules -v 9 -k `uname -r` build
and installed:
# dkms -m vmware-modules -v 9 -k `uname -r` install
If everything went well, the modules will now be recompiled automatically the next time the kernel changes.
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. If using the .service
file from step 8. all VMware services can be started with:
# systemctl start vmware
otherwise use:
# /etc/init.d/vmware start
Kernel headers for version 3.x-xxxx were not found. If you installed them[...]
Install them with:
# pacman -S linux-headers
USB devices not recognized
1) The vmware-USBArbitrator
script is missing
For some reason, some installations are missing the vmware-USBArbitrator
script. To readd it manually see this forum post.
You may also manually extract the VMware bundle and copy the vmware-USBArbitrator
script from <destination folder>/vmware-usbarbitrator/etc/init.d/
to /etc/init.d/
:
$ ./VMware-<edition>-<version>.<release>.<architecture>.bundle --console --extract /tmp/vmware-bundle # cp /tmp/vmware-bundle/vmware-usbarbitrator/etc/init.d/vmware-USBArbitrator /etc/init.d/
2) The vmware-usbarbitrator
binary is segfaulting
This could also mean that the vmware-usbarbitrator
binary called in the script is segfaulting:
# vmware-usbarbitrator --info -f
VTHREAD initialize main thread 2 "usbArb" pid 6426 Segmentation fault
This is caused by an empty /etc/arch-release
(owned by filesystem). It is used by the service to alter its behavior based on the distribution's release version.
To fix it, add a version string in the form of <year>.<month>(.<day>)
(e.g. 2012.10.06
).
process XXXX: Attempt to remove filter function[...]
The full error is, for example:
process 6094: Attempt to remove filter function 0xadcc96f0 user data 0xb795aba0, but no such filter has been added D-Bus not built with -rdynamic so unable to print a backtrace Aborted
This means that the hal daemon is not running. Install halAUR from the AUR and start the daemon with:
# hald
The installer fails to start
If you just get back to the prompt when opening the .bundle
, then you probably have a deprecated or broken 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
Incorrect login/password when trying to access VMware remotely
VMware Workstation 9 provides the possibility to remotely manage Shared VMs through the vmware-workstation-server
service. However, this will fail with the error "incorrect username/password"
due to incorrect PAM configuration of the vmware-authd
service. To fix it, edit /etc/pam.d/vmware-authd
like this:
/etc/pam.d/vmware-authd
#%PAM-1.0 auth required pam_unix.so account required pam_unix.so password required pam_permit.so session required pam_unix.so
and restart VMware services with:
# rc.d restart vmware vmware-workstation-server
Now you can connect to the server with the credentials provided during the installation.
Issues with ALSA output
The following instructions from Bankim Bhavsar's wiki show how to manually adjust the ALSA output device in a VMware .vmx
file. This might help with quality issues or with enabling proper HD audio output:
- Suspend/Power off the VM.
- Run
aplay -L
- If you are interested in playing 5.1 surround sound from the guest, look for
surround51:CARD=vendor-name,DEV=num
. If you are experiencing quality issues, look out for a line starting with front. - Open the
<Virtual machine name>.vmx
config file of the VM in a text editor, located under~/vmware/<Virtual machine name>/
, and edit thesound.fileName
field, e.g.:sound.fileName="surround51:CARD=Live,DEV=0"
. Ensure that it also readssound.autodetect="FALSE"
. - Resume/Power on the VM.
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 have to be removed manually in /sbin/
:
# rm /sbin/insmod /sbin/lsmod /sbin/modinfo /sbin/rmmod
Remember to also remove the .service
file:
# systemctl disable vmware # rm /etc/systemd/system/vmware.service