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

From ArchWiki
Jump to navigation Jump to search
(A more suitable cron)
(A more suitable cron)
Line 103: Line 103:
and edit the system crontab so that it looks like
and edit the system crontab so that it looks like
  @lh /usr/sbin/run-cron /etc/cron.hourly
  @ 1h /usr/sbin/run-cron /etc/cron.hourly
  @ld /usr/sbin/run-cron /etc/cron.daily
  @ 1d /usr/sbin/run-cron /etc/cron.daily
  @lw /usr/sbin/run-cron /etc/cron.weekly
  @ 1w /usr/sbin/run-cron /etc/cron.weekly
  @lm /usr/sbin/run-cron /etc/cron.monthly
  @ 1m /usr/sbin/run-cron /etc/cron.monthly
=== Prune mlocate DB ===
=== Prune mlocate DB ===

Revision as of 08:07, 15 May 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Installing Arch

Installing Arch Linux inside a VM (e.g. in VMWare running on Windows XP or using VMWare fusion on MacOS) works without trouble.

Removing the pata and sata hooks from /etc/mkinitcpio.conf does not cause problems. VMWare emulates an scsi drive (an ancestor of sata).

VM Tools

The VM 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 vm ware)

Install the open-vm-tools package from community

pacman -Sy open-vm-tools

and start VMware tools with:

/etc/rc.d/open-vm-tools start

To start them automatically at boot, add the deamon to your /etc/rc.conf deamon array

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

Installing X

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-input-mouse xf86-video-vesa

then configure X

# pacman -S hwd
# hwd -x
# cp /etc/X11/xorg.conf.vmware /etc/X11/xorg.conf

and edit /etc/X11/xorg.conf to set the mouse driver to vmmouse.

Start X (see main article).

A client software needs to run in order for cut and paste to work, start vmware-user (it should not run as root) on login by either adding the line


to .xinitrc or .xsession for startx or by adding the following file $HOME/.config/autostart/vmware-user.desktop

[Desktop Entry]
Name=VMWare User Agent
Comment=Enable Unity, DnD, etc.

for e.g. gdm.

Enable Unity

Unity is not install by default because the package uriparser is not maintained, although it is in aur. However, it works very well. To enable support for unity, you need to use the Arch Building System (see main article ABS).

Retrieve and compile uriparser

# abs
$ mkdir -p ~/arch.abs/
$ cd ~/arch.abd
$ mkdir -p aur/uriparser
$ cd aur/uriparser
$ wget aur.archlinux.org/packages/uriparser/uriparser/PKGBUILD
$ makepkg -s
$ sudo pacman -U --asdeps uriparser-*.pkg.tar.gz

Then modify the two packages modules/open-vm-tools-modules and system/open-vm-tools available from community and remove --disable-unity from the configure line. Then recompile them, starting with the modules, install with

$ makepkg -s
$ sudo pacman -U --asdeps open-vm-modules-*.pkg.tar.gz

and finally the tools, install with

$ makepkg -s
$ sudo pacman -U open-vm-tools-*.pkg.tar.gz

no --asdeps here.

Reboot, Unity should be enabled once vmware-user is running.

Shared Folders with the Host

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

Then add the following line to you /etc/fstab file (changing uid/gid as needed):

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

Make the mount directory and mount the Shared Folders:

mkdir /mnt/hgfs
mount /mnt/hgfs

All of your shared folders will now be visible by name under /mnt/hgfs

/mnt/hgfs/<Shared Folder Name>

For the Windows XP C share example:

ls /mnt/hgfs/C
... all your Windows files under C:\ ...

Final touch

A more suitable cron

The arch guest is most likely neither running the whole time nor rebooted often. The default crond is therefore inappropriate. Change crond for fcron

# pacman -S fcron

and edit the system crontab so that it looks like

@ 1h /usr/sbin/run-cron /etc/cron.hourly
@ 1d /usr/sbin/run-cron /etc/cron.daily
@ 1w /usr/sbin/run-cron /etc/cron.weekly
@ 1m /usr/sbin/run-cron /etc/cron.monthly

Prune mlocate DB

It is also useless to add the shared directories to the locate DB. Add the shared directories to PRUNEPATHS in /etc/updatedb



If there is a problem with networking, it is possible that the module pcnet32 steals the network interface from vmware, disabling it works,

MODULES=(!pcnet32 ...)

See Also