Running Linux in a Virtual Machine: Difference between revisions
Line 45: | Line 45: | ||
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. | 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. | ||
apt-get install gcc | apt-get install gcc | ||
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 |
Revision as of 22:11, 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:
- VMWare Player (commercial but free)
- QEMU (open source)
- VirtualBox (commercial w/ free trial and open source)
If you are running OSX, two popular options for running Linux in a virtual machine are:
- Parallels (commercial - trial available)
- VMWare Fusion (commercial)
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:
- Debian 4.0 (Etch) image for VMWare Player UNTESTED
- Ubuntu 7.04 (Feisty Fawn) image for VMWare Player UNTESTED
- 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?
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.
apt-get install gcc
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