Ubuntu on Virtual PC
September 12th, 2008 4 Comments
I'm quite happy using Windows and don't see much appeal in Linux. I have not-so-fond memories of wasting lots of my free time in the past installing and configuring Linux. That was back in the days before graphical Linux installers, when getting a Linux distro to a usable state was a fiendishly complicated ordeal. So I don't have any particular love for Linux as an operating system.
However, it's occasionally useful to have a Linux machine available to test something out, and great way to do this is to use a virtual machine. VMware would be your first choice if you want a virtual Linux machine, but, with a little effort, you can also use Microsoft Virtual PC.
Here's how to get Ubuntu on Virtual PC:
- Download and install Virtual PC.
- Download an Ubuntu Desktop Edition ISO. I downloaded 8.04 ("Hardy Heron").
- Start Virtual PC, and create a new machine.
(Video by Robert Cain: http://arcanecode.wordpress.com/)
Note: Make sure to pick “Other” as the OS type.
Give the machine 512 MB of RAM.
- Start the new virtual machine.
- When it starts up, go to the CD menu and choose Capture ISO image, pointing it at the desktop ISO you downloaded from Ubuntu. Capturing an image means the ISO file will show up like a CD in the virtual machine.
- Ubuntu will start running from the CD image. When it starts, choose your language and then, at the next screen, press F4 to select an alternate starting mode.
- When the menu pops up, change to Safe graphics mode and press Enter.
There is a problem with the mouse not working in Virtual PC and this takes a little fiddling about to fix it. There is also an issue with sound (see the link at the bottom of this post for details about how to fix that - personally I didn't need sound, so I didn't bother trying to fix that).
- Press F6.
- Edit the command that is displayed, using the arrow keys to move the cursor to the end of the line and adding a space followed by “noreplace-paravirt” (without the quote marks) to the end of the command, then press Enter.
- Leave the selected option as Try Ubuntu without any change to your computer.
Note: do not choose the Install Ubuntu option.
- After Ubuntu loads (note that at this point it's just running from the CD image, it's not installed on the virtual machine) double-click Install on the desktop.
This runs the Ubuntu installer.
- Follow through the installer. This part is very simple.
- Once the install is done, go back into the CD menu (right-hand Alt key gets the mouse pointer out of the virtual machine) and release the ISO, otherwise when you reboot you'll go back to the installation menu.
- Click the red button, top right of the Ubuntu desktop and shutdown the virtual machine.
If it hangs at this point, don't worry about it.
- Close the Virtual PC window and choose to shut down the machine.
- Go into the Settings for the virtual machine.
Robert Cain's video shows how to edit the Settings if you've never done this before:
- Make sure Networking is set to the network adaptor that your PC is currently using.
Note: if you want to be able to connect to/from the Ubuntu VM and your host PC, you need to use the Microsoft Loopback Adaptor. If this doesn't show up in the list of network adaptors you'll have to install it first. This is really easy. See http://support.microsoft.com/kb/839013, or this video from http://veedee-eyes.com
- Save the Settings.
- Start up the virtual machine again.
- Once it gets to the "GRUB" line, press Esc.
You should now see 3 entries to select from.
- Leave Ubuntu 8.04, kernel 2.6.24-16-generic selected and press e.
- On the next page, select the second entry that reads kernel /boot/vmlinuz… and press e again.
- You will see a command line that ends with “xforcevesa”. Edit this, as before, adding a space followed by “noreplace-paravirt” (without the quotes) at the end of this line, then press Enter.
You are now back at the previous selection screen with the entry kernel /boot/vmlinuz… still selected.
- Press b and Ubuntu should boot correctly.
- Once Ubuntu has loaded, open a terminal window (Applications > Accessories > Terminal) and on the command line enter:
sudu nano /boot/grub/menu.lst
- Enter your password and page down to near the bottom and locate “kernel /boot/vmlinuz…" in the “Ubuntu 8.04, kernel 2.6.24-16-generic” section.
- Move the cursor to the end of the line after xforcevesa and add a space followed by “noreplace-paravirt” (no quotes).
- Ctrl + O to write out.
- Enter to accept the name.
- Ctrl + X to close the file.
Ubuntu should now be running inside Virtual PC.
- Click the network icon in the upper right side of the Ubuntu toolbar:
- Choose Wired Network.
That's it.
Now you can fire up an Ubuntu machine whenever you need it. And when you close it down, choose Save State and when you start it up again you'll be able to pick up exactly where you left off - for example, any programs that were running when you saved state will still be running when you start up the VM again in six months time.
I found the following site extremely helpful:
http://arcanecode.wordpress.com/2008/04/24/installing-ubuntu-804-under-microsoft-virtual-pc-2007/
If you get stuck, it's worth reading through all the comments on this page, which provide a lot of useful information.
Potentially similar posts
- Rails Chronicles – Part 2 – July 2011
- Adding your choice of text editor to Flare’s Open With menu – December 2010
- Deleting those pesky lines in Microsoft Word – August 2010
- Perl basics for beginners (on Windows) – August 2010
- Preventing BBC iPlayer running all the time – November 2008
September 14th, 2008 at 11:07 pm (#)
Come on Alistair - I know you love Linux.
But yes I agree it did *used* to be a drag configuring it etc. But I'm happy to say I'm having fun with Ubuntu (on hardware that wont run XP) and mucking about with MythBuntu also.
See you soon,
Stephen.
(The guy that doesn't own a windows machine)
September 15th, 2008 at 9:04 pm (#)
"The guy that doesn’t own a windows machine"
Go on Stephen, take off that hair shirt and buy yourself a nice new Vista machine. You know you want to!
;-)
October 17th, 2009 at 12:42 pm (#)
hello for 12 hours to install ubuntu 9 on virtual pc i make all the steps to f6 and change the replace..... than enter.....than blank screen for ever please helpme! thank you
May 19th, 2010 at 3:37 pm (#)
Great info, thanks for useful post. I am waiting for more