https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mortl&feedformat=atomArchWiki - User contributions [en]2024-03-29T13:44:16ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=VMware&diff=290011VMware2013-12-22T23:08:39Z<p>Mortl: /* vmci/vsock modules not loading automatically */ I put the workaround out of the thread into the wiki page</p>
<hr />
<div>[[Category:Virtualization]]<br />
[[it:VMware]]<br />
[[ru:VMware]]<br />
[[uk:VMware]]<br />
[[zh-CN:VMware]]<br />
{{Related articles start}}<br />
{{Related|Installing Arch Linux in VMware}}<br />
{{Related|VirtualBox}}<br />
{{Related|KVM}}<br />
{{Related|QEMU}}<br />
{{Related|Xen}}<br />
{{Related|Moving an existing install into (or out of) a virtual machine}}<br />
{{Related articles end}}<br />
<br />
This article is about installing VMware in Arch Linux; you may also be interested in [[Installing Arch Linux in VMware]].<br />
{{Note|This article supports '''only''' the latest major VMware versions, meaning VMware Workstation 10 and VMware Player (Plus) 6.}}<br />
<br />
== Installation ==<br />
<br />
{{Note|VMware Workstation/Player (Plus) will '''not''' be manageable with pacman as the files are not installed with it.}}<br />
<br />
'''1.''' Download the latest [http://www.vmware.com/products/workstation VMware Workstation] or [https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0 VMware Player (Plus)] (you may also try the [https://communities.vmware.com/community/vmtn/beta testing (Beta/RC) versions]).<br />
<br />
'''2.''' Start the installation ({{Ic|--console}} uses terminal instead of the GUI):<br />
$ chmod +x VMware-''edition''-''version''.''release''.''architecture''.bundle<br />
# ./VMware-''edition''-''version''.''release''.''architecture''.bundle --console<br />
<br />
{{Note|To ignore fatal errors use {{ic|--ignore-errors}} or {{ic|-I}}.}}<br />
<br />
'''3.''' Read and accept the main application and the [https://www.vmware.com/support/developer/ovf/ OVF Tool component] EULAs to continue.<br />
<br />
'''4.''' (optional) Enter license key.<br />
<br />
'''5.''' During the install you will get an error about {{ic|"No rc*.d style init script directories"}} being given to the installer. This can, however, be safely ignored since Arch now uses [[systemd]].<br />
<br />
== Configuration ==<br />
<br />
{{Tip|There is also a package called {{AUR|vmware-patch}} in the [[Arch User Repository|AUR]] with the intention of trying to automate this section (it also supports older VMware versions).}}<br />
<br />
{{Note|Ensure you have installed the correct headers required for building the modules ({{Pkg|linux}} from {{ic|[core]}} uses {{Pkg|linux-headers}}).}}<br />
<br />
=== VMware module patches and installation ===<br />
<br />
VMware Workstation 10.0.1 and Player (Plus) 6.0.1 support kernels up to 3.12.<br />
<br />
=== Systemd service ===<br />
<br />
'''6.''' (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]):<br />
<br />
{{hc|/etc/systemd/system/vmware.service|<br />
2=[Unit]<br />
Description=VMware daemon<br />
<br />
[Service]<br />
ExecStart=/etc/init.d/vmware start<br />
ExecStop=/etc/init.d/vmware stop<br />
PIDFile=/var/lock/subsys/vmware<br />
TimeoutSec=0<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
To start the [[daemon]] on boot, enable the [[systemd]] service {{ic|vmware}}.<br />
<br />
== Launching the application ==<br />
<br />
'''7.''' Now, open your VMware Workstation ({{Ic|vmware}} in the console) or VMware Player (Plus) ({{Ic|vmplayer}} in the console) to configure & use!<br />
<br />
{{Tip|To (re)build the modules from terminal, use:<br />
# vmware-modconfig --console --install-all<br />
}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Entering the Workstation License Key ===<br />
<br />
==== From terminal ====<br />
<br />
# /usr/lib/vmware/bin/vmware-vmx-debug --new-sn XXXXX-XXXXX-XXXXX-XXXXX-XXXXX<br />
<br />
Where {{ic|XXXXX-XXXXX-XXXXX-XXXXX-XXXXX}} is your license key.<br />
<br />
{{Note|The {{ic|-debug}} binary informs the user of an incorrect license.}}<br />
<br />
==== From GUI ====<br />
<br />
If the above doesn't work, you can try:<br />
<br />
# /usr/lib/vmware/bin/vmware-enter-serial<br />
<br />
=== Extracting the VMware BIOS ===<br />
<br />
$ objcopy /usr/lib/vmware/bin/vmware-vmx -O binary -j bios440 --set-section-flags bios440=a bios440.rom.Z<br />
$ 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<br />
<br />
==== Using the modified BIOS ====<br />
<br />
If and when you decide to modify the extracted BIOS you can make your virtual machine use it by moving it to {{ic|~/vmware/''Virtual machine name''}}:<br />
$ mv bios440.rom ~/vmware/''Virtual machine name''/<br />
<br />
then adding the name to the {{ic|''Virtual machine name''.vmx}} file:<br />
{{hc|~/vmware/''Virtual machine name''/''Virtual machine name''.vmx|2=bios440.filename = "bios440.rom"}}<br />
<br />
=== Copy-On-Write (CoW) ===<br />
<br />
CoW comes with some advantages, but can negatively affect performance with large files that have small random writes (e.g. database files and virtual machine images):<br />
<br />
$ chattr +C ~/vmware/''Virtual machine name''/''Virtual machine name''.vmx<br />
<br />
{{Note|1=From the [http://www.linuxhowtos.org/manpages/1/chattr.htm?print=-51 chattr man page]: ''"For btrfs, the {{ic|C}} flag should be set only on new or empty files. If set on a file which already has data blocks, it is undefined when the blocks assigned to the file will be fully stable. If set on a directory, only new files will be affected."''}}<br />
<br />
=== Using DKMS to manage the modules ===<br />
<br />
The Dynamic Kernel Module Support (DKMS) can be used to manage Workstation modules and to void from re-running {{ic|vmware-modconfig}} each time the kernel changes. The following example uses a custom {{ic|Makefile}} to compile and install the modules through {{ic|vmware-modconfig}}. Afterwards they are removed from the current kernel tree.<br />
<br />
==== Preparation ====<br />
<br />
First install {{Pkg|dkms}} from the [[official repositories]].<br />
<br />
Then create a source directory for the {{ic|Makefile}} and the {{ic|dkms.conf}}:<br />
# mkdir /usr/src/vmware-modules-9/<br />
<br />
==== Build configuration ====<br />
<br />
Fetch the files from Git or use the ones below.<br />
<br />
===== 1) Using Git =====<br />
<br />
$ cd /tmp<br />
$ git clone git://github.com/djod4556/dkms-workstation.git<br />
# cp /tmp/dkms-workstation.git/Makefile /tmp/dkms-workstation.git/dkms.conf /usr/src/vmware-modules-9/<br />
<br />
===== 2) Manual setup =====<br />
<br />
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:<br />
<br />
{{hc|/usr/src/vmware-modules-9/dkms.conf|<br />
2=PACKAGE_NAME="vmware-modules"<br />
PACKAGE_VERSION="9"<br />
<br />
MAKE[0]="make all"<br />
CLEAN="make clean"<br />
<br />
BUILT_MODULE_NAME[0]="vmmon"<br />
BUILT_MODULE_LOCATION[0]="modules"<br />
<br />
BUILT_MODULE_NAME[1]="vmnet"<br />
BUILT_MODULE_LOCATION[1]="modules"<br />
<br />
BUILT_MODULE_NAME[2]="vmblock"<br />
BUILT_MODULE_LOCATION[2]="modules"<br />
<br />
BUILT_MODULE_NAME[3]="vmci"<br />
BUILT_MODULE_LOCATION[3]="modules"<br />
<br />
BUILT_MODULE_NAME[4]="vsock"<br />
BUILT_MODULE_LOCATION[4]="modules"<br />
<br />
DEST_MODULE_LOCATION[0]="/extra/vmware"<br />
DEST_MODULE_LOCATION[1]="/extra/vmware"<br />
DEST_MODULE_LOCATION[2]="/extra/vmware"<br />
DEST_MODULE_LOCATION[3]="/extra/vmware"<br />
DEST_MODULE_LOCATION[4]="/extra/vmware"<br />
<br />
AUTOINSTALL="yes"<br />
}}<br />
<br />
and now the {{ic|Makefile}}:<br />
<br />
{{hc|/usr/src/vmware-modules-9/Makefile|<br />
2=KERNEL := $(KERNELRELEASE)<br />
HEADERS := /usr/src/linux-$(KERNEL)/include<br />
GCC := $(shell vmware-modconfig --console --get-gcc)<br />
DEST := /lib/modules/$(KERNEL)/vmware<br />
<br />
TARGETS := vmmon vmnet vmblock vmci vsock<br />
<br />
LOCAL_MODULES := $(addsuffix .ko, $(TARGETS))<br />
<br />
all: $(LOCAL_MODULES)<br />
mkdir -p modules/<br />
mv *.ko modules/<br />
rm -rf $(DEST)<br />
depmod<br />
<br />
/usr/src/linux-$(KERNEL)/include/linux/version.h:<br />
ln -s /usr/src/linux-$(KERNEL)/include/generated/uapi/linux/version.h /usr/src/linux-$(KERNEL)/include/linux/<br />
<br />
%.ko: /usr/src/linux-$(KERNEL)/include/linux/version.h<br />
vmware-modconfig --console --build-mod -k $(KERNEL) $* $(GCC) $(HEADERS) vmware/<br />
cp -f $(DEST)/$*.ko .<br />
<br />
clean:<br />
rm -rf modules/<br />
<br />
<br />
}}<br />
<br />
==== Installation ====<br />
<br />
The modules can then be registered:<br />
<br />
# dkms -m vmware-modules -v 9 -k $(uname -r) add<br />
<br />
built:<br />
<br />
# dkms -m vmware-modules -v 9 -k $(uname -r) build<br />
<br />
and installed:<br />
<br />
# dkms -m vmware-modules -v 9 -k $(uname -r) install<br />
<br />
If everything went well, the modules will now be recompiled automatically the next time the kernel changes.<br />
<br />
== Troubleshooting ==<br />
<br />
=== vmci/vsock modules not loading automatically === <br />
<br />
This problem is caused by an issue in the {{ic|/etc/init.d/vmware}} script:<br />
<br />
Starting VMware services:<br />
Virtual machine monitor done<br />
Virtual machine communication interface failed<br />
VM communication interface socket family failed<br />
Blocking file system done<br />
Virtual ethernet done<br />
VMware Authentication Daemon done<br />
<br />
A workaround that was posted by "haagch" is that in vmwareStartVmci() you change vmwareLoadModule "$mod" to vmwareLoadModule "$vmci" and in vmwareStartVsock() vmwareLoadModule "$mod" to vmwareLoadModule "$vsock" and the same for vmwareStopVsock() and vmwareStopVmci().<br />
<br />
See also [https://bbs.archlinux.org/viewtopic.php?id=169472 this].<br />
<br />
=== Could not open /dev/vmmon: No such file or directory. ===<br />
<br />
The full error is:<br />
Could not open /dev/vmmon: No such file or directory.<br />
Please make sure that the kernel module `vmmon' is loaded.<br />
<br />
This means that at least the {{Ic|vmmon}} VMware service is not running. If using the [[systemd]] service from [[#Systemd_service|step 8.]] it should be restarted.<br />
<br />
=== Kernel headers for version 3.x-xxxx were not found. If you installed them[...] ===<br />
<br />
Install the headers ({{Pkg|linux-headers}}).<br />
<br />
{{Note|Upgrading the kernel and the headers will require you to boot to the new kernel to match the version of the headers. This is a relatively common error.}}<br />
<br />
=== USB devices not recognized ===<br />
<br />
{{Tip|Also handled by {{AUR|vmware-patch}}.}}<br />
<br />
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].<br />
<br />
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/}}:<br />
$ ./VMware-''edition''-''version''.''release''.''architecture''.bundle --extract /tmp/vmware-bundle<br />
# cp /tmp/vmware-bundle/vmware-usbarbitrator/etc/init.d/vmware-USBArbitrator /etc/init.d/<br />
<br />
=== The installer fails to start ===<br />
<br />
If you just get back to the prompt when opening the {{ic|.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|uninstallation]] section of this article):<br />
# rm -r /etc/vmware-installer<br />
<br />
=== Incorrect login/password when trying to access VMware remotely ===<br />
<br />
VMware Workstation 10 provides the possibility to remotely manage Shared VMs through the {{ic|vmware-workstation-server}} service. However, this will fail with the error {{ic|"incorrect username/password"}} due to incorrect PAM configuration of the {{ic|vmware-authd}} service. To fix it, edit {{ic|/etc/pam.d/vmware-authd}} like this:<br />
<br />
{{hc|/etc/pam.d/vmware-authd|<br />
#%PAM-1.0<br />
auth ''required pam_unix.so''<br />
account ''required pam_unix.so''<br />
password ''required pam_permit.so''<br />
session ''required pam_unix.so''<br />
}}<br />
<br />
and restart the {{ic|vmware}} [[systemd]] service.<br />
<br />
Now you can connect to the server with the credentials provided during the installation.<br />
<br />
{{Note|{{Pkg|libxslt}} may be required for starting virtual machines.}}<br />
<br />
=== Issues with ALSA output ===<br />
<br />
The following instructions from [http://bankimbhavsar.blogspot.co.nz/2011/09/hd-audio-in-vmware-fusion-4-and-vmware.html Bankim Bhavsar's wiki] show how to manually adjust the [[ALSA]] output device in a VMware {{ic|.vmx}} file. This might help with quality issues or with enabling proper HD audio output:<br />
<br />
# Suspend/Power off the VM.<br />
# Run {{ic|aplay -L}}<br />
# If you are interested in playing 5.1 surround sound from the guest, look for {{ic|1=surround51:CARD=vendor-name,DEV=num}}. If you are experiencing quality issues, look out for a line starting with front. <br />
# Open the {{ic|''Virtual machine name''.vmx}} config file of the VM in a text editor, located under {{ic|~/vmware/''Virtual machine name''/}}, and edit the {{ic|sound.fileName}} field, e.g.: {{ic|1=sound.fileName="surround51:CARD=Live,DEV=0"}}. Ensure that it also reads {{ic|1=sound.autodetect="FALSE"}}.<br />
# Resume/Power on the VM.<br />
<br />
=== Kernel-based Virtual Machine (KVM) is running ===<br />
To disable {{ic|KVM}} on boot, you can use something like:<br />
<br />
{{hc|/etc/modprobe.d/vmware.conf|<br />
blacklist kvm<br />
blacklist kvm-amd # For AMD CPUs<br />
blacklist kvm-intel # For Intel CPUs<br />
}}<br />
<br />
== Uninstallation ==<br />
<br />
To uninstall VMware you need the product name (either {{ic|vmware-workstation}} or {{ic|vmware-player}}). To list all the installed products:<br />
$ vmware-installer -l<br />
<br />
and uninstall with:<br />
# vmware-installer -u ''vmware-product''<br />
<br />
Remember to also disable and remove the {{ic|vmware}} service:<br />
# systemctl disable vmware<br />
# rm /etc/systemd/system/vmware.service<br />
<br />
You may also want to have a look at the module directories in {{ic|/usr/lib/modules/''[kernel name]''/misc/}} for any leftovers.</div>Mortl