<rdf:Description rdf:about="http://snarfed.org/space/fedora%20core%203%20on%20vmware">
  <dc:title> fedora core 3 on vmware </dc:title>
  <dc:creator> Ryan Barrett &lt;snarfed at ryanb dot org&gt; </dc:creator>
  <dc:date> 2003-01-01T05:00:00Z </dc:date>
  <dc:language> en </dc:language>
  <dc:format> text/html </dc:format>
  <dc:rights> Copyright 2002-2009 Ryan Barrett </dc:rights>

  <content>
    <p><a href="http://vmware.com/"><img src="/space/vmware.png" alt="/space/vmware.png" title="" /></a><a href="http://redhat.com/"><img src="/space/redhat.jpg" alt="/space/redhat.jpg" title="" /></a><a href="http://fedora.redhat.com/"><img src="/space/fedora.png" alt="/space/fedora.png" title="" /></a></p>

<p>I
recently upgraded to <a href="http://vmware.com/">VMWare</a> 4.5.2, with <a href="http://fedora.redhat.com/">Fedora Core
3</a> as the guest and Windows XP as the host. It was
much smoother than I expected, but it still needed a few tweaks. Here's what I
did to whip it into shape.</p>

<p><em>Since I wrote this, I've upgraded to VMware 6.0.0 and switched from FC3 to
<a href="http://ubuntu.com/">Ubuntu</a> Dapper (6.06), then later to Feisty (7.04). Almost
all of these tips still apply, though!</em></p>

<ul>
<li><p>The kernel that shipped with FC3, 2.6.9-1.667, was slower than mud. X
windows was especially bad, and would routinely use 50-60% of the CPU for
nothing more than typing in Emacs. Kerneltrap's
<a href="http://kerneltrap.org/user/1638">keithmo</a> provided a <a href="http://kerneltrap.org/node/4030">"minimal" 2.6.9 kernel
config</a>, which I used to build my own kernel.
It was better, but still much slower than it should have been. A few people
<a href="http://www.vmware.com/community/thread.jspa?forumID=19&amp;threadID=16154&amp;messageID=174172#174172">blamed the 4G/4G kernel
patch</a>,
which can perform poorly and was dropped in later FC3 kernels. Sure enough,
<strong>yum update kernel</strong> bumped me to 2.6.11-1.14_FC3, which was just as fast
under VMWare as my old, trusty RH9.</p></li>
<li><p>...except that it broke X windows. X would start and the mouse driver would
load, but it wouldn't start my window manager or anything else. I was stuck with
a black screen and a mouse cursor. Worse, the keyboard driver didn't load, so I
couldn't Alt-F1 or Ctrl-Alt-Backspace to get back to a tty! I looked at
/var/log/Xorg.0.log, but didn't see any obvious errors. After an hour of poking
at xorg.conf and vmware-config-tools.pl, I finally tried <strong>yum update
xorg-x11</strong>. It gave me version 6.8.2-1.FC3, which worked beautifully.</p></li>
<li><p>The 2.6 kernel and VMWare 4.5.2 also fought over the system clock.
Specifically, the clock in the Linux guest ran 2-5x slower than real time. This
affects everything time-based, including the keyboard repeat delay, which is
very annoying. The problem
<a href="http://www.vmware.com/community/thread.jspa?threadID=4254">is</a>
<a href="http://www.vmware.com/community/thread.jspa?forumID=19&amp;threadID=6561&amp;messageID=92759">well</a>
<a href="http://www.vmware.com/community/thread.jspa?threadID=10158">documented</a> on the
VMWare forums, and there are a couple solutions. First, try the <strong>clock=pit</strong>
kernel option. (Append it to the <strong>kernel</strong> line in /etc/grub.conf). If that
doesn't work, download the source for your kernel, change the <strong>HZ</strong> constant in
include/asm-i386/param.h from 1000 to 100, and rebuild. <strong>clock=pit</strong> didn't
work for me, but changing <strong>HZ</strong> to 100 did.</p></li>
<li><p><a href="http://www.vmware.com/support/ws5/doc/ws_running_shared_folders.html">Shared
folders</a>
didn't work out of the box. Evidently, VMWare's hgfs driver doesn't get along
with recent Linux 2.6 kernels. This is well documented on the VMWare and RedHat
forums...and luckily, one intrepid hacker has <a href="http://www.vmware.com/community/thread.jspa?forumID=19&amp;threadID=7556&amp;messageID=57559">posted a
fix</a>.
To apply it, <a href="/space/vmware_tools_hgfs_linux_2.6_guest.patch">download the
patch</a>,
then apply it to the vmhgfs driver source and re-run the VMWare Tools config
script. When it asks if you want to compile the hgfs module from source, say
yes. Here are the commands:</p>

<div class='p-shadow'><pre><code>tar xf /usr/lib/vmware-tools/modules/source/vmhgfs.tar
patch -p 0 &lt; vmware_tools_hgfs_linux_2.6_guest.patch
tar cf vmhgfs.tar vmhgfs-only/
cp vmhgfs.tar /usr/lib/vmware-tools/modules/source/
/usr/bin/vmware-config-tools.pl
</code></pre></div>

<p><br class='clearing' /></p></li>
<li><p><a href="http://yum.baseurl.org/">Yum</a> is the preferred package
manager for FC3. It's fairly similar to
<a href="http://apt4rpm.sourceforge.net/">apt-get</a>, which I'd used for a while. Once I
added the <a href="http://fedoraproject.org/wiki/Extras_2fUsingExtras">Fedora Extras</a>,
<a href="http://ayo.freshrpms.net/">FreshRPMs</a>, and
<a href="http://dag.wieers.com/home-made/apt/FAQ.php#B3">Dag</a> repositories, I was able
to install almost everything I needed, including...</p></li>
<li><p>...<a href="/space/ion">ion</a>, my window manager! It's not exactly mainstream, so I'd
always had to build it from source, but now there's an
<a href="http://rpm.pbone.net/index.php3/stat/4/idpl/1753782/com/ion-20040729-2mdk.i586.rpm.html">RPM</a>.
It requires lua-5.0.2 and lua-devel-5.0.2, which yum will kindly install for
you.</p></li>
<li><p>Yum also found an RPM for <a href="http://washington.edu/pine/">Pine</a>, my email
client. Unfortunately, it complained that it couldn't find libldap.so.2. A quick
<strong>ln -s /usr/lib/libldap.so /usr/lib/libldap.so.2</strong> made it happy.</p></li>
<li><p>FC3 came with <a href="http://getfirefox.org/">Firefox</a> 1.0PR1, which was dog slow.
It literally took 5-10 seconds to load a page, switch from one tab to another,
etc. I used <strong>yum update firefox</strong> to upgrade to 1.0.2, which is much better.</p></li>
<li><p>I use Ian Macdonald's wonderful
<a href="http://www.caliban.org/ruby/acoc.shtml">acoc</a> tool, which adds color to most
command-line *nix utilities. However, it didn't quite install out of the box. I
installed the <a href="http://www.caliban.org/files/redhat/RPMS/i386/ruby-term-ansicolor-1.0.0-1.i386.rpm">ruby-term-ansicolor
rpm</a>,
but acoc still complained that it couldn't find ansicolor.rb. Turned out it was
looking in /usr/lib/ruby/site_ruby/1.8/term, but acoc wanted it in
/usr/lib/ruby/1.8/term. A quick mkdir -p and a ln -s fixed this.</p></li>
<li><p><strong>xview</strong> is my image viewer of choice, and it came with RH9, but not with
FC3. This wouldn't be a big deal, except it took me a while to figure out which
package it came in. Turns out it's part of <strong>xloadimage</strong>, which yum happily
installed for me.</p></li>
<li><p>I use <a href="http://gnu.org/software/emacs/">GNU Emacs</a>, and I use
<a href="http://subversion.tigris.org/">Subversion</a>, so I expect them to work together.
I use vc-svn.el, which provides VC-mode in Emacs for Subversion. However, the
Subversion folks are currently handing that hot potato over to the Emacs folks,
and in FC3, <em>neither</em> package has it! This was easily remedied, though. Download
the <a href="http://svn.collab.net/viewcvs/*checkout*/svn/trunk/contrib/client-side/vc-svn.el?rev=9195">last version of
vc-svn.el</a>
from the Subversion web-based repository and put it in
<strong>/usr/share/emacs/site-lisp</strong>.</p></li>
<li><p>I also use <strong>savehist.el</strong> in Emacs, which saves and restores most session
history. It's in xemacs-edit-utils-pkg, which ships with
<a href="http://xemacs.org/">XEmacs</a>. However, finding a version that's compatible with
GNU Emacs is iffy at best. So, I'm hosting it here: <a href="/space/savehist.el">savehist.el 0.4 for GNU
Emacs</a>.</p></li>
<li><p>I work from home occasionally. To do this, I ssh to
<a href="http://google.com/">work</a>, run programs on my RH9 workstation remotely, and
display them on my local X server through the ssh tunnel. Unfortunately FC3 has
<a href="http://x.org/">xorg-x11</a>, RH9 has <a href="http://xfree86.org/">XFree86</a>, and they
don't play well together out of the box. Luckily, this turned out to be easy to
fix. I just needed to add <strong>ForwardX11Trusted yes</strong> to my <strong>~/.ssh/config</strong>.
Voila! Happy remote X display.</p></li>
<li><p>FC3 thoughtfully includes <a href="http://mplayerhq.hu/">mplayer</a> in its base
distribution. However, it doesn't include the optional codecs, such as
<a href="http://real.com/">RealPlayer</a>. To install them, <a href="http://www.mplayerhq.hu/MPlayer/releases/codecs/rp9codecs-20050115.tar.bz2">download the
codecs</a>
from the mplayer page and extract them into /usr/lib/win32. (The mplayer docs
have <a href="http://mplayerhq.hu/DOCS/HTML/en/codecs.html#realvideo">more information</a>,
but you shouldn't need it.)</p></li>
<li><p>Both FC3 and <a href="http://ubuntu.com/">Ubuntu</a>, my new distro, use
<a href="http://gnome.org/projects/gdm/">GDM</a>. I don't mind GDM and X sessions, but I
prefer a console login and <a href="http://xfree86.org/current/xinit.1.html">xinit</a>. To
turn off GDM on Ubuntu, run
<strong>update-rc.d -f gdm remove; update-rc.d gdm stop 20 2345</strong>. On FC3, comment
out this line in <strong>/etc/inittab</strong>:</p>

<div class='p-shadow'><pre><code>x:5:respawn:/etc/X11/prefdm -nodaemon
</code></pre></div>

<p><br class='clearing' /></p></li>
<li><p><a href="http://www.vmware.com/support/ws4/doc/running_sharefold_ws.html">HGFS</a>,
VMWare's Linux filesystem for shared folders, is quirky about permissions with
Linux guests on Windows hosts. Windows and *nix filesystems handle permissions
differently. *nix's are generally richer, so when the physical filesystem is
on Windows, HGFS allows full access too all files for all users, but exposes
their permissions as 700 and owned by root:root. This means that stat thinks
you can't read them! This often crops up when running a <code>configure</code> script (or
<code>autogen.sh</code>, <code>autoconf</code>, and <code>automake</code>) to build a program from source. I've
<a href="http://www.vmware.com/community/thread.jspa?threadID=85594&amp;tstart=0">asked VMWare about this</a>,
but for now, it looks like the only workaround is not to use HGFS. :/</p></li>
</ul>

  </content>

  <rdf:Seq>

  </rdf:Seq>
</rdf:Description>
</rdf:RDF>
