[mdlug] Virtualization

David Lee Lambert davidl at lmert.com
Mon May 16 07:53:44 EDT 2011


Recently an old, small-memory  box I had been using as a file- and
web-server did not successfully reboot (the /boot partition ran out of space
during an attempted kernel upgrade; the current Debian rescue disk kept
running out of memory).  I was able to restore the file-server data to
another system, call it "S".  I then obtained an even faster, large-memory
(but still 32-bit ... oh well) system,  call it H.  Rather than transfer the
LAMP stack and sundry services piecemeal to the new system,  I decided to
try running the disk image of the old one in emulation.

My first attempt was to use VMware.  I was able to get VMware Server 2.0.2
to install on Debian 6.0 ("Squeeze"?).  The following document was helpful:

http://wiki.debian.org/VMware#Installing_VMware_Server_2_on_Squeeze

However,  the linked patch was not sufficient for the kernel modules to
compile cleanly;  I had to manually edit a few places where a test for
CONFIG_PREEMPT_RT controlled whether the DECLARE_MUTEX or DEFINE_SEMAPHORE
macro was used.  I have the VMware web interface running (in 2.0.x, a Java
Servlet application), but the console (supposed to be a FIrefox plugin) does
not work:  when I click on hte button to open it,  after about two minutes
an error-message pops up saying that authentication failed.  My guess is
that it could be some DNS issue,  but I've verified that "H" can ping all of
the following:  "H", "H".LOCAL, "h".<domain>, and localhost.  I can see the
pretty web-based management interface, start and stop virtual servers, and
reconfigure how much memory the use, etc., but without access to the console
I can't troubleshoot things like not getting an IP address or other boot
problems.

My next step was to try QEMU.  That has worked,  although it's not perfect.
I wasn't able to get TAP-based bridging to work (and i didn't try very hard
because one of the steps is bringing down eth0 before adding it to the
bridge), so I'm using a "-user" network, which means that my virtual machine
is behind a virtual NAT device that only uses unprivileged ports.  That in
turn means I have to resort to some trickery to get NFS support:  I start up
a PPP over SSH tunnel in the VM and run NFS over that.  Even so,  filesystem
access is plenty fast.  (Yes, I figured out how to do it automatically in
init scripts.)

Rather than run QEMU from the desktop,  I'm using the "-vnc" and
"-daemonize" options and starting it from an init script.  I've also mapped
in just the WWW, MySQL and SSH ports from high ports on the virtual NAT.
I'm still trying to figure out how I'll expose it through the external NAT;
perhaps I'll install apache 2 on the virtual-host system and lock it down as
only a reverse proxy, then forward port 80 in.  Or, perhaps I'll use inetd
or iptables to perform the port remapping. (My external NAT device only
allows forwarding to the same port.)

Anyway,  no question here,  just a report that qemu works pretty well on
Debian Squeeze,  and VMware Server apparently does not.

--
David L. Lambert <davidl at lmert.com> or <lamber45 at msu.edu>
  or <david.lee.lambert at acm.org>, formerly "as4109 at wayne.edu"
IM: davidleelambert (Yahoo!) or lamber45 at cse.msu.edu (MSN)
Phone:  616-676-7375



More information about the mdlug mailing list