Running Linux in a Virtual Machine

From Soma-notes
Jump to navigation Jump to search

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