Tuesday, June 28, 2011

VirtualPC and Ubuntu

As I discussed last time, I have settled on Virtual PC as my virtual machine emulator. But again that's not to say Virtual PC is without its share of problems. While installing Ubuntu I've run into a minor little problem... the fact that you can't install Ubuntu because the virtual machine keeps crashing.

After researching this I've found the problem and a solution. But I feel like I'm caught in the middle of a battle between two giants. The crux of the problem is Virtual PC does not support 24-bit color, only 8-bit, 16-bit, and 32-bit. This is no doubt because Windows uses 8, 16, and 32-bit color depths. But Ubuntu is Linux which apparently uses 24-bit as the high instead of 32-bit. Because Ubuntu is trying to use a color depth not supported by Virtual PC it results in a crash inside the virtual machine. But I said I feel like I'm caught between two titans. I feel like Microsoft should fix this, they should add 24-bit color support (after all VirtualBox supports it). But I also found an interesting blog post from a Microsoft developer on the VPC team. In it he said Microsoft's virtual video card reports that it does not support 24-bit color. This means there is a bug in Ubuntu, it's not correctly detecting the lack of 24-bit support. So which giant is going to fix the problem first, Microsoft or Ubuntu? And in the mean time I'm stuck in the middle.

Even with the bug, I have found a way to work around the issue. First, when installing Ubuntu you need to disable hardware-assisted virtualization support. This will allow you to install Ubuntu without a crash. Once installed you can change the UI settings to use 16-bit color instead of 24-bit. And the final gotcha is GRUB, the Linux boot loader. The new version of GRUB uses a graphical mode which, surprise surprise, is in 24-bit color. In Ubuntu add a package to your system called "StartupManager" This program allows you to set the color depth used by GRUB. After you make all these changes you can reenable hardware-assisted virtualization support.

Using virtual machines can be a huge time saver, but at the same time when you run into issues like these virtualization can be nothing but a headache.

No comments:

Post a Comment