User Mode Linux and open source virtual machines

User Mode Linux and open source virtual machines

Post by asube » Mon, 30 Jun 2003 11:05:59



Note: this was ``abusing gcc without messing up with my system'' in
the Gentoo Forums.

Preamble:
I have an nice gentoo installation in my laptop. I want to patch and
recompile gcc for the purposes of testing the g95 (fortran 95)
compiler which is in larval stage. But I don't want to mess up my
system!

So my first questions were:

Is there a way to compile gcc with a different name like gcc_test and
make it coexist with the existing gcc. Or is there some (free) program
to create a virtual PC like VMware. Or is there a better way to do
test/development without messing up with the system? Can it be
achieved with user mode linux?

Then I did some web search and googling; I came up with this:

Apparently, there are three open source virtual machine projects. viz:

i) User mode linux
ii) Plex86
iii)Bochs

Bochs seems to be the oldest project. Plex86, previously called
freemware, seems to be closely related to Bochs (The main guy of
Plex86 did most of the coding of Bochs in its initial stage, when it
was commercial). Some BSDs already implement Bochs (do they come
already installed out of the box?). Plex86 and Bochs are LGPLed. Bochs
is written in C++. Bochs runs most of the OSes including (psuedo OSes)
DOZe, Windoze 95 and NT. Plex86 and User mode linux run linux only.
Plex86 can be used to speed up Bochs. Running Plex86 requires some
tweaks in the Make files of the Kernel (i.e. it requires special
kernel). In User mode linux (UML), the virtual machine can have more
hardware devices than the actual host pc!

Bochs interprets every instruction from power-up to reboot. It does
not seem that UML does this (or this might not pertain to UML since
its just a kernel).

For more information:

http://user-mode-linux.sourceforge.net/

http://bochs.sourceforge.net/

http://plex86.sourceforge.net/

Now, Has anyone used any of the above? How was the experience? Which
of the above provided the most functionality?

Thanks for wasting your time.

-------------------------------------------------------------------------------

Yes, Gentoo is God.

 
 
 

User Mode Linux and open source virtual machines

Post by bd » Mon, 30 Jun 2003 11:24:29



> Note: this was ``abusing gcc without messing up with my system'' in
> the Gentoo Forums.

> Preamble:
> I have an nice gentoo installation in my laptop. I want to patch and
> recompile gcc for the purposes of testing the g95 (fortran 95)
> compiler which is in larval stage. But I don't want to mess up my
> system!

> So my first questions were:

> Is there a way to compile gcc with a different name like gcc_test and
> make it coexist with the existing gcc. Or is there some (free) program
> to create a virtual PC like VMware. Or is there a better way to do
> test/development without messing up with the system? Can it be
> achieved with user mode linux?

Install with a different prefix -
./configure --prefix=$HOME/gcc-test
make && make install
[...]
~/gcc-test/bin/gcc (options)

You don't even need to be root.
--
Freenet distribution not available
Education is what survives when what has been learnt has been forgotten.
                -- B.F. Skinner

 
 
 

User Mode Linux and open source virtual machines

Post by Bob Hauc » Tue, 01 Jul 2003 01:08:05



Quote:> Now, Has anyone used any of the above? How was the experience? Which
> of the above provided the most functionality?

I've used Bochs on both x86 and Sparc (running x86 code in both cases of
course).  It works, but has some limitations.  For one thing, it is
slow.  NT4 takes about 45 minutes to install under Bochs on a 900 MHz
x86 laptop (plus SP6 takes another half-hour or more), I got tired of
waiting for Win98 after a couple of hours.  On that machine, NT seems to
be roughly equivalent to a real computer at perhaps 60 MHz.  Things like
editors run smoothly, but compilers are very slow.

I haven't been able to get the plex86 integration to be stable so I
don't know how much that would speed it up (that feature is very
experimental right now anyway).  Finally, Bochs has rather limited
network and video support at the moment.

On the plus side, it does work and on more than just x86.  I run NT4,
DOS, and Linux under Bochs on both x86 and Sparc machines.  I use it
mainly for testing installation scripts and the like.  Since the "hard
disks" are really files to the host OS, you can start over clean by just
copying a file.  There's also the advantage that if the guest OS crashes
and burns it has no effect at all on the host.

--
 -| Bob Hauck
 -| To Whom You Are Speaking
 -| http://www.haucks.org/

 
 
 

User Mode Linux and open source virtual machines

Post by asube » Tue, 01 Jul 2003 05:11:22


hmm... I have been doing more reading on Bochs, plex86 and UML. I have
not been able to try any of them because I don't have high speed
connection over the summer and I'd have to download them and burn them
during the workday.

Anyways, Bochs and UML seem to be quite different projects. Bochs
seems to give you a complete virtual machine which you can turn power
on and off. On the other hand in UML's case, the UML kernel, when you
run it, would be the virtual machine. The virtual machine would
already have linux running on it when you start it. So, in Bochs you
would be able to compile and install kernel without rebooting your
hardware machine. On the other hand, in UML, the virtual machine would
already have kernel, so you would not be able to do the same on top of
it.

Is my interpretation right? Could anyone clarify me on this one?

 
 
 

User Mode Linux and open source virtual machines

Post by mjt » Tue, 01 Jul 2003 06:21:27



> On the plus side, it does work and on more than just x86.  I run NT4,
> DOS, and Linux under Bochs on both x86 and Sparc machines.  I use it
> mainly for testing installation scripts and the like.  Since the "hard
> disks" are really files to the host OS, you can start over clean by just
> copying a file.  There's also the advantage that if the guest OS crashes
> and burns it has no effect at all on the host

... my experience is to just be done with it and go with vmware.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Michael J. Tobler: motorcyclist, surfer,  #    Black holes result
 skydiver, and author: "Inside Linux",     #   when God divides the  
 "C++ HowTo", "C++ Unleashed"              #     universe by zero

 
 
 

User Mode Linux and open source virtual machines

Post by Bob Hauc » Tue, 01 Jul 2003 09:08:36


On Sun, 29 Jun 2003 21:21:27 GMT, mjt

[bochs]

Quote:> ... my experience is to just be done with it and go with vmware.

That won't do me much good on the Sparc at work.

--
 -| Bob Hauck
 -| To Whom You Are Speaking
 -| http://www.haucks.org/

 
 
 

User Mode Linux and open source virtual machines

Post by Peter T. Breue » Tue, 01 Jul 2003 14:45:37



> I have an nice gentoo installation in my laptop. I want to patch and
> recompile gcc for the purposes of testing the g95 (fortran 95)
> compiler which is in larval stage. But I don't want to mess up my
> system!

Fine. So install it in /usr/local.

Quote:> Is there a way to compile gcc with a different name like gcc_test and

Sure. "man mv"

Quote:> make it coexist with the existing gcc. Or is there some (free) program

Peter