Ubuntu Linux in Virtual PC 2007 on Vista

11:49PM Oct 24, 2007 in category Tools and Gadgets by Jesse Bethke

I recently found myself frustrated by the inability to run Internet Explorer 6 on my Vista box at work.  Normally, I run three systems running Windows XP, Vista, and Centos 5 (linux).  Web application development nearly demands access to many different system for testing.  It also helps to spread out your various IDE's, browsers, and other tools.  Capitalizing on a tri-screen, tri-OS work space linked with Synergy makes it all that much more of blissful development environment.

However, my XP laptop was in use elsewhere and I was without access to IE6.  Still being one of the more popular browsers on the market; I needed access.  A Mac guy at work flaunted the fact that he could run windows xp in a window on his mac.  Silly macs trying to make up for the short-comings by emulating windows. Wait a minute, why can't I do that?

Microsoft Virtual PC 2007

Microsoft Virtual PC is system emulation software originally developed by Connectix.  After Microsoft's acquisition of Connectix, they started offering the software for free and discontinued non-windows deployments (clever).  Which is all fine and dandy if your host OS is Windows.

Windows XP and 2003 Server in a Window

Now, Microsoft so graciously offers a 560Mb virtual pc image including IE6 (download here) for development testing.  However, I figured if I was going to goto the effort I might as well emulate XP and run IE6.  There are other things having XP on hand for that could be useful.

A Coldfusion project running on IIS required a testing server.  Most of our development is in PHP on apache (in linux). Without a box to spare, this was an excellent opportunity to use Virtual PC again. I discovered this also worked like a dream.  With a test server running Ms SQL, IIS, and colfusion I was a rather happy developer.  It pleased me even more to discover that the virtual pc running 2003 server consumed almost no resources from the host OS.

The virtualized OS appears as a second system on the network.  It has it's own IP address and everything.  While you can run the OS in a window or full screen mode, I found it easiest to turn on remote desktop.  That way I could access the server from any system in the office or from home.

Ubuntu Linux

With the recent success in emulating an environment for Windows OSs; I got greedy.  Many times I work from home and it often requires using ssh to access remote servers.  Despite tools like Putty, it just happens to be easier to ssh to a linux server from a linux client. However, I don't really want to sacrifice a section of my hard drive for a linux partition.  VPC is advantageous because it allows you to create virtual hard drives for the emulation that are actually single file images saved on your host system's HD.  So you don't have to worry about foobaring your HD's partition scheme.

I used Ubuntu as my distro of choice, but I suspect any of the common linux distributions would work.  Not to mention that Ubuntu 7.10 (Gutsy Gibbon) was recently released and I've yet to take it for a test drive.  I had enough confidence that this would work that I started writing this blog article while I was watching the install take place.

CD-Rom Emulation

I also found it handy that I could straight up mount my ISO image of ubuntu without burning it to a CD. 

You can also mount additional virtual drives or map a drive to your host system.

Video Notice

So it turns out that xserver tried to default to 1280x1024 in 24-bit color.  Unfortunately, Virtual PC 2007 only supports 16-bit and 32-bit color.  When you boot, it seems like all is going fine and then you get a borked log-in screen.  You will need to manually adjust your video settings if this happens.

  1. Restart the system
  2. When GRUB comes up, elect to boot in recover mode.  This will get you to a command prompt without booting xserver
  3. Edit your xorg configuration.
    sudo nano /etc/X11/xorg.conf
  4. Page down till you find Section "Screen", and update these lines:
    DefaultDepth    16
    Depth        16
    You may also try 32-bit if you can get the 16-bit working.
  5. Ctrl-O to save and Ctrl-X to close nano.
  6. Type reboot and hit enter.  You should be good to go.

Mouse Emulation Issue

If you install in text mode, you probably won't notice this until you boot and get your video running.  I didn't.  Apparently the linux kernel has troubles recognizing PS2 mice.  While you are in recovery mode above also edit your GRUB boot config to enable i8042.noloop.

  1. Restart the system
  2. When GRUB comes up, elect to boot in recover mode.  This will get you to a command prompt without booting xserver
  3. Edit your GRUB boot menu:
    sudo nano /boot/grub/menu.lst
  4. Scroll to about line 132; Esc-g will get you there faster
  5. Find the first line that begins with kernel and ends with splash
  6. Append this to then end of the line after splash:
     -- i8042.noloop
  7. ctrl-o to save and ctrl-x to exit
  8. Type reboot and hit enter.
  9. That should fix it. If you still have troubles with your mouse, there is a more detailed tutorial at Arcane Code.

Sweet Harmony 

That seems to be it.  Everything was good to go after that point.  I now have access to a linux OS when ever I need it without having to say good by to all my favorite windows tools and fuss with dual booting.

Comments:

Hi Jesse, thanks for the post. Very useful. I still found an issue with the mouse under MS Virtual PC 2007: the mouse wheel does not work. Did you find this problem?

Posted by Rafael Vargas on October 30, 2007 at 07:27 PM CDT #

Yes, on the client system it just emulates a simple 2-button PS2 mouse for maximum compatibility. You will see that if you install windows you also won't get a scroll wheel.
Good news: you don't need special drivers for anything.
Bad news: you don't get all the features out of your hardware.

Posted by Jesse Bethke on October 30, 2007 at 09:52 PM CDT #

i just got vista at work and started running virtual pc for testing on xp and decided to try installing ubuntu (which i run at home). your article helped me tremendously! thanks!

Posted by tj on January 04, 2008 at 10:02 PM CST #

Just what I were looking for!
However, I cant make it work for some unknown reason.
When I mount the Ubuntu 7.10 ISO image in Virtual PC 2007 i get to a menu, where the best option seem to be "Run or install Ubuntu".
When I choose this, next thing that is shown is a error message of some kind, and it doesnt go further.

"isapnp: checksum for device 1 is not valid (0x89)"

Would sure appreciate some kind of advice, or yet better, concrete solutions to this problem if you could think of something?

Posted by Joksi on January 22, 2008 at 06:07 PM CST #

Hi, thanks a lot for this info, but I am running into a problem on my Vista box (Dell laptop - brand new). As soon as I grab the Ubuntu iso and restart my vpc, it magically reboots my whole system -- or crashes it. Have you run into this before? Any solutions?

Posted by Kamran on January 25, 2008 at 10:59 AM CST #

I have the live version and because of the mouse isssue discussed above I'm unable to click on the install icon to actually do the install. I need to be able to navigate to it with the keyboard, but haven't had any luck. I should probably just go download the text based install version, but trying to avoid that as it will take some time and other will probably have similar questions.

Posted by qhawk on February 03, 2008 at 04:24 PM CST #

I highly recommend installing Ubuntu with the non-GUI installer. VPC can't emulate 24-bit video which seems to be the default if you boot a live CD or use the graphical installer.

Posted by Jesse Bethke on February 15, 2008 at 10:59 PM CST #

Thanks for the info. Very useful.

Posted by branded perfume on March 17, 2008 at 07:51 PM CDT #

ubuntu great software very helpul info thanks a lot

Posted by cheap cars on March 17, 2008 at 07:54 PM CDT #

I never tried before I would love to try and give you feedback Thanks for the info

Posted by used textbooks on March 17, 2008 at 07:56 PM CDT #

thanks for this piece of info It solved my problem

Posted by online auction on March 17, 2008 at 07:59 PM CDT #

my machine runs on xp but it doesn't seem to be compatible maybe I will give another try. thanks

Posted by furniture Sale on March 17, 2008 at 08:01 PM CDT #

Question on the mouse scroll question.
It seems that the middle button click works fine, however, despite my efforts, I haven't been able to get mouse scroll to work here. Am I to understand from the quote above that we just can't get scroll on Umbuntu running on VPC 2007?

Good page, and thanks,
-Mezz

Posted by Mezz on March 22, 2008 at 06:56 PM CDT #

Question on accessing to Ubuntu via ssh from host.
I installed Ubuntu server version (network: NAT) on VPC 2007 and failed to access it through putty -- VMWARE is ok.

Please mention about this issue.

Posted by Byeongchul Kang on March 24, 2008 at 10:47 PM CDT #

@ Byeongchul Kang

I'm not so sure this is a VPC07 issue, I'd recommend reviewing your Ubuntu settings. Also make sure your host system hasn't firewalled VPC.

I just tested the SSH and it works, Remote desktop on windows also works.

Also make sure that you are SSHing to the client system and not the host system. Their appear as two distinct systems on the network.

Posted by Jesse Bethke on March 30, 2008 at 06:20 PM CDT #

Here's a fix for the scroll mouse issue: edit your grub.conf file (/boot/grub/grub.conf) and add the following to the end of the kernel line after the i8042.noloop:
psmouse.proto=imps

So, in step 6 above, your line would look like this:
-- i8042.noloop psmouse.proto=imps

I'm using a couple-years-old MS wireless scroll mouse and it works great!

Posted by Tycen Stafford on May 22, 2008 at 02:33 PM CDT #

I just tried with Ubuntu 8, well seems it got worse: starting the kernel crashes Virtual PC everytime (live CD, install, even check the iso for defects, every option). Arrrg.

Posted by Thera on July 31, 2008 at 06:01 AM CDT #

Post a Comment:
  • HTML Syntax: Allowed

Calendar

« October 2008
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today
The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by The University of South Dakota.