msoe.edu > Dr. Durant > Courses > CS384 > Ubuntu on VMWare Player

How to set up Ubuntu under VMWare Player for CS384

by Brian Skibinski

This procedure will allow you to run Ubuntu on a virtual machine under Windows XP, eliminating the need to separately boot into Ubuntu, and allowing you to rapidly switch between Windows and Ubuntu.

Make sure you have at least 4-5 GB available on the D Drive.

  1. Download QEMU, install to D drive (Recommend D:\Program Files\Qemu) http://free.oszoo.org/ftp/qemu/win32/release/QemuInstall-0.7.2.exe
  2. Download VMWare Player, install to C or D (Doesn’t matter), default settings. It’s technically in beta but a full release is due by the end of 2005. http://www.vmware.com/products/player/
  3. Download Ubuntu, place ISO file in Qemu file directory (D:\Program Files\Qemu) Get “ubuntu-5.10-install-i386.iso”
  4. Open a command window, and Navigate to your qemu install folder (where the ubuntu image should now be located as well)
    1. Start -> run. Type in “cmd” (without quotes), hit ok
    2. Type D:. Press enter
    3. Type “cd Program Files\Qemu”, press enter
  5. Create the Ubuntu Virtual Drive
    1. Type “qemu-img.exe create -f vmdk Ubuntu.vmdk 4G” without the quotes, press enter
  6. Type “start .” or close the command window and open the qemu program directory with windows explorer.
  7. Download this Ubuntu.vmx text file. Adjust memsize to be approx ¼ to ½ your system memory in MB – 384 is fine for MSOE’s 1 GB Laptops.
  8. Create a shortcut to this file on the desktop. This is your link to the virtual machine. Start it up. You should receive the VM window with the Ubuntu setup.
  9. Press CTRL-G to direct input into the VM (you’ll notice your keyboard now only works with the VM and the mouse is gone). When Ubuntu loads with the boot: menu, press enter to install it. Create a computer name of your choice (will be seen on MSOE network), create a username and password (recommend MSOE e-mail username / password). When choosing available screen resolutions, select them all. Ubuntu will figure out which to use.

    When you reach for format disk prompt: make sure it looks something like this: [Partition Disks Dialog]

    Make sure the disk size is less than 4-5 GB, and go ahead and Erase entire disk. It’s actually erasing your virtual disk (the Ubuntu.vmdk file), so no damage can be done. The virtual disk will not grow past the maximum, but instead you’ll just get errors in Ubuntu about lack of disk space. I found this file to be about 2.7 GB when installed and working.

  10. Let Ubuntu restart itself, but as soon as it restarts and you get the boot: screen, close the virtual machine.
  11. Open Ubuntu.vmx again in you favorite text editor.

    Change:

    #ide1:0.fileName = "auto detect"
    #ide1:0.deviceType = "cdrom-raw"
    
    ide1:0.fileName = "ubuntu-5.10-install-i386.iso"
    ide1:0.deviceType = "cdrom-image"

    to

    ide1:0.fileName = "auto detect"
    ide1:0.deviceType = "cdrom-raw"
    
    #ide1:0.fileName = "ubuntu-5.10-install-i386.iso"
    #ide1:0.deviceType = "cdrom-image"

    This will give you a regular CD ROM in Ubuntu (instead of the install CD). It is now safe to delete the Ubuntu ISO file.

  12. Restart the Ubuntu VM (double click your Ubunut.vmx file). Log in to ubuntu. When the update dialog pops up, click on ‘Show Updates’. Download them all.
  13. Update your repository list by doing the following steps:
    1. Open a terminal window
    2. Type 'sudo gedit /etc/apt/sources.list'. It may ask you for your root password (should be the same as your user password), go ahead and enter it.
    3. Uncomment out any line that starts out with deb or deb-src (except the backports) and contains a web address (make sure not to introduce spaces before the lines as well).
    4. Save and close gedit
    5. At the terminal, type 'sudo apt-get update'. This should read in the changes you made and download lists of packages from the web.
    6. (optional) Close the terminal window.
  14. Open the Synaptic Package Manager by clicking System -> Administration -> Synaptic Package Manager. Search for and install all of the following (right click the file and click ‘Mark for Installation
    1. make
    2. manpages
    3. manpages-dev
    4. libtool
    5. KDevelop3
    6. KDevelop3-dev
    7. KDevelop3-doc
    8. KDevelop3-data
    9. KDevelop3-plugins
    10. g++
    11. konsole
  15. Click Apply in the package manager to download and install the files. Ubuntu will use your windows network connection (wireless included)
  16. Restart the VM if necessary (System->logout->shutdown)

    Note that if you shut down Ubuntu from within Ubuntu, it also closes the VM. If you select ‘restart’ or ‘power down and exit’ from the VM’s menu, this is equivalent to holding down the power button on a physical machine… not recommended.

    When you restart the VM you should have everything you need to start developing C++ applications using the Ubuntu VM. While dealing with the scrollbars/fullscreen modes can be a little annoying in Windows, it beats having to restart the entire computer every time you need to flip!

If the scrolling around becomes difficult switching between Windows/Ubuntu, you can uncomment out the last line of your vmx file (remove the # sign in “#gui.fullScreenAtPowerOn = "TRUE"). This will start Ubuntu in full screen mode. Ctrl-Alt will still restore the window to a smaller size).

Anytime I’ve attempted to adjust my Ubuntu screen resolution it acts up. I’ve only been able to use it on the highest (1920x1200) resolution, and the scrollbars remain when maximized (except for fullscreen mode).

It should also be noted that running the VM is separate from running Windows. They do not communicate with each other, so you cannot copy/paste or anything between them. They are also incapable of transferring any files directly (including viruses!).

It’s also pretty clear that the VM is a beta release. It has occasional problems with switching inputs between the OSs (giving mouse control to both or the wrong one). If you use the (Ctrl-Alt) to go back to windows and Ctl-G to direct input it works pretty well.

Sources

Info found online from:

VM program support/info: http://www.vmware.com/community/forum.jspa?forumID=123


This page was last updated on Friday, 09-Dec-2005 17:51:30 CST.