Installing Ubuntu on Virtual PC for Windows Lovers

0 comments suggest edit

I am a total noob when it comes to working with Linux. The only experience I have with Unix is in college when I used to pipe the manual of trn via the write command to unsuspecting classmates. If I remember correctly, this is how you do it.

write username | man trn

This would fill the user’s screen with a bunch of text. Always good for a laugh.

Normally, the write command informs the receiver who originated the message. I remember there was some way to hide who I was when sending the message, but have since forgotten that trick. Yep, them are some true ! Good times! Good times!! Good times! Good times!

As usual, I digress.

I recently decided to try out Ubuntu to see what all the fuss was about. My notes here apply to Virtual PC 2007.

Downloading Ubuntu and Setting up the VPC

To start, download the iso image from the Ubuntu download site. I downloaded the 7.04 version first since I assumed the bigger the version number, the better, right? We’ll see this isn’t always the case as we’ll see.

For completeness, I also installed 6.06.

When creating a new Virtual PC, make sure to bump up the ram to at least 256 MB of memory. Also make sure there is enough disk space. I tried to skimp and had a problem with the install. If in doubt, use the default value for disk space.

Installing Ubuntu

After creating a new Virtual PC machine, select the CD menu and then Capture ISO Image and browse for the iso image you downloaded.

Virtual PC Capture ISO Image
Menu

When the Ubuntu menu comes up, make sure to select Start Ubuntu in Safe Graphics Mode. I’ll explain why later.

Ubuntu startup
screen

At this point, Ubuntu boots up and if you’re a total noob like me, you might think “Wow! That was a fast install!”.

It turns out that this is Ubuntu running off the CD. I must’ve been tired at the time because this confounded me for a good while as everytime I rebooted, I lost all progress I was making. ;) The next step is to really perform the install.

The Mouse Capture Issue

If you’re running Ubuntu 7.04, you might run into an issue where you can’t use the mouse in the VPC. This is due to a bug in some Linux distros where it cannot find PS/2 mice, which is the type that VPC emulates.

This post has a workaround for dealing with this issue by using the keyboard until these distros are fixed. Heck, this might be a great feature of 7.04 since it forces you to go commando and learn the keyboard shortcuts.

Ubuntu 6.06 does not suffer from this problem, so it may be a better starting point if you and the mouse have a great rapport.

The Real Install

At this point, you are ready to start the install. From the top level System menu, select Administration | Install.

Starting the
Install

The installation process asks you a few simple questions and doesn’t take too long.

The Bit Depth Issue

Earlier I mentioned making sure to start Ubuntu in Safe Graphics Mode. The reason for this is that the default bit depth property for Ubuntu is 24, which Virtual PC does not support. If you fail to heed this advice, you’ll see something like this. Kind of looks like that All Your Base Are Belong to Us video.

Ubuntu without the proper printer
settings

Fortunately, I found the fix in this post on Phil Scott’s blog (Phils rule!).**I bolded the essential elements.

Once I was in there, I found the configuration file for the graphics card in /etc/X11. Sso type in cd /etc/X11, although I certainly hope even the most harden of MScentric people can figure that out :). Once in there I opened up xorg.conf using pico (so type in pico xorg.conf - isn’t this fun?). Browse down to the screen section. Opps, looks like the defaultDepth property is 24, which VirtualPC doesn’t support. I changed this to 16 and hit CTRL-X to exit (saving when prompted of course). Typed in reboot and awaaaaaaay we go.

When I ran through these steps, I found that I had to use the sudo command (runs the command as a super user) first. For example:

sudo pico xorg.conf

Your results may vary. Speaking of sudo,have you seen my t-shirtfromXKCD.com?

Virtual Machine Additions for Linux

At this point, you’ll probably want to install the Virtual Machine Additions. Unfortunately, the additions only work for Windows and OS/2 guest operating systems.

However, you can go to the Connect website and download Virtual Machine Additions for Linux. It took me a while to find the actual download link because various blog posts only mentioned the Connect site and not the actual location.

Ubuntu isn’t listed in the list of supported distributions. I’ll let you know if it works for Ubuntu.

Now What?

So now I have Ubuntu running in a virtual machine. It comes with Open Office, Firefox, etc… preinstalled. My next step is to install VMWare and MonoDevelop and start tinkering around. Any suggestions on what else I should check out?

UPDATE: Perhaps I should use VMWare 6 instead since it supports multi-monitor in a virtual machine. That’s hot!

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.

Comments

avatar

55 responses

  1. Avatar for Tero Miettinen
    Tero Miettinen May 6th, 2007

    You were talking about the sudo-command, most system-files need you to be super-user(aka root), in order to be able to write the changes to the file.
    In Ubuntu su-program is not used by default, I prefer to use that when changing something like this. It actually logs you in as super-user instead of executing one command.
    Ps. My first post ;)

  2. Avatar for chep
    chep May 6th, 2007

    Just a remark...
    It's
    $ man trn | write username
    and not the other way around ;)
    2Tero Miettinen:
    If you want su-like behavior in Ubuntu, use:
    $ sudo -i
    Ubuntu has user 'root' disabled from loggin in by default. Some people find it as a way to improve security (attacker has to guess user name first, instead of using well known 'root').

  3. Avatar for Steven Harman
    Steven Harman May 6th, 2007

    Phil, when you said

    Perhaps I should use VMWare 6 instead...


    Were you referring to VMware Workstation, or Server? I ask b/c Workstation is currently in version 5.x and 6.0 is still in beta - oh and Workstation runs about $200 per license. Whereas VMware Server is free (as in beer), and is somewhere around version 1.0.x.
    I've loved VMware when I used it in the past, and I was really excited when the decided to make Server free. Unfortunately it's not an ideal virtualization system to run on a dev box as I don't like to have the extra [server] process running when I'm not using VMs.
    However, VMware Workstation it runs more as a standalone application (like VPC 2007), so it's not using up system resources when it's not in use. The big downside is the 200 smacks it'll cost you to get the Workstation license. Maybe they'll give us a discount for being good OSS developers? :)

  4. Avatar for Haacked
    Haacked May 6th, 2007

    @chep, would the following work?
    write username < man trn

  5. Avatar for Scott
    Scott May 6th, 2007

    sudo -s works too, starts a root shell.
    I've never run into the bit-depth limitation under VPC? I haven't run Unbuntu 7.04 though, earlier versions I've run under VPC and VMWare with no desktop problems. But I've always run under Windows XP. Are you running VPC under Vista? The close/min/max buttons look Vista-ish in your screenshots.
    Damn Small Linux is a great distro to install on your work machine for testing or running small wikis. ~50MB and can run in a 64MB VM with a full graphical desktop. You can start it up, leave it running, and hardly even notice an drag on your system.
    I'm digging VMWare player & server and the plethora of pre-installed/configured virtual machines they have at their site. I wish there was a VPC community site sponsored by MS that had lots of pre-configured virtual machines. Player is free and there is a free tool avalable that lets you make VM images from physical machines.

  6. Avatar for Paul
    Paul May 6th, 2007

    Interesting that you got this to work on Virtual PC. MS usually only has the option to create Windows based images.
    I've never really liked VMWare. It always seemed to slow down my Windows box and would take forever to boot. I might give Virtual PC a try when I have some spare time.

  7. Avatar for Haacked
    Haacked May 6th, 2007

    @Scott: Yep, it's Vista.
    @Paul: Well the fact that Microsoft has Virtual Machine Additions for Linux shows they are finally changing their tune on these matters. Unfortunately, the additions didn't work for me with Ubuntu.

  8. Avatar for DotNetKicks.com
    DotNetKicks.com May 6th, 2007

    You've been kicked (a good thing) - Trackback from DotNetKicks.com

  9. Avatar for engtech
    engtech May 6th, 2007

    VMWare has preinstalled Ubuntu images.
    http://search.vmware.com/se...
    Also, here's a guide to 7 things people should change after installing ubuntu:
    http://www.pcworld.com/arti...
    You may be able to infer that I've been planning to do more playing around with Ubuntu. :)
    I love using unix for development. Every operating system should come with grep.

  10. Avatar for Scott Elkin
    Scott Elkin May 7th, 2007

    I had to add the vga=771 to the F6 parameters on install to get it to work.
    http://coolthingoftheday.bl...

  11. Avatar for James
    James May 8th, 2007

    Hey hey! So thanks for the tips about installing Ubuntu on virtual PC.
    I was running VPC2007 at home and wanted to try out some of the Linux distros. Ubuntu 6.06 installed fine, and although it had mouse support it was sluggish etc. I thought that installing the "Virtual PC additions" package would solve that problem...but DAMN! i spent forever trying to work out how to install the goddamn thing.
    I couldn't do it in the end. It was jsut tooooooo confusing. Has anyone else gopt any tips for installing those ADDITIONS onto an ubuntu setup?
    I'm just having a ball with virtual PCs at the moment. They're really cool. Just for giggles..I am infecting my virtual machine with as many virii as I can. Just to see what the virii actually do? My anal security on my host os prevents me from doing it on that machine.....so woot! to the virtual ones.

  12. Avatar for Paul Duggan
    Paul Duggan May 9th, 2007

    Phil. Great post about Ubuntu, although I found 6.06 has the mouse problem too (?).
    What to do next? You should definitely check out Amazon EC2 -- you can fire up your own Virtual Ubuntu or Fedoro or whatever. Or fire up 10 of them. Install MySQL, Apache, generally go mad!
    Great to see you're an Amiga fan too - man, that machine was something. Might just have to check out Amiga Forever now.
    P.S. Check out my blog for a couple of cool soccer posts.

  13. Avatar for Donny J
    Donny J May 11th, 2007

    Those freakin' Canadians. What's that all aboot anyways? I like bacon. I like pig's feet. Why should I buy goverment endorsed meat? Cause it's safe? Na...

  14. Avatar for Adrian
    Adrian May 22nd, 2007

    Nice tutorial, I run into the mouse issue but the keyboard fix works good. I then tried out the kernel patch and it works!. Thanks a lot guys.

  15. Avatar for Ammar
    Ammar June 2nd, 2007

    hii tried wht u said but i cant get further than Ubuntu boot screen.it just stuck there all i see is the boot screen thats all.help me!

  16. Avatar for Ben
    Ben June 20th, 2007

    I donno what I am doing wrong, but even when I take the start in safe graphic mode I got the "All Your Base Are Belong to Us" effect, and sudo will not work,
    ubuntu@ubuntu:~$ sudo
    -bash: /usr/bin/sudo: cannot execute binary file

  17. Avatar for Phill
    Phill July 24th, 2007

    Great, great :*...
    I have a share PC and none in my family can see the benefits in Linux, and open source at all... So this is truly beautiful :D thx

  18. Avatar for JayJ
    JayJ August 10th, 2007

    Just letting you know there is a fix for the mouse issue cf check it here for CLEAR instructions :)
    http://blogs.technet.com/se...

  19. Avatar for harish
    harish August 26th, 2007

    Thanks , the step by step instruction was just perfect and saved me lot of time =)

  20. Avatar for Robert
    Robert August 28th, 2007

    Dude mine either gets stuck in the boot screen or after its booted nothing happens.....lol help meeee

  21. Avatar for a ron
    a ron September 6th, 2007

    Why am I not surprised? "Linux has solved all those install issues now, it's easier than windows!" Well no. In a very common environment for testing new software, neither the mouse nor graphics work. Humorously, you end up having to edit your x config, just like in the stereotypical Linux problems from history.
    None of the other OSes I tried had any issue and worked out of the box with graphics and mouse - XP, 2K, NT4, OS/2, eCS, Win98.
    Failed! Same as always.

  22. Avatar for Michael Wexler
    Michael Wexler September 27th, 2007

    There is a simple fix for the mouse issue which will work even past various upgrades. See my blog at Ubuntu 7.04 and no mouse on Virtual PC where I explain how to easily fix it. Same issue and same fix for 7.10, btw.

  23. Avatar for khopcus
    khopcus October 25th, 2007

    stuck at bootscreen in virtual pc? Add clock=pit to the end of your kernel line when booting.

  24. Avatar for AttmayMB61489
    AttmayMB61489 November 7th, 2007

    You don't even know how long I've had EVERY issue described in this article. THANK YOU SO MUCH!!! :)

  25. Avatar for mario
    mario November 13th, 2007

    ok when im installing ubuntu what do i put as the mount point???

  26. Avatar for Kyle Robinson Young
    Kyle Robinson Young January 17th, 2008

    Easy ways to fix the no mouse problem when using Ubuntu with MS Virtual PC...
    Temporary:
    - As you are starting up hit Esc at the Grub loader.
    - Press 'e' to start editing.
    - Goto the 'kernel' line and press 'e' again to edit the line.
    - At the end of the line or text type " i8042.noloop" without the quotes. WITH the space before the i8042.noloop.
    - Hit enter and then hit 'b' to boot.
    Permanent:
    - Open up a terminal (Applications > Accessories > Terminal).
    - Enter in: sudo pico /boot/grub/menu.lst
    - Look for the following lines in the file...

    ## ## End Default Options ##
    title Ubuntu, kernel 2.6.20-15-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro quiet splash
    initrd /boot/initrd.img-2.6.20-15-generic
    quiet
    savedefault

    - Change the kernel line to: kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro quiet splash i8042.noloop
    - Save and your done.
    Upgrade Permanent:
    The file /boot/grub/menu.lst could be overwritten when Ubuntu upgrades so to ensure your change is included in the upgrade...
    - Change the following line in /boot/grub/menu.lst...

    # kopt=root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro

    to...

    # kopt=root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro i8042.noloop

  27. Avatar for Kyle Robinson Young
    Kyle Robinson Young January 17th, 2008

    Oh yeah for those stuck at the Ubuntu menu, you know "Start or install Ubuntu, Start Ubuntu in Safe Graphics Mode, etc" You hit enter but nothing happens?
    Check the file size of the Ubuntu ISO file you downloaded. It should be around 700MB. If its not then you'll need to download Ubuntu again.
    Strangely its a common problem where I've seen users struggling when the file fails to download completely but it will still run the Ubuntu startup menu.

  28. Avatar for Serkan
    Serkan March 5th, 2008

    Can Ubuntu run with XGL on Virtual PC?

  29. Avatar for mj
    mj April 2nd, 2008

    looks great but real install is better.

  30. Avatar for Ouberdoub
    Ouberdoub April 19th, 2008

    Umm, I"ve already install ubuntu but can only run one at a time. Can I use VPC to access the ubuntu I've already installed?

  31. Avatar for Ed Evans
    Ed Evans May 12th, 2008

    Not sure if the ps/2 mouse/keyboard fix works for 8.04 but read several posts from others with success stories on VirtualBox. I don't think it has the dual display feature but it is fast, free and works great.

  32. Avatar for Time
    Time June 13th, 2008

    How about just uploading the Virtual Machine and VM Hard disk so we don't have to go through the process of downloading everything and waiting so long just to go through more steps.

  33. Avatar for Maro
    Maro August 22nd, 2008

    Use Virtual Box to instal ubuntu on Windows. I tryed with vitual pc but work adnd configuration on vp was very annying. Now I use VB and have no problem with anything, I work on dualhead mode in resolution 1280x1024 Ubuntu.

  34. Avatar for ahabman
    ahabman August 22nd, 2008

    To get around the error that says -
    An unrecoverable processor error has been encountered.
    The virtual machine will reset now.
    helpdeskgeek.com/.../installing-ubuntu-804-on-m...

  35. Avatar for StophVista
    StophVista September 23rd, 2008

    The newest version works in safe graphics mode without modification

  36. Avatar for ng
    ng October 12th, 2008

    i am telling i have already install ubuntu 7.10 in virutal pc. and now how to install ubuntu 8.10 BETA version install in Virtual PC

  37. Avatar for Narendra Garg
    Narendra Garg October 22nd, 2008

    i am install already ubuntu 7.10 and now how to install ubuntu 8.10 beta install in virutal pc

  38. Avatar for David Whyte
    David Whyte October 26th, 2008

    I have been banging about for a few hours searching for a fix for the Ubuntu mouse issue. I just stumbled across the fix for the mouse issue that does not require vm additions. It works like a charm.
    blogs.msdn.com/.../...k-under-virtual-pc-2007.aspx

  39. Avatar for Jay
    Jay October 29th, 2008

    Awesome write up, I had to do the f4, f6 and then it was all good. Thanks

  40. Avatar for kirbylover4000
    kirbylover4000 January 25th, 2009

    Seems all good...but the download links are broken.
    I'd like to see Virtual PC for myself as I have never used it before and need it. Restarting to switch OSes between WinXP and Ubuntu just sucks!
    [p.s. I don't know you, you don't know me and so on but I googled Virtual PC (thank god for google!) and found this page, followed links , were aparently broken and left this comment.] ;-)

  41. Avatar for fedro
    fedro January 26th, 2009

    esci fuori di qui se pensano che siamo andati in quinta non bisogna mai dirlo a marzia

  42. Avatar for the machinist
    the machinist March 14th, 2009

    VPC '07 will install Ubuntu 8.10 but you still need to use the Safe Graphics Mode (F4 at title screen) and no mouse bugs. Even more entertaining is when I installed VPC it said it wouldn't work with my current OS (Vista Home Prem.) but it seems to operate just fine, and only minimal lag while running Aero... not too shabby.
    I also run 2 monitors and set VPC to start in fullscreen on my 2nd monitor.

  43. Avatar for webster72n
    webster72n April 5th, 2009

    I installed Ubuntu 8.10 on a virtualbox and everything is fine, except for two things:
    1. it doesn't activate my printer, even though recognizing it.
    2. it also doesn't find my modem, which is a dial-up connection.
    To resolve my dilemma, I am advised to use an HP printer and upgrade to Broadband by a person familiar with ubuntu systems.
    Since I am financially restricted, my options are limited accordingly and therefore I would like to find a way to make things work with what I've got. Is that possible and, if so, how?
    P.S.: The host system is Vista Home Premium, 32 bit.

  44. Avatar for san
    san December 28th, 2009

    can we install virtual PC on vista home premium 32 bit

  45. Avatar for CoderHead
    CoderHead February 4th, 2010

    Great write-up. I'm running Virtual PC on Windows 7 Ultimate x64, installed Ubuntu 9.10 Desktop without any issues. Fun!

  46. Avatar for Christian Gabriel C.
    Christian Gabriel C. November 13th, 2010

    Trying to install 10.10 (32bit) desktop on the "built in" Windows Virtual PC coming on my Win 7 64bit ultimate. once I select the "install Ubuntu" the installation goes through an attempt of instalation for about 10 seconds afer which the VM Powers down. Any sugestions?

  47. Avatar for Christian Gabriel C.
    Christian Gabriel C. November 13th, 2010

    And, forgot to say, There seems to be no "safe mode" on 10.10 for some reason. :(

  48. Avatar for fatboy
    fatboy November 17th, 2010

    I have the same problem on ubuntu 10 shutting down. Might try virtualbox.

  49. Avatar for NeilZeBub
    NeilZeBub November 18th, 2010

    www.microsoft.com/.../details.aspx
    The link to Microsoft Connect didn't work for me but thi spage has 32 and 64 bit downloads of Additions for Linux.
    Thanks for the page. Good work that man and contributors.

  50. Avatar for Christian Gabriel C.
    Christian Gabriel C. November 18th, 2010

    finally sorted it on WVPc. found this link:
    www.hanselman.com/... .aspx
    modify the settings to fit your own needs (remember that you'll need the i386 iso for this as windows virtual PC emulates a 32 bit OS).

  51. Avatar for Nitin
    Nitin November 28th, 2010

    I want to install VPC in Ubutun and the install windows XP2 in the VPC. Can you help with steps.

  52. Avatar for IT Support
    IT Support December 21st, 2010

    LOL, Nitin. Loving your sense of humour. But should at some point someone actually want to run Windows apps on Linux they can either use Wine or install Virtual Box (by Oracle) and install Windows on that Virtual Machine.

  53. Avatar for Addis
    Addis February 7th, 2011

    Nice tutorial. I live with several OS since 2002

  54. Avatar for aaa
    aaa July 13th, 2011

    ubuntu 10.10 is having problem while installing.

  55. Avatar for John
    John October 22nd, 2012

    Yeah, I tried to install ubuntu on a virtual PC and after clicking the instsall ubuntu an dloaded linux files and just bombed and shut my pc down. What should I do in order to install ubuntu without this problem?