Difference between revisions of "VMware/Installing Arch as a guest"

From ArchWiki
Jump to: navigation, search
m
(Xorg configuration)
(44 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Category:Getting and installing Arch (English)]]
+
[[Category:Getting and installing Arch]]
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]
{{i18n|Installing Arch Linux in VMWare}}
+
[[es:Installing Arch Linux in VMware]]
 +
[[nl:Installing Arch Linux in VMware]]
 +
[[zh-CN:Installing Arch Linux in VMware]]
 +
{{Article summary start}}
 +
{{Article summary text|Installing Archlinux in VMware: open-vm-tools and configuring Xorg}}
 +
{{Article summary heading|Related}}
 +
{{Article summary wiki|VMware}}
 +
{{Article summary wiki|Installing VMWare vCLI}}
 +
{{Article summary wiki|Installing Arch Linux in VMware (systemd)}}
 +
{{Article summary end}}
  
This article will explain how to install Arch Linux inside a virtual machine (e.g. in VMware Workstation on Windows or VMware Fusion on Mac OS X).
+
This article handles installing Archlinux in a VMware-based virtual environment such as VMware ESX, VMware Workstation/Fusion and VMware Player.
  
If using systemd, see: [[Installing_Arch_Linux_in_VMware_(systemd)|Installing Arch Linux in VMware (systemd)]].
+
==VMware Tools versus Open-VM-Tools==
  
You may also be interested in [[VMware|installing VMware in Arch]].
+
VMware Tools for linux exists in 2 forms: the [http://packages.vmware.com/tools official VMware Tools] and Open-VM-Tools. VMware Tools is based on a stable snapshot of Open-VM-Tools. Open-VM-Tools contains more experimental code and features.
 +
The official VMware Tools are not available for Archlinux.
  
== VMware Tools ==
+
Originally, VMware Tools provided the best drivers for network and storage, combined with the functionality for other features such as time synchronization. However, for quite a while now the drivers for the network adapter en scsi adapter are part of the linux kernel, and VMware Tools is only needed for extra features and support for the "old" vmxnet adapter.
The VMware Tools improve networking capability, cut and paste between the host and the guest under X, or access of the directories on host from the guest (called shared folders by VMware). They also provide a set of tools to access advanced options of the Virtual Machine, including shrinking and freeing unnecessary space in the virtual hard drives
+
 
 +
==Open-VM-Tools modules==
 +
 
 +
The open-vm-tools package contains the following modules:
 +
 
 +
* vmblock: kernel filesystem module, enables drag&drop functionality between the host system and the virtual machine in VMware Workstation/Fusion.
 +
* vmhgfs: kernel filesystem module, enables file/directory sharing between the host system and the virtual machine in VMware Workstation/Fusion.
 +
* vmsync: experimental filesystem sync driver, enables filesystem quiescing when creating backups and snapshots.
 +
* vmci: virtual machine communication interface, high performance interface between virtual machines on the same host and between virtual machines and the host itself.
 +
* vsocket: part of vmci.
 +
* vmxnet: driver for the old vmxnet netwerk-adapter.
 +
 
 +
==Open-VM-Tools utilities==
 +
 
 +
The open-vm-tools package comes with the following utilities:
 +
 
 +
* vmtoolsd: service responsible for the virtual machine status report.
 +
* vmware-check-vm: tool to check whether a utility has been started on a physical or virtual machine.
 +
* vmware-xferlogs: Dumps logging/debugging information to the virtual machine logfile.
 +
* vmware-toolbox-cmd: tool to obtain virtual machine information of the host such as statistics,...
 +
* vmware-user-suid-wrapper: tool to enable clipboard sharing (copy/paste) between host and virtual machine.
 +
 
 +
==Installating Open-VM-Tools==
 +
 
 +
Install the {{Pkg|open-vm-tools}} package in the <nowiki>[</nowiki>[[community]]<nowiki>]</nowiki> repository:
  
Install the open-vm-tools package from community
 
 
  pacman -S open-vm-tools
 
  pacman -S open-vm-tools
and start VMware tools with:
 
/etc/rc.d/open-vm-tools start
 
  
To start them automatically at boot, add the daemon to the DAEMONS array in [[rc.conf]].
+
and start the service by running:
DAEMONS=( ... open-vm-tools ... )
+
  
To start the vmware toolbox (allows you to configure time synchronization, connect or disconnect devices, shrink the hard disk freeing unnecessary space, etc), run the following command (you may have to run as root to get full functionality)
+
  rc.d start open-vm-tools
  vmware-toolbox
+
  
{{Note|In previous versions, starting this daemon was not strictly necessary; mouse integration, copy/paste and drag/drop under X would still work, as long as vmware-user was executed. This is no longer the case. Starting with version 2010.07.25 of open-vm-tools, vmware-user is no longer available and its functionality is implemented as a plugin managed by a new daemon (vmtoolsd).}}
+
To start the service during boot, add it to the [[DAEMONS]] area in the {{ic|/etc/[[rc.conf]]}} file.
  
== Installing X ==
+
DAEMONS=(...open-vm-tools...)
  
Beyond installing Xorg (see main article [[Xorg]]), the packages needed in order to be able to use X properly can be installed with
 
# pacman -S xf86-input-vmmouse xf86-video-vmware
 
and the fallback X drivers
 
# pacman -S xf86-video-vesa
 
  
Modern versions of Xorg are automatically configured. If you are using a manual configuration, set the mouse driver to "vmmouse".
+
The open-vm-tools reads the file /etc/arch-release which is empty:
  
=== VMware-user wrapper ===
+
  cat /proc/version > /etc/arch-release
In order for cut/paste and drag/drop to work between VM and host, you need to start the vmware-user wrapper. First make sure it was installed as a suid binary. type the following:
+
  $ ls -l /usr/bin/vmware-user-suid-wrapper
+
You should see something like this:
+
-rwsr-xr-x 1 root root 5768 Aug 20 10:13 /usr/bin/vmware-user-suid-wrapper
+
If you do not see an {{ic|s}} bit in the fourth position, you should enable it by running the following command as root:
+
# chmod 4755 /usr/bin/vmware-user-suid-wrapper
+
  
Once you make sure vmware-user-suid-wrapper is set as a suid binary, you should run it on login by either adding the line
+
==Time synchronization==
vmware-user-suid-wrapper
+
to {{ic|~/.xinitrc}} or {{ic|.xsession}} for startx, or by adding the following file {{ic|$HOME/.config/autostart/vmware-user.desktop}}. You can also create the file in {{ic|/etc/xdg/autostart/vmware-user.desktop}}. This way the file gets loaded when the xorg server gets started.
+
[Desktop Entry]
+
Type=Application
+
Name=VMWare User Agent
+
Exec=vmware-user-suid-wrapper
+
Icon=system-run
+
Comment=Enable Unity, DnD, etc.
+
for e.g. gdm. Note as well that you need to install gtkmm and libnotify for vmware-user to run.
+
  
{{Note|If after executing {{ic|vmware-user-suid-wrapper}} you get the following error:
+
Configuring time synchronization in a virtual machine is important: fluctuations are bound to occur more easily in a virtual machine compared to a physical host. This is mostly due to the fact that the CPU is shared by more than one virtual machine.
vmware-user: error while loading shared libraries: libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory
+
You need to install gtkmm:
+
{{bc|# pacman -S gtkmm}}}}
+
  
== Enable Unity ==
+
There are 2 options to set up time synchronization: the host machine as source or an external server as source.
Unity is installed by default, but needs a bit of work to get it running.
+
First,make sure that open-vm-tools is installed and loaded on startup. If needed, add open-vm-tools to the DAEMONS list.
+
  
Next, add vmware-user-suid-wrapper to autostart either by using your desktop environment's autostart or create a file like {{ic|~/.config/autostart/vmware-user-agent.desktop}} with following contents:
+
===Host machine as time source===
 +
To use the host as a time source (for example in an ESX server), run the following command (one time is enough):
  
 +
vmware-toolbox-cmd timesync enable
 +
 +
To synchronize your guest clock with the host after your host machine wakes up from sleeping (like a laptop computer):
 +
 +
sudo hwclock --hctosys --localtime
 +
 +
I run the above command every time I wake up my sleeping laptop and resume using Arch Linux inside the VMWare Player.
 +
 +
===External server as time source===
 +
 +
See [[NTP]].
 +
 +
==Xorg configuration==
 +
 +
{{Note|To use Xorg in a virtual machine, a minimum of 32MB VGA memory is needed, and the VMware hardware version has to be > 8, version 7 is no longer functioning correctly.}}
 +
 +
Install the following dependencies:
 +
 +
pacman -S xf86-input-vmmouse xf86-video-vmware xf86-video-vesa svga-dri
 +
 +
Add the {{ic|vmwgfx}} module to the MODULES array in {{ic|rc.conf}}.
 +
 +
MODULES=(...vmwgfx...)
 +
 +
Create the following file:
 +
{{hc|/etc/X11/xorg.conf.d/20-gpudriver.conf|
 +
Section "Device"
 +
        Identifier "Card0"
 +
        Driver    "vmware"
 +
EndSection}}
 +
 +
Afterwards, a reboot is required.
 +
 +
For guest screen autofit to work correctly, vmware-user-suid-wrapper must be started after X starts. To do so, create the following file:
 +
 +
{{Note|The open-vm-tools 1:9.2.0-2 package creates this file. Maybe this step can be removed from this wiki?}}
 +
{{hc|/etc/xdg/autostart/vmware-user.desktop|
 
  [Desktop Entry]
 
  [Desktop Entry]
  Type=Application
+
  Type&#61;Application
  Name=VMWare User Agent
+
  Name&#61;VMWare User Agent
  Exec=vmware-user-suid-wrapper
+
  Exec&#61;/usr/bin/vmware-user-suid-wrapper
  Icon=system-run
+
  Icon&#61;system-run}}
Comment=Enable Unity, DnD, etc.
+
  
Log out and restart. Unity will work. Unfortunately at the moment, menus may not display properly, so launch a terminal, switch to Unity and use the terminal to launch whatever you want. If you get an error like
+
Restart X and the guest will resize automatically to the host window after login.
error while loading shared libraries: libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory
+
install gtkmm
+
pacman -S gtkmm
+
  
== Shared Folders with the Host ==
+
==Paravirtual SCSI-Adapter==
  
Create a new Shared Folder by selecting {{ic|VM}} -> {{ic|Settings...}} from the VMware Workstation menu. Select the {{ic|Options}} tab and then {{ic|Shared Folder}}.  Check the {{ic|Always enabled}} option and create a new share.  For Windows XP you can create a share with the Name {{ic|C}} and the Host Path {{ic|C:\}}.
+
Due to less overhead the paravirtual scsi-adapter can give a substantial performance boost in ESX.
  
Then add the following line to your {{ic|/etc/fstab}} file (changing uid/gid as needed):
+
This can be used as follows: open the {{ic|/etc/[[mkinitcpio.conf]]}} file and add the following to the MODULES array:
  
  .host:/ /mnt/hgfs vmhgfs defaults,user,ttl=5,uid=root,gid=root,fmask=0133,dmask=0022 0 0
+
  MODULES=(...vmw_pvscsi...)
  
Make the mount directory and mount the Shared Folders:
+
Afterwards, run the command:
  
  mkdir /mnt/hgfs
+
  mkinitcpio -p linux
mount /mnt/hgfs
+
  
All of your shared folders will now be visible by name under {{ic|/mnt/hgfs}}:
+
Shutdown the virtual machine and change the scsi-adapter type to: {{ic|VMware Paravirtual}}. It's safe to ignore the warning that'll pop up.
  
/mnt/hgfs/<Shared Folder Name>
+
==VMCI==
  
For the Windows XP {{ic|C}} share example:
+
The [http://www.vmware.com/support/developer/vmci-sdk VMCI interface] is enabled by default in VMware Workstation and Fusion. In VMware ESX the interface is restricted, which means that communication is only possible between ESX and the virtual machine, not between virtual machines themselves. This can be changed in the Virtual Machine settings, traffic between ESX and the Virtual Machine can not be disabled.
  
ls /mnt/hgfs/C
+
==DRAG AND DROP==
... all your Windows files under C:\ ...
+
  
== Final touch ==
+
Drag and Drop from files, from VMware Workstation/Fusion into the Virtual Machines, can be disabled by editing {{ic|/etc/conf.d/open-vm-tools}}:
  
=== Prune mlocate DB ===
+
VM_DRAG_AND_DROP="no"
  
It is useless to add the shared directories to the {{ic|locate DB}}. Add the shared directories to {{ic|PRUNEPATHS}} in {{ic|/etc/updatedb}}.
+
==COPY AND PASTE==
  
== Paravirtualization ==
+
Install the following package (it is required for copy/paste but not listed as a dependency as reported [https://bbs.archlinux.org/viewtopic.php?id=141607 here])
  
=== Description ===
+
pacman -S gtkmm
  
[[wikipedia:Paravirtualization|Paravirtualization]] (PV) is a virtualization feature\technique that allows some of the processing, which in an ideal virtualized environment happens inside the virtualization to be done outside of the virtualized context. This will, in most cases, greatly improve the base line performance of a virtual machine. Although in some cases, depending on many variables, it will not.
+
Run the following command after starting X (or add it to your {{ic|~/.xinitrc}} file) to automatically synchronize your X clipboard with the host's. This allows you to copy text from your virtual machine and paste it in the host, and vice versa.
  
With the to-date distributions of Arch, PV works out of the box.
+
vmware-user-suid-wrapper
  
On newer x86 and x86-64 CPU models (Both AMD and Intel) PV is implemented as a hardware feature and no additional configuration is required.
+
If you get the following error (which, in rare cases, you might have to run `strace vmware-user-suid-wrapper` to see it!)
For older CPU models, You must enable the deprecated VMI protocol that introduces modifications to the guest kernel that makes it aware of the fact that it is virtualized. (Microsoft refers to this as an Enlightened Guest OS)
+
  
=== VMI Retired ===
+
vmware-user: could not open /proc/fs/vmblock/dev
  
VMWare PV was once implemented as the VMI (Virtual Machine Interface) standard.
+
you need to first insert the vmblock module into your kernel.
  
In 2009, VMware announced they would [http://blogs.vmware.com/guestosguide/2009/09/vmi-retirement.html stop supporting VMI] in 2011. The Linux kernel [http://blog.quiettech.org/?p=780 should remove the VMI code] around version 2.6.37. VMI still remains useful since it allows for PV on older CPUs and Arch Linux is well built for a Linux VM Guest on hosts with low resources. VMI offers a tremendous impact on the VM performance under these circumstances.
+
sudo modprobe vmblock
  
In updated vmware products (Workstation 7+ and ESX 4+) VMI is retired. The functionality that was implemented in VMI and not covered by the improvements in modern CPUs is now implemented by the newer VMCI standard.
+
To have the module loaded at boot, add "vmblock" to the modules section of your /etc/rc.conf file.
Again, on to-date Arch Linux and open-vm-tools installations, VMCI works OOB and should not pose any problems. If you do encounter issues then the [http://communities.vmware.com/index.jspa Vmware Community] forums will offer all the aid you need.
+
  
On Vmware Workstation products VMCI is enabled by default. On Vmware ESX products VMCI is disabled by default on the basis that it COULD pose a security risk. You can enable or disable VMCI through the VM settings screen.
+
===Rebuilding the vmblock module===
VMCI provides extra features, as well as a generic platform, for the area of Guest-To-Host communication.
+
  
=== VMI Installation ===
+
If your kernel already has the vmblock module loaded,
  
You must install the {{ic|open-vm-tools}} before enabling {{ic|VMI}}.
+
lsmod | grep vmblock
  
To enable {{ic|VMI}} click on {{ic|Settings...}} from the VM menu. Select the {{ic|Processors device}} and enable {{ic|VMWare kernel paravirtualization}}.
+
and vmware-user-suid-wrapper still doesn't work, then you'll have to build the open-vm-tools-modules package yourself from the [[Arch Build System]]:
  
Once Arch is up and running you can check if you have {{ic|VMI}} enabled or not by running the following command:
+
sudo abs community/open-vm-tools-modules
  $ dmesg | grep vmi
+
cp -R /var/abs/community/open-vm-tools-modules/ .
 +
cd ./open-vm-tools-modules/
 +
makepkg -s
 +
  pacman -U open-vm-tools-modules-*.xz
  
If VMI is enabled you should see an output such as:
+
Afterwards, restart your machine for the newly rebuilt & re-installed modules to take effect!
Booting paravirtualized kernel on vmi [deprecated]
+
vmi: registering clock event vmi-timer. mult=9202214 shift=22
+
vmi: registering clock event vmi-timer. mult=9202214 shift=22
+
vmi: registering clock source khz=2193979
+
Switching to clocksource vmi-timer
+
  
=== VMCI Installation ===
+
== Shared Folders with the Host ==
  
To verify that {{ic|VMCI}} is up and running, run the following command:
+
{{Note| This functionality is only available in VMware Workstation and Fusion}}
$ dmesg | grep vmci
+
  
If {{ic|VMCI}} is enabled you should see an output such as:
+
Create a new Shared Folder by selecting {{ic|VM}} -> {{ic|Settings...}} in the VMware Workstation menu. Select the {{ic|Options}} tab and then {{ic|Shared Folder}}. Enable the {{ic|Always enabled}} option and create a new shareFor Windows XP, you can create a share named {{ic|C}} with the Host Path {{ic|C:\}}.
Probing for vmci/PCI.
+
vmci 0000:00:07.7: PCI INT A -> GSI (level, low) -> IRQ 16
+
Found vmci/PCI at 0x1080, irq 16.
+
  Registered vmci device.
+
  
== Troubleshooting ==
+
Add the following rule to {{ic|/etc/fstab}} (adjust the uid/gid where needed) for each shared folder:
  
=== Networking ===
+
.host:/shared_folder /mnt/shared vmhgfs defaults,user,ttl=5,uid=root,gid=root,fmask=0133,dmask=0022 0 0
  
If there is a problem with networking, it is possible that the module {{ic|pcnet32}} steals the network interface from VMware, disabling it works:  
+
Create the mount directories and Shared Folders:
MODULES=(!pcnet32 ...)
+
  
=== Keyboard/Mouse not working in X ===
+
mkdir /mnt/shared
 +
mount /mnt/shared
  
If you have no keyboard or mouse in X make sure you don't have the following line in the {{ic|ServerFlags}} section of your Xorg configuration. Consult [[Xorg#InputClasses]] for further assistance:
+
Temporary mounts are also possible:
 +
 
 +
mount -t -v -o rw .host:/shared_folder /mnt/shared
 +
 
 +
{{Note| an alternative way, tested on VMware player}}
 +
 
 +
.host:/ /mnt/shared vmhgfs defaults 0 0
 +
mount -t vmhgfs .host:/ /mnt/shared
 +
=== Prune mlocate DB ===
  
Remove Option "AutoAddDevices" "False"
+
When using mlocate, it's useless to index the shared directories in the {{ic|locate DB}}. Therefore, add the directories to {{ic|PRUNEPATHS}} in {{ic|/etc/updatedb}}.

Revision as of 23:39, 9 November 2012

Summary help replacing me
Installing Archlinux in VMware: open-vm-tools and configuring Xorg
Related
VMware
Installing VMWare vCLI
Installing Arch Linux in VMware (systemd)

This article handles installing Archlinux in a VMware-based virtual environment such as VMware ESX, VMware Workstation/Fusion and VMware Player.

VMware Tools versus Open-VM-Tools

VMware Tools for linux exists in 2 forms: the official VMware Tools and Open-VM-Tools. VMware Tools is based on a stable snapshot of Open-VM-Tools. Open-VM-Tools contains more experimental code and features. The official VMware Tools are not available for Archlinux.

Originally, VMware Tools provided the best drivers for network and storage, combined with the functionality for other features such as time synchronization. However, for quite a while now the drivers for the network adapter en scsi adapter are part of the linux kernel, and VMware Tools is only needed for extra features and support for the "old" vmxnet adapter.

Open-VM-Tools modules

The open-vm-tools package contains the following modules:

  • vmblock: kernel filesystem module, enables drag&drop functionality between the host system and the virtual machine in VMware Workstation/Fusion.
  • vmhgfs: kernel filesystem module, enables file/directory sharing between the host system and the virtual machine in VMware Workstation/Fusion.
  • vmsync: experimental filesystem sync driver, enables filesystem quiescing when creating backups and snapshots.
  • vmci: virtual machine communication interface, high performance interface between virtual machines on the same host and between virtual machines and the host itself.
  • vsocket: part of vmci.
  • vmxnet: driver for the old vmxnet netwerk-adapter.

Open-VM-Tools utilities

The open-vm-tools package comes with the following utilities:

  • vmtoolsd: service responsible for the virtual machine status report.
  • vmware-check-vm: tool to check whether a utility has been started on a physical or virtual machine.
  • vmware-xferlogs: Dumps logging/debugging information to the virtual machine logfile.
  • vmware-toolbox-cmd: tool to obtain virtual machine information of the host such as statistics,...
  • vmware-user-suid-wrapper: tool to enable clipboard sharing (copy/paste) between host and virtual machine.

Installating Open-VM-Tools

Install the open-vm-tools package in the [community] repository:

pacman -S open-vm-tools

and start the service by running:

rc.d start open-vm-tools

To start the service during boot, add it to the DAEMONS area in the /etc/rc.conf file.

DAEMONS=(...open-vm-tools...)


The open-vm-tools reads the file /etc/arch-release which is empty:

cat /proc/version > /etc/arch-release

Time synchronization

Configuring time synchronization in a virtual machine is important: fluctuations are bound to occur more easily in a virtual machine compared to a physical host. This is mostly due to the fact that the CPU is shared by more than one virtual machine.

There are 2 options to set up time synchronization: the host machine as source or an external server as source.

Host machine as time source

To use the host as a time source (for example in an ESX server), run the following command (one time is enough):

vmware-toolbox-cmd timesync enable

To synchronize your guest clock with the host after your host machine wakes up from sleeping (like a laptop computer):

sudo hwclock --hctosys --localtime

I run the above command every time I wake up my sleeping laptop and resume using Arch Linux inside the VMWare Player.

External server as time source

See NTP.

Xorg configuration

Note: To use Xorg in a virtual machine, a minimum of 32MB VGA memory is needed, and the VMware hardware version has to be > 8, version 7 is no longer functioning correctly.

Install the following dependencies:

pacman -S xf86-input-vmmouse xf86-video-vmware xf86-video-vesa svga-dri

Add the vmwgfx module to the MODULES array in rc.conf.

MODULES=(...vmwgfx...)

Create the following file:

/etc/X11/xorg.conf.d/20-gpudriver.conf
 Section "Device"
        Identifier "Card0"
        Driver     "vmware"
 EndSection

Afterwards, a reboot is required.

For guest screen autofit to work correctly, vmware-user-suid-wrapper must be started after X starts. To do so, create the following file:

Note: The open-vm-tools 1:9.2.0-2 package creates this file. Maybe this step can be removed from this wiki?
/etc/xdg/autostart/vmware-user.desktop
 [Desktop Entry]
 Type=Application
 Name=VMWare User Agent
 Exec=/usr/bin/vmware-user-suid-wrapper
 Icon=system-run

Restart X and the guest will resize automatically to the host window after login.

Paravirtual SCSI-Adapter

Due to less overhead the paravirtual scsi-adapter can give a substantial performance boost in ESX.

This can be used as follows: open the /etc/mkinitcpio.conf file and add the following to the MODULES array:

MODULES=(...vmw_pvscsi...)

Afterwards, run the command:

mkinitcpio -p linux

Shutdown the virtual machine and change the scsi-adapter type to: VMware Paravirtual. It's safe to ignore the warning that'll pop up.

VMCI

The VMCI interface is enabled by default in VMware Workstation and Fusion. In VMware ESX the interface is restricted, which means that communication is only possible between ESX and the virtual machine, not between virtual machines themselves. This can be changed in the Virtual Machine settings, traffic between ESX and the Virtual Machine can not be disabled.

DRAG AND DROP

Drag and Drop from files, from VMware Workstation/Fusion into the Virtual Machines, can be disabled by editing /etc/conf.d/open-vm-tools:

VM_DRAG_AND_DROP="no"

COPY AND PASTE

Install the following package (it is required for copy/paste but not listed as a dependency as reported here)

pacman -S gtkmm

Run the following command after starting X (or add it to your ~/.xinitrc file) to automatically synchronize your X clipboard with the host's. This allows you to copy text from your virtual machine and paste it in the host, and vice versa.

vmware-user-suid-wrapper

If you get the following error (which, in rare cases, you might have to run `strace vmware-user-suid-wrapper` to see it!)

vmware-user: could not open /proc/fs/vmblock/dev

you need to first insert the vmblock module into your kernel.

sudo modprobe vmblock

To have the module loaded at boot, add "vmblock" to the modules section of your /etc/rc.conf file.

Rebuilding the vmblock module

If your kernel already has the vmblock module loaded,

lsmod | grep vmblock

and vmware-user-suid-wrapper still doesn't work, then you'll have to build the open-vm-tools-modules package yourself from the Arch Build System:

sudo abs community/open-vm-tools-modules
cp -R /var/abs/community/open-vm-tools-modules/ .
cd ./open-vm-tools-modules/
makepkg -s
pacman -U open-vm-tools-modules-*.xz

Afterwards, restart your machine for the newly rebuilt & re-installed modules to take effect!

Shared Folders with the Host

Note: This functionality is only available in VMware Workstation and Fusion

Create a new Shared Folder by selecting VM -> Settings... in the VMware Workstation menu. Select the Options tab and then Shared Folder. Enable the Always enabled option and create a new share. For Windows XP, you can create a share named C with the Host Path C:\.

Add the following rule to /etc/fstab (adjust the uid/gid where needed) for each shared folder:

.host:/shared_folder /mnt/shared vmhgfs defaults,user,ttl=5,uid=root,gid=root,fmask=0133,dmask=0022 0 0

Create the mount directories and Shared Folders:

mkdir /mnt/shared
mount /mnt/shared

Temporary mounts are also possible:

mount -t -v -o rw .host:/shared_folder /mnt/shared
Note: an alternative way, tested on VMware player
.host:/ /mnt/shared vmhgfs defaults 0 0
mount -t vmhgfs .host:/ /mnt/shared

Prune mlocate DB

When using mlocate, it's useless to index the shared directories in the locate DB. Therefore, add the directories to PRUNEPATHS in /etc/updatedb.