Have you ever wanted to actually try Ubuntu Linux (Live CD’s don’t count) without having to worry about partitioning or installing another hard drive or setting up a dual boot? This step by step guide will walk you through the exact steps to run Ubuntu totally inside of Windows utilizing a virtual machine.
A great benefit to using a virtual machine is you can run the Ubuntu operating system and get access to the entire free software library the Linux community offers without having to give up Windows. Additionally, this is a great way to evaluate Ubuntu to see if it is something you might want to switch to.
Keep in mind though, while running any “guest” operating system inside of a virtual machine is fast, it is not as fast as if you had the same OS installed as your “host” (primary) OS. Most of the hardware environment is emulated so you will most likely not get all their features. For example, if you have a fancy graphics card installed on your Windows machine, the same device may not be available to your virtual machine, leaving you to run a more generic graphic driver for the guest OS. This is only a minor thing though, because the real benefit here is being able to run Windows and Ubuntu at the same time.
While there are several methods and a variety of virtual machine software to choose from, I am going to install Ubuntu Linux using Microsoft Virtual PC 2007 for this walk through. The process should be very similar for any other virtual machine software if you want to use something different.
- Windows XP or Vista.
- Respectable processor (at least ~1.5 Ghz or a dual core).
- At least 1 GB RAM.
- Microsoft Virtual PC 2007 (it’s free). The download page says it requires XP Pro, but there are numerous reports it works on XP Home just fine.
- Latest distro of Ubuntu (7.10 at the time of this writing). Once you have downloaded the ISO file, burn it to CD.
Steps To Install Ubuntu Linux Inside Of Microsoft Virtual PC 2007
- Open Virtual PC and click New inside of the Virtual PC Console. The New Virtual Machine Wizard starts. Click Next.
- Select the option to create a new virtual machine. Click Next.
- Enter “Ubuntu Linux” for the name of the virtual machine. Click Next.
- Select “Other” for the operating system. Click Next.
- Select the option to adjust the amount of RAM and assign at least 256 MB, but I would recommend 512 or higher. The more RAM you assign the faster Ubuntu will run, but your “host” Windows install will have that much less RAM while the virtual machine is running. Click Next.
- Select the option to use a new virtual disk. Click Next.
- Select a location to save the virtual machine file and assign a size for the virtual machine. The size you specify will be the size of Ubuntu’s hard drive, so make sure you assign at least 10,000 MB (10 GB). Click Next.
- Review the summary page and click Finish to create the new virtual machine. There should now be an entry called “Ubuntu Linux” in your Virtual PC Console. You can select this entry and click the Settings button to review or change the VM settings.
- Insert your Ubuntu CD into your CD drive, select the Ubuntu Linux entry and press Start.
- When your virtual machine (VM) starts for the first time, it will not have any devices assigned to boot from. As a result, you will probably get a screen which shows the VM trying to boot from the network (“spinning” cursor) or just simply a “No boot device found” error.
- To fix this, you need to tell the VM to use the CD drive from your host OS. From the CD menu of Virtual PC, select “Use Physical Drive D:” (where D is the drive letter of your CD drive in Windows). This will bind the the D drive in Windows to be the CD drive in your VM.
- From the Virtual PC menu, select Action > Reset to restart the VM.
- Once the VM reboots, it will read the CD and give you the Ubuntu boot menu. As of the time of this writing, Ubuntu 7.10 has a bug in its kernel which does not communicate correctly with PS2 driver emulators used by VM software such as Virtual PC 2007. Here is how to work around this issue (thanks to the Ubuntu Forums and this bug report):
- While on the boot menu, press F6 to view the boot command string at the bottom of the screen.
- At the end of the command string, remove “splash” and enter “i8042.noloop” before the two dashes.
- Select the option to Start Ubuntu in safe graphics mode.
- Your screen should look like the screenshot below. If it does, press Enter to boot to Ubuntu.
- The boot process may take some time to load. If you see a blank screen for a few minutes, this is fine. Eventually you will see Ubuntu loading all of its start up services and then the GUI will appear. You are now in the Ubuntu Live CD Environment.
- Since the mouse and keyboard are shared between your VM and host Windows OS, once you click inside the VM it will “lock” the mouse and keyboard input. To transfer control back to your host Windows OS, press the Right Alt key.
- You can feel free to play around with the applications, but since everything is running from the CD the response will be really slow. Let’s get down to business and install Ubuntu on the virtual machine. To start, simply double click the Install icon on the desktop. The installation program will then start (be patient).
- Select your language. Click Forward.
- Select your time zone. Click Forward.
- Select your keyboard layout. Click Forward.
- The Ubuntu partitioner will detect the amount of space you allocated to your VM. For this guide, I am going to use the default option which is to use the entire disk for the Ubuntu install, however you can certainly manually configure your partitions if you prefer, but I will not cover manually editing your partitions in this guide. Select the option for guided and click Forward.
- Fill out the information about yourself. Make sure you note your user name and password. Click Forward.
- Review the installation summary and click Install to load Ubuntu on your virtual machine. This may take some time, so be patient.
- Once the install is complete you will get a notice to remove the installation CD. In the Virtual PC menu (remember, press the Right Alt key to transfer the mouse) select CD > Eject and remove your Ubuntu installation CD. Click Restart now to boot to your new Ubuntu installation on your virtual machine.
- Before we go into Ubuntu for the first time, we need to apply the mouse fix to the completed installation to work around the kernel bug. This only needs to be done one time. When the VM is booting, you will see a message which says “Press ESC to load the GRUB config”. Press ESC to enter the GRUB configuration (if you didn’t press ESC in time, simply go to Action > Reset to reboot the VM).
- In the GRUB configuration, make sure the first option which reads “Ubuntu [Version], kernel 2.6.x-x-generic” is selected and press E.
- Select the kernel option (should be the second line) and press E.
- Just like when installing Ubuntu, change “splash” at the end of the line to be “i8042.noloop”. Press Enter to apply the changes.
- Back on the kernel option screen, press B to start Ubuntu. Once logged into Ubuntu, I will show you how to edit this permanently so you don’t have to make this change every time you boot.
- Once the Ubuntu login screen appears, enter the user name and password you created during the installation.
- Welcome to Ubuntu completely inside of Windows.
- Now, here is how to apply the permanent fix for the kernel mouse bug. Once you do this you will not have to worry about the mouse problem anymore:
- You are done! Enjoy running Ubuntu from inside of Windows.
Of course, remember you are running Ubuntu Linux entirely from inside of a virtual environment. This should have no effect on program functionality, however you will most likely not be able to play any open GL games. I’ve also found that sound does not work out of the box, but if you need it this fix should help (I have not tried this though, as I do not use sound in my VM).
That’s it. Get down to giving Ubuntu a real good look and you might want to make it your primary OS.