Making Ubuntu 7.04 Work Under Virtual PC 2007


This isn’t exactly on topic for this blog, since up to this point I’ve really only talked about getting Windows Vista running in a VM, but sometimes it’s nice to talk about something else for a change.

One of the things that I like most about Virtual Machines is that they let me play with other operating systems besides Windows without having to have a dedicated computer risk its well-being for the task.  If something doesn’t work in a VM, then a quick click of a button and it’s gone.

One of the other operating systems I’ve been playing around with lately is Ubuntu Linux. 

There have been a good number of blog posts about getting Ubuntu working under VPC, but I haven’t found any of them to be totally comprehensive, so I wanted to do one that encompases all of the issues that I’ve had getting it running.  Please keep in mind that I am certainly not an expert in Linux – I really only know enough to get myself into trouble, but not necessarily back out.  Also, I didn’t come up with most of the tips here myself – thanks to ArcaneCode for a series of posts about the mouse issues, culminating with indianabeck’s tip about the boot parameter.  And thanks to my friend Marc Teale who helped me figure out how to fix the video problem, and taught me the fundamentals of actually using Linux and editing the configuration files. And also to Microsoft’s own Ben Armstrong, who pointed me to ArcaneCode in the first place.

  • So, the first step, obviously, is to get a Windows PC with Virtual PC 2007 installed.  I’m running the x64 version on Windows Vista Ultimate.  Download the ISO for Ubuntu in whatever fashion you choose – just remember that Virtual PC only supports 32-bit guests, so make sure you grab the i386 version.  Also, you don’t need the alternate installer version.  Just grab the regular one.
  • Start Virtual PC, create a VM with the specifications you want, and boot it.  During POST, click the CD menu, and capture the Ubuntu ISO you just downloaded.  You may need to reset the VM to get it to boot properly.
  • On the Ubuntu boot menu, select Start or install Ubuntu and hit F6.  Add i8042.noloop to the end of the line, and press Enter.  This will make the mouse work in recent versions of the kernel. 
  • When Ubuntu boots to the Live CD and XWindows loads, the graphics will be… not good.  You’re going to need to change the color depth to make it display correctly.  To do that:
    • Hit CTRL-ALT-F1 to drop to a console. 
    • Type sudo nano /etc/X11/xorg.conf and press Enter. 
    • Press CTRL W, type depth and press Enter.  You should see a line that says "DefaultDepth 24".  Delete 24 and type 16
    • Press CTRL O, and press Enter to save the file. 
    • Press CTRL X to exit the nano editor. 
    • Press CTRL-ALT-F7 to switch back to XWindows – that graphics will still not be right.
    • Press CTRL-ALT-Backspace to reload XWindows.  The graphics should be good to go now.
  • Run the installation like you normally would.  When installation is complete, Ubuntu will boot, and the video should be correct (it was for me – if it’s not, repeat the step listed above), but the mouse won’t work.  To fix the mouse in a more permenant manner, we’ll need to add a kernel parameter to the GRUB loader.  Here’s how:
    • Boot into Ubuntu on the hard drive.
    • Hit CTRL-ALT-F1 to drop to a console and log in.
    • Type sudo nano /boot/grub/menu.lst.
    • Press CTRL W and type end default options, then press Enter.
    • The first entry in the list below is the entry containing the information to boot Ubuntu in regular mode.  Find the line that starts with kernel and go all the way to the end of it.  At the end, type i8042.noloop, press CTRL O, and press Enter to save.
    • At this point, you can do the same with the other entries, like the recovery mode one if you care enough to bother.  If not, just hit CTRL X to exit nano.
    • Type sudo reboot to reboot the VM. 
    • The next time you boot into XWindows, your mouse should work without issue.  (You should also note that if you happen to upgrade your kernel version, you’ll need to make this change *again*.)
  • And you’re good to go do whatever it is you want to do.
Comments (51)

  1. Any suggestion on getting the VM extentions for Linux working with Ubuntu?

    [I actually haven’t even tried this, because Ubuntu is pretty speedy for me without any modifications (I have a VT-enabled machine).  Let me get back to you on this.  – mikekol]

  2. You Qi says:

    THANKS A MILLION!! WORKS LIKE A CHARM! 😀

  3. Mark says:

    WOWSOME! Thanks so much.

    P.S. You should try Xubuntu.

  4. dub says:

    Flawless instructions. Very helpful, thank you much!.

  5. Worked great but I the ubuntu VPC has no network connection. I need this to port an application to Linux and cannot use shared networking to test client server operations.

    [I’ve had network issues with Ubuntu as well, and not just in a VM.  I’m not sure whether it’s by design or not, but I’ve had to manually tell the machine to connect to the wired network almost every time I turn it on.  I’ve done this my clicking on the network icon in the upper-right hand corner of the screen and choosing ‘Wired Network’ from the list.  As long as you have the Virtual Machine’s network adapter set to use the correct physical adapter on your host, I’ve had it work every time.   – mikekol]

  6. Rodney Myers says:

    Thunder, I was able to get Ubuntu networking to work by configuring a static IP address and DNS servers.

  7. Jacob says:

    The directions worked great.  However, once Ubuntu is booted up it runs very slow.  I’m not sure if the VM additions need to be installed, but any suggestions on how to speed it up would be great.  I am running Virtual PC 2007 with the host OS as Vista.  Thanks…

  8. Seb says:

    Mike, Great post! Thanks for the info!

  9. Vitor Mauricio de N. Silva says:

    Mike, Great ! This works perfectly.

    Vitor Mauricio

  10. Jono says:

    Great instructions – even for a newbie like me.

  11. Dave says:

    Thanks!  I found these solutions one and a time and yours are both better and step by step!  Nice work and a huge plus to the million plus Virtual PC users out here running the OS we bought with our machines but learning new things… or in my case learning things I knew 15 years ago.

    I wanted to contribute to your site here with info on how to go beyond 1024×768 in a Virtual PC window but I have not been able to figure it out despite 2-3 hours of trying.  I will keep working on it but any help is welcome.  I have tried setting to VESA and VGA and any resolution higher than this causes a GUI crash and leaves me in a terminal box (man I need to add emacs to my machine as vi kills me).

  12. Dave says:

    Update: I am a fool.  I kept plugging at it and gave up on Google and went to the Ubuntu site and started digging.  Here: https://help.ubuntu.com/community/FixVideoResolutionHowto

    From this page I used the "sudo dpkg-reconfigure -phigh xserver-xorg" command and got more resolution. I am only able to get 1280×1024 rather than the 1440×1050 of my screen but this is good enough for me now.

  13. Joe says:

    I noticed the suggestion to add i8042.noloop to the end of the line… (in the steps for setup)

    does anyone know what file this refers to?

  14. haha says:

    Use Vmware workstation. It’s a lot better…

  15. Dave says:

    I have found that Ubuntu 7.04 under Virtual PC 2007 (running on Vista or XP SP2) starts up with a dead network every time.  I created a shell script to run this command "sudo /etc/init.d/networking restart" and this reset correctly picks up the DHCP info from both my office and home DHCP servers and I am all set.  Odd that it fails on initial startup as VPC 2007 virtualizes all the hardware before it even processes the bios startup of the machine..

    I would use VMWare but it costs a whole lot more than $0 in order to be able to build out and use new VMs.  I use it at work and like it but I don’t wish to buy it for home.

    Dave

  16. Alex says:

    Great! Worked on my set (WinXP x64 host / VPC2007) in 1 hour, taking time to read a couple of articles here and there.

    It would be great to have a solution to install VM additions to smoothe mouse transitions and so on between the VM and the host, but it already works quite well with the Hardware Virtualization activated.

    The DHCP client issue is also something that should find a solution. Dave: how did you exactly run your solution (newbee on Linux!)?

  17. ubuntu boy says:

    It’s all very well for people to be saying "Use VMWare", but that’s not even out for Vista yet.

    My new machine came with Vista, so until I can see harware support for everything it comes with, it will be the base OS.

    At least Virtual PC runs on Vista I say!

  18. bond says:

    it worked.. great!

    thanks so much..

    this was so simple.. 🙂

  19. Corey says:

    I was having some issues related to the gnome settings daemon starting up, and locking up the VM.

    I found I had to have a minimum of 256 megs of ram allocated to the VM and that was no longer an issue.

  20. Linux4Ever says:

    I tried Ubuntu Ultimate under VPC2007 and I didnt even have to mod the graphics, but still had to do the mouse-compatibility thing.

    (If you like/want Vista Ultimate, try Ubuntu Ultimate!!!!!)

  21. John says:

    I had tried getting Ubuntu to run on Windows Vista the other way (booting from CD) but that didn’t work and this did the trick. Thanks for the article!

  22. Bruno says:

    I got stuck very early on – the xorg.conf file doesn’t exist, and naturally I’m not able to create it. Also I’ve found that the mouse is "stuck" in the VM window (so I use ALT GR + ENTER to get back to XP).

  23. Bruno says:

    Ok, upon return to xwindows I can actually see something – although it’s black and white, horizontally extended and not pretty 😀 Figured since I could see things I could install it, and then make the needed changes. But as I get to the location window I can’t get further as I can’t make the window small enough to see the whole thing – including some kind of "next" button which I don’t know how to get to with the keyboard *lol*

  24. Bruno says:

    Ok, if anyone runs into the same problem as me, get the alternate CD image – installation is text based, so you can finish the installation, and then follow the instructions here

  25. Cadoo says:

    I used the safe graphics mode and it worked just fine.

    Thank you for this tip on getting the mouse working.

  26. Cadoo says:

    Safe graphics mode did not require editing xorg.conf by the way.

  27. erick says:

    Make sure you type Xorg.conf – it won’t find the file if you type a lower case x

  28. JAIME ESPINOSA says:

    Thanks. I can’t figure out what would i do without your post… Thks agains..

  29. rik prenen says:

    Worked just fine. Thanks a lot!

  30. Godwin says:

    After I typed i8042.noloop and hit enter, I received the followed error:

    checksum for device 1 is not valid (0x89)

    checksum for device 2 is not valid (0xbe)

    Any idea?

    [Sorry, no idea.  Does it happen every time?  Does it prevent Ubuntu from booting?  You might want to try an Ubuntu support forum to see if they have any ideas on what to try.  – mikekol]

  31. Ark Rat says:

    Is there a way I could receive the Ubuntu file from you? I can’t seem to find the right one. Or even a link to where you got yours? Also…..how do I capture the ISO? I know, I know, stupid question, but it’s a necessary idiocy.

    [I can’t distribute any files like that, sorry.  If you’re using Virtual PC, start the VM and click the CD menu (I think… I don’t have VPC on my machine right now), and click Capture Image.  Then you can point it to an ISO file.  – mikekol]

  32. Ark Rat says:

    Thanks man, I’ll try it. But do you have a link to the file? If not, it’s cool.

  33. Ark Rat says:

    Thanks man, I’ll try it. But do you have a link to the file? If not, it’s cool.

  34. Ark Rat says:

    Accidentally clicked submit twice. Sorry!

  35. Newbie says:

    I have fixed the graphics parts. Since the mouse is not working, I’m not able to select the installation option. I’ve tried all keys on the keyboard, but without any luck. Any hints/tips would be appreciated 🙂

  36. Brian says:

    I am confused on this part:

    On the Ubuntu boot menu, select Start or install Ubuntu and hit F6.  Add i8042.noloop to the end of the line, and press Enter.  This will make the mouse work in recent versions of the kernel.  

    Because I hit F6 and it brings up the "Other Options", there is no where to type. Am I missing something here?

  37. Brian says:

    Actually I figured it out, you have to do F7.

    So my problem is now that when I try to find the word "depth", it is not found. Any ideas?

  38. AJ says:

    First off, I could not get the video fix mentioned here to help with the setup screen running off the window, however F4 did fix it. I did get the mouse thing going and made it through setup to initial boot. Now my problem is that the bootup gets stuck at "* Running local boot scripts (/etc/rc.local)." The hard disk mentions no activity, but the ethernet does. I checked the ISO image integrity and found it to be good. I also upped the VM memory to 256. Any ideas? (Oh, I’m using Server 7.04.)

  39. AJ says:

    Update: I found that the system /did/ finish booting, but simply failed to show a prompt until I hit ENTER. Also found out (via Google) that the server edition does not come with a GUI. I know one can be installed, but I don’t have the knowledge to accomplish that. I tried some install commands mention on the net, but none worked properly, mostly due to "no package found" type errors. Even the online update feature did not pull a desktop package. Unless someone feels charitable and wants to post a reply on how to load a desktop onto the server edition, I’ll keep searching. 🙂

  40. shane says:

    I can not get the second step to work. I end up with a screen with no list for the mouse fix. I then decided to reboot, and release the *.iso, and now when it Xubuntu loads, I get an error stating "Reboot and select proper Boot Device or Insert Boot Media in selected Boot device" and nothing.

    Not sure what has happened here.

  41. shane says:

    I realized my mistake! I had not run through the full install. Rather than burn and waste CDs I use a program called Virtual Clone Drive. Saves tonnes of CDs from becoming coasters. Google it.

  42. bronius says:

    Thanks for the super simple steps– always helps to get things going just knowing someone else has successfully done so before.

    Has anyone seen the case where the mouse wiggles and tracks, but clicking isn’t recognized?  I’m on a Dell Latitude running 32bit Vista, VPC 2007, Ubuntu 7.10.

    Update (without having yet posted).  What worked for me was holding left-alt while clicking.. go figure..?  From now on it seems to be working just fine.

    All the best!

  43. mattman says:

    The proper way to update the /boot/grub/menu.lst is to edit the two lines defoptions and altoptions — add the i8042.noloop to those two lines, so they look something like this:

    # defoptions=quiet splash i8042.noloop

    #altoptions=(recovery mode) i8042.noloop single

    Then save the file and run

    sudo update-grub

    to automatically update the two "live" entries you mentioned updating in this article.  This will ensure that the change carries through for any kernel image updates so you won’t have to keep making the same edits for each new kernel version entry in the menu.lst.

  44. Jeff says:

    Thank you so much for posting this excellent solution. I was about to abort my efforts. Now I can test away!

    Cheers.

  45. khopcus says:

    I was having the same problems as everyone else until I found this webpage. The live cd and the install kept hanging during boot. After playing around with it for awhile I had to add the i8042.noloop and the clock=pit mods and it worked great. Thanks!!!!!

  46. Rick says:

    Why not put mattman’s method for changing menu.lst, described a few posts before this one, up into the main section?  I think that’s the better way of going about changing that file.

    To enable sound (do not type quotes):

    -Hit CTRL-ALT-F1 to drop to a console

    -Login

    -Type "sudo nano /etc/modules"

    -Add "snd-sb16" (as the last line by itself at the end of the file)

    -Save and close the file (Ctrl-O, Enter, Ctrl-X)

    -CTRL-ALT-F7 to switch back to XWindows

    -Reboot (System menu)

  47. Apollo-Soyuz 1975 says:

    Thanks very much for posting this how-to article.  Has anyone, to your knowledge, experimented with the Folding@Home 64-bit Linux SMP client using Ubuntu in Virtual PC 2007?  I’d be interested to learn how to make it work.

  48. Настройка Ubuntu 7.10 под VirtualPC 2007. Включаем работу мыши и правильную наст