So I’ve been working on building out a series of virtual machines to play with a variety of things. My goal is to build a bunch of virtual machines using Virtual Server 2005 R2 SP1. You might ask why VS2005R2SP1? Well, for one, I work for Microsoft. Another is that I’ve got another machine at home (a 2U VALinux 2200) running CentOS with VMWare Server 1.0.4 already — it needs to be updated to 1.0.5 — but I’ll deal with that later. I want to play with Virtual Server as well…but I’ve hit a few snags.

I’ve installed two systems at this point:

A Windows Server 2003 R2 system and
A CentOS 5.1 system

Obviously the Windows Server 2003 R2 system was easy. The CentOS 5.1 system was no nearly so. Here’s some notes:

1. Install using the ‘text’ option — if you try and use the graphics option then it’ll crash. Not a big deal
2. Once installed you need to add a variety of options to the grub boot line to make things like clock synchronization and the mouse work. Thanks to Todd Ogasawara’s Tech Blog for pointing me in the right direction on the kernel parameters.
3. I did, however, discover that the mouse still wouldn’t work without the proper X11 config (go figure). So, I did some digging around and this is what I found:

1. cat /proc/bus/input/devices/ to identify the device files:

[root@centos ~]# cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

Notice the values for NAME, Phys, and Sysfs. We’ll need those for the xorg.conf file.

I: Bus=0011 Vendor=0002 Product=000a Version=0000
N: Name=”TPPS/2 IBM TrackPoint”
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name=”PC Speaker”
P: Phys=isa0061/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=40001
B: SND=6

2. When you add the kernel boot parameter i8042.noloop in order to get the mouse to work device files are created in /dev/input:

[root@centos ~]# ls -l /dev/input
total 0
crw------- 1 root root 13, 64 Mar 24 07:42 event0
crw------- 1 root root 13, 65 Mar 24 07:42 event1
crw------- 1 root root 13, 66 Mar 24 07:42 event2
crw------- 1 root root 13, 63 Mar 24 07:42 mice
crw------- 1 root root 13, 32 Mar 24 07:42 mouse0
[root@centos ~]#

It’s important to note this as you need to decide which device file to use in the xorg.conf file. In the end, on my system, it turns out that the device file ‘mice’ was appropriate and worked.

3. Create the xorg.conf config section for the mouse:

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
Option "Protocol" "explorerps/2"
Option "Name" "TPPS/2 IBM TrackPoint"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5" # wheel moves forward/back in the browser
EndSection

Once you’ve done this you can issue the “startx” command and the mouse will now work under X11 (see the picture below). Now, I haven’t gotten the mouse middle button working yet…as soon as I do I’ll post it to the blog. I also added the Virtual Machine additions for Linux to the system but for some reason Virtual Server only recognizes them periodically. Still working on that one. Once I did this I created differencing disks in order to build out as many machines as I need. My only limitation right now is the 1.5GB of memory on the desktop. I hope to get it up to 4GB pretty soon though. Hopefully this information will help others get CentOS 5.1 running under Virtual Server 2005 R2 SP1 more fully.

CentOS 5.1 with X11 under Virtual Server 2005 R2 SP1

Advertisements