Running the Mono VMWare image in VirtualPC

A lot of people love VMWare, but it bugs me. I think the main reason is that it installs with a bunch of Windows services that run automatically, every second my computer is running, whether or not I use VMWare. Since I don't use virtual machines every day, that's annoying. So, after running the free VMWare Player for a few times times, I banished it from my computer.

The Mono team publishes a VMWare image which makes it really easy to check out Mono on Linux without installing or building anything. If you're happy with VMWare, you can grab their free player and run the image. If, like me, you'd rather run this on Virtual PC, follow along and I'll show you how.

If you don't use VirtualPC, or if you don't mind having several virtual machine hosts on your computer, this post obviously isn't for you. Thanks for stopping by, though!

Grabbing the VMWare Image

You can download the Mono VMWare image from the Mono Downloads page. They offer both are http and torrent download options.

Converting the Virtual Hard Disk image

I use Vmdk2Vhd from vmToolkit to convert the hard disk images. It's free, although there's an annoying registration step (which you can probably bypass with BugMeNot). The interface is really simple - browse for the vmdk file, enter the destination filename, and click the "convert" button.

Converting VMWare to VirtualPC with Vmdk2Vhd

Creating the new VirtualPC Machine

Start up the VirtualPC console and go through the following steps:

  1. Select "Create A Virtual Machine"
  2. Set the Operating System to "Other"
  3. You'll have to decide how much memory you can allocate to the virtual machine; on my workstation with 2GB RAM, I allocated 768MB RAM.
  4. Select "Use an Existing Virtual Hard Disk" and browse to the location of the VHD file you created earlier using Vmdk2Vhd. I left "Use undo disks" unchecked.
  5. Hit "Finish" and you should have a new virtual machine shown in your VirtualPC console.

Mono 1.9 in VirtualPC

Setting up the Video Driver

VirtualPC and Linux have a long standing feud over video drivers. VirtualPC emulates an S3 Trio video card with 16 bit color depth, while the Linux X Server defaults to 24 bit color depth since that's what a real S3 Trio supports. The result is that Linux video under VirtualPC is always a pain in the neck. So keep with me as we jump through a few hoops to get Linux to recognize VirtualPC's video card.

When you start the virtual machine we created earlier, hit the down arrow to select failsafe defaults and hit enter.

Note: Previous openSUSE images required me to also fix the mouse by adding "i8042.noloop" to the failsafe boot parameters, but this appears to have been fixed for the 1.9 image.

Mono VMWare Image Failsafe Startup

After the boot process completes, you should be looking at a console window. You'll need to log in (root / mono) and enter "sax2 -m 0=fbdev" like so:

VirtualPC Linux Video - SAX2

SaX2 churns for a bit, then comes up in graphics mode. You can change the configuration, but I just clicked on OK.

Linux-SAX2

At this point, you'll need to reboot. You can do that in the VirtualPC menu (Action / Reset), or you can just type "shutdown -r 0" at the command prompt. When it comes back up, you can boot to Mono 1.9 / openSUSE 1.3 without using the Failsafe options.

Mono 1.9 in VirtualPC

We've got one more thing to set up - the network connection is disabled by default. You can connect by clicking on the network icon in the lower right-hand corner, then on "Wired".

openSUSE Network Connection

Stay tuned - in the next post, we'll make use of this image to take a look at Moonlight, the open source implementation of Silverlight on Linux.

4 Comments

  • if it is only the auto-running service which is bothering you, isn't it easier to mark the services as manual and use a batch to start the services before start the main exe file?

  • @tcmaster Not really. This is a one time thing, after which I've got my Virtual PC image ready to run. I can shut it down, saving memory state, and the next time I want to start it, it's running in a few seconds.

  • great post jon. still waiting for your moonlight followup :)

  • i have vmware image splits as 2 files.
    6.2 gb and 434 mb
    named as xxxxx.vmdk and xxxxx-000001.vmdk
    how do i combine both the files as one vhd file
    sry for my bad english

Comments have been disabled for this content.