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

From ArchWiki
Jump to: navigation, search
m (Preparations)
m (Preparations)
Line 25: Line 25:
 
We will have to make them ourself :
 
We will have to make them ourself :
  
mkdir -p /etc/vmware-tools/init.d
+
mkdir -p /etc/vmware-tools/init.d
  
cd /etc/vmware-tools .
+
cd /etc/vmware-tools .
  
mkdir rc0.d #
+
mkdir rc0.d #
mkdir rc1.d #
+
mkdir rc1.d #
mkdir rc2.d #
+
mkdir rc2.d #
mkdir rc3.d #
+
mkdir rc3.d #
mkdir rc4.d #
+
mkdir rc4.d #
mkdir rc5.d #  
+
mkdir rc5.d #  
mkdir rc6.d #
+
mkdir rc6.d #
  
  
Line 44: Line 44:
 
'''Problem #2:'''
 
'''Problem #2:'''
  
The script checks for an entry in the kernel header's version.h file, that does not exist there. We'll paste it into the file with the following command:
+
The vmware-tools installer checks for an entry in the kernel header's version.h file, that does not exist there. We'll paste it into the file with the following command:
  
echo "#define UTS_RELEASE \"`uname -r`\"" >> /usr/src/linux-`uname -r`\/include/linux/version.h
+
echo "#define UTS_RELEASE \"`uname -r`\"" >> /usr/src/linux-`uname -r`\/include/linux/version.h
 +
 
 +
Check if it is done right:
 +
 
 +
cat /usr/src/linux-`uname -r`\/include/linux/version.h
 +
 
 +
#define LINUX_VERSION_CODE 132627
 +
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
 +
#define UTS_RELEASE "2.6.19-ARCH"
  
 
=== Start the Installer ===
 
=== Start the Installer ===

Revision as of 09:46, 15 December 2006

Installing archlinux inside a VM (e.g. in VMWare running on Windows XP) works without trouble; however, VMWare-tools for Linux guests will not install onto an archlinux on VM 'out of the box.' Below is a rough guide that may help (this needs revision, since it was written by a n00b :P).

Remark: you may not need VMWare-tools at all, depending what you want to do. You need them for higher X screen resolutions, shared folders with the host OS, and some other things.

The Procedure

Most of this expects that you are root. Versions of things used at time of writing: archlinux with kernel 2.6.17-3 / Xorg 7.1 installed on VMWare Workstation 5.5.2 build-29772 running on a Archlinux host

Also tested with kernel 2.6.18-2 from testing repo

Preparations

(Some important parts of this procedure were adapted from/inspired by a page called VMWare on Slackware Linux; more technical information that this author does not pretend to understand is there.)

(directory paths have been chosen similar to those used in the vmware-workstation AUR package)

This guide assumes the user is installing from the .tar.gz package (not the .rpm). see http://www.vmware.com/support/ws55/doc/ws_newguest_tools_linux.html for details

Problem #1: The VMWare-tools install script (vmware-install.pl) expects a directory containing rc0.d to rc6.d and init.d but archlinux doesn't have those. We will have to make them ourself :

mkdir -p /etc/vmware-tools/init.d
cd /etc/vmware-tools .
mkdir rc0.d #
mkdir rc1.d #
mkdir rc2.d #
mkdir rc3.d #
mkdir rc4.d #
mkdir rc5.d # 
mkdir rc6.d #


Create a link from /etc/rc.d/network to /etc/vmware-tools/init.d

ln -s /etc/rc.d/network /etc/vmware-tools/init.d/network

Problem #2:

The vmware-tools installer checks for an entry in the kernel header's version.h file, that does not exist there. We'll paste it into the file with the following command:

echo "#define UTS_RELEASE \"`uname -r`\"" >> /usr/src/linux-`uname -r`\/include/linux/version.h

Check if it is done right:

cat /usr/src/linux-`uname -r`\/include/linux/version.h
#define LINUX_VERSION_CODE 132627
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#define UTS_RELEASE "2.6.19-ARCH"

Start the Installer

Go to the place you extracted the installer and run ./vmware-install.pl .

"In which directory do you want to install the binary files?": /opt/vmware-tools/bin

"What is the directory that contains the init directories ... ?": /etc/vmware-tools


For the rest: accept default locations; say yes when a directory creation is needed.

When the installer asks you to run vmware-config-tools.pl answer 'no'

The installer part is done.

Run the Config Script

Run /opt/vmware-tools/bin/vmware-config-tools.pl

The script asks 'What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]' give /usr/src/linux-xxxx-ARCH/include as answer . (xxxx is the number of the kurrent kernel version, at the time of writing 2.6.17.3

It will compile some things, detect Xorg and ask for an X screen resolution; choose one.

Final steps

pacman -S xf86-video-vmware xf86-input-vmmouse

edit /etc/X11/xorg.conf look for Section "InputDevice" Identifier "Mouse1"

change the 2 following lines to this : Driver "vmmouse" Option "Device" "/dev/psaux"


in rc.conf look for the MODULES= line and change it so it looks like this :

MODULES=(!pcnet32 vmxnet)


Reboot and everything should work.

That should be all, folks.

See Also

Installing VMware and Installing vmware player -- the opposite of this ;)