Running Linux in a Virtual Machine: Difference between revisions

From Soma-notes
Rhooper (talk | contribs)
 
(9 intermediate revisions by 2 users not shown)
Line 8: Line 8:
* [http://fabrice.bellard.free.fr/qemu/ QEMU] (open source)
* [http://fabrice.bellard.free.fr/qemu/ QEMU] (open source)
* [http://www.virtualbox.org/ VirtualBox] (commercial w/ free trial and open source)
* [http://www.virtualbox.org/ VirtualBox] (commercial w/ free trial and open source)
If you are running OSX, two popular options for running Linux in a virtual machine are:
* [http://www.parallels.com/ Parallels] (commercial - trial available)
* [http://www.vmware.com/products/fusion/ VMWare Fusion] (commercial)


==Choosing a virtual machine image==
==Choosing a virtual machine image==
Line 17: Line 22:
* [http://www.visoracle.com/download/debian/ Debian 4.0 (Etch) image] for VMWare Player '''UNTESTED'''
* [http://www.visoracle.com/download/debian/ Debian 4.0 (Etch) image] for VMWare Player '''UNTESTED'''
* [http://www.vmware.com/vmtn/appliances/directory/954 Ubuntu 7.04 (Feisty Fawn) image] for VMWare Player '''UNTESTED'''
* [http://www.vmware.com/vmtn/appliances/directory/954 Ubuntu 7.04 (Feisty Fawn) image] for VMWare Player '''UNTESTED'''
* [http://isv-image.ubuntu.com/vmware/ Ubuntu (Gnome) and kubuntu (KDE)] official 7.04, 6.10, 6.06 images for VMWare Player
**'''Kubuntu-7.04-desktop-amd64.zip Tested OK'''
**'''Ubuntu-7.04-desktop-amd64.zip Tested OK'''
* Others?
* Others?
Note: The amd64 images work with Intel 64 Bit CPU's (ie. Core 2 Duo).
When connected to the university network, NAT will allow internet access for the virtual machine. Ensure that any firewalls are configured to trust the VMWare Virtual Ethernet Adaptor.
== Configuring Debian ==
In order to do the first lab, you will likely want to install manpages-dev (as root):
apt-get install manpages-dev
In order to do the second lab, you will need the kernel sources and gcc. 
  apt-get install linux-source-2.6.18
Remove or comment out the line:
deb cdrom:[Debian GNU/Linux 4.0 r1 _Etch_ - Official i386 CD Binary-1 20070819-11:52]/ etch contrib main
If you haven't modified /etc/apt/sources.list to remove the cdrom source, you will may want to do so first to install gcc and other packages.
  apt-get install gcc
  apt-get install libc-dev
You'll also likely need to install the linux headers for your kernel.  If you're running the latest etch, the linux-headers-2.6.18-5 or linux-headers-2.6.18-5-686 should be what you want.
apt-get install linux-headers-2.6.18-5

Latest revision as of 22:13, 3 October 2007

There are two things you need to run Linux in a virtual machine: a virtual machine application and an image.

Choosing a virtual machine application

If you are running Windows, two popular options for running Linux in a virtual machine are:

If you are running OSX, two popular options for running Linux in a virtual machine are:

Choosing a virtual machine image

You can do a fresh install of virtually any Linux distribution in most modern virtual machine environments, including Debian and Ubuntu. However, it is easier to start with a prebuilt machine image. Such images are often referred to as virtual appliances.

There are a variety of images available. Please update the list below with your experiences running these virtual machines:

Note: The amd64 images work with Intel 64 Bit CPU's (ie. Core 2 Duo).

When connected to the university network, NAT will allow internet access for the virtual machine. Ensure that any firewalls are configured to trust the VMWare Virtual Ethernet Adaptor.


Configuring Debian

In order to do the first lab, you will likely want to install manpages-dev (as root):

apt-get install manpages-dev

In order to do the second lab, you will need the kernel sources and gcc.

 apt-get install linux-source-2.6.18 

Remove or comment out the line:

deb cdrom:[Debian GNU/Linux 4.0 r1 _Etch_ - Official i386 CD Binary-1 20070819-11:52]/ etch contrib main

If you haven't modified /etc/apt/sources.list to remove the cdrom source, you will may want to do so first to install gcc and other packages.

 apt-get install gcc 
 apt-get install libc-dev

You'll also likely need to install the linux headers for your kernel. If you're running the latest etch, the linux-headers-2.6.18-5 or linux-headers-2.6.18-5-686 should be what you want.

apt-get install linux-headers-2.6.18-5