Skip to main content

Linux in a virtual machine

Woo hoo I'm writing this using Firefox on Linux running in a vitual machine on my Windows XP computer. About a week ago a work colleague had to resort to a virtual machine to get a piece of software running that was not compaitble with his new Vista laptop. That sparked my interest so I thought I would play around a bit. Every virtual machine needs an operating system so I thought I'd have a go at getting Linux running in a virtual machine while I was at it. Since I had limited experience of either virtual machines or Linux I could kill two birds with the one stone.

Linux comes in many flavours but the flavour of the month for noobs like myself is called Ubuntu. It's an easy to install complete package using the clean and simple Gnome interface. Better still I happened to have an install CD from Ubuntu version 6.06 that I had downloaded a few months back but never got around to using.

My first choice of virtual machine was Microsoft Vitual PC 2007. This has the great advantages of being completely free and ludicrously easy to use. Microsoft don't claim to support Linux but several people have reported success at getting Ubuntu to work under VPC 2007 so I thought it was wirth a shot. Download - install - run - creaste new virtual PC. There are very few parameters to enter basically just the size of memory and hard disk for the virtual machine. When you start the virtual machine it looks for a boot disk in the CD drive and it happily booted the Ubuntu install CD. First attempt gave a corrupted screen however but googling around pointed to the need to start Ubuntu ins "safe graphics" mode. Bingo I was running Linux. Ubuntu runs from the CD on first boot and it is painfully slow so I installed it to the virtual hard drive. It ran quite successfully but things were a little slow. The mouse in particular was unresponsive and the mousewheel didn't work at all. Initially I got no sound but I did find a fix on Google. This was a bit messy involving editing a system file to tell it about the Soundblaster 16 that Virtual PC emulates. There doesn't seem to be a "root" log in in Ubuntu so in order to change system files you need to use a "sudo" command to run the editor. A bit messy but I figured it out eventually. One reboot later and I had sound. Sadly the sound was very scratchy and not really worth the effort. Perhaps virtual PC would work better with microsoft products but with an unresponsive mouse and poor sound I wasn't too impressed with Linux performance.

As far as I can make out the market leader in virtualisation is a company called VMware. Internet buzz suggested that VMware is faster and more flexible than virtual PC but VMware's flagship products are not free. Wikipedia however revealed an interesting fact. VMware do offer a free "player" for download that can run virtual machines created on their commercial products. Better still it turns out there are a number of free applications that can create virtual machines that run just fine with VMware player. I tried two a web based application called EasyVMX and a downloadable app called VMXbuilder. EasyVMX is easier to use offering three levels of sophistciation. The easiest level is about as easy as virtual pc 2007. VMXbuilder seems to be more flexible and I actually prefer it.

In use VMware player is about as simple as Virtual PC 2007 just open the player select the virtual machine you want and you are off. It seems to run a lot more quickly though. The system is very useable with no mouse lag and a working mousewheel. Ubuntu automatically recognised the default sound system and the sound was much better than the scratchy sound I got from Virtual PC. I was using 512M of virtual memory and 10Gb of virtual disk for both tests. I even managed to connect Ubuntu to my windows network and connected to a shared printer although in order to do this I had to change the ethernet setup from the default NAT (where the virtual machine hides behind the host machines IP address) to bridged (where the virtual machine talks directly to the network. Sadly in messing around I managed to uninstall the sound card and I haven't yet found out how to re-install it. Plug and Play doesn't seem to be a big concept in the Linux world. My biggest gripe with VMplayer is that it doesn't stretch the virtual display in full screen mode. Perhaps this is a setting I haven't figured out yet. I am sure Virtual PC could do this. Even allowing for this I have to say that VMware player seems to be the better option for Linux.

Is all this useful? Probably not. It might be handy to be able to run some old game using an old version of windows but in my eperience the community are fairly quick to come up with emulators and such that will allow you to play whatever you want on the latest flavour of Windows. Unix is fun and I have to say that Ubuntu looks and feels very polished. Installing new hardware is a bit painful but apart from that everything seems very straightforward. I really love the idea of a free operating system. That said I cannot think of a reason to use it. Windows does everything I want and many of the best Linux applications have been ported to Windows (eg Open Office, The Gimp, Tuxpaint). I do think we owe a huge debt to those who provide free software however and the computing world would be a much less friendly place if the whole GNU / Linux phenomenon had not taken place.

EDIT: Well I got the sound working again - it was a simple matter of enabling sound in the vmx file. Getting full screen mode is a knottier problem. It seems to be a feature (bug!) of the current implementation of VMware player. Perhaps this is a deliberate ploy to convince people to buy one of the commercial packages. There is a kind of a work around - the vmx file has a flag that allows you to enter fullscreen mode when you first start the virtual machine. This works but if you go back to windows you cannot return to full screen mode.

Comments

havard said…
Hi, I just finished reading your story about virtualization. And it was a great read!

Neither virtualization or getting started with a new operating system is a trivial task, and I quite enjoyed your detailed description of the experience.

You got the fact that VMware Player doesn't create virtual machine. This also means that Player doesn't have the need to include the drivers for new virtual machines either. This is the source for some of your negative experience. The most noticable is the lack graphics drivers.

Unfortunately, VMware prohibits redistribution of these drivers (called VMware Tools), so you will have to Google for them.

Good luck with both Linux and virtualization.

Havard from http://www.easyvmx.com
mbp said…
Thanks Harvard. I have to say I was amazed at how easy the whole process is. Easyvmx is a terrific tool and the forum is a great information resource - thank you for providing it.

Popular posts from this blog

Android Tip 3: Sharing a Folder between multiple users of an Android device

Android has allowed multiple user logins for quite a while now. This is can be very useful for tablets which are shared by family members. Normally Android erects strict Chinese walls between users preventing them from using each others apps and viewing each others files. This is a useful security feature and ensures your kids don't mess up your work spreadsheets when screwing around on the tablet and should also prevent them from buying €1,000 worth of Clash of Candy coins on your account. Sometimes however you really do want to share stuff with other users and this can prove surprisingly difficult. For example on a recent holiday I realised that I wanted to share a folder full of travel documents with my wife. Here are some ways to achieve this. 1. If you have guaranteed internet access  then you can create a shared folder on either Dropbox or Google drive. Either of these has the great advantage of being able to access the files on any device and the great disadvantage of bein...

Portal 2 two screen coop on one PC.

I mentioned before that I intended to try Portal 2 in "unofficial split screen co-op mode. Well split screen on a small computer monitor is a recipe for a headache especially when the game defies gravity as much as portal. However a minor bit of extra fiddling allowed us to drive two seperate screens from one PC. The Steam forums describes a complicated method of doing this that I couldn't get working so this simpler method which worked for me might be of use to someone. 1. First I followed the instructions in this post to get split screen multi-player working: http://forums.steampowered.com/forums/showthread.php?t=1847904 A minor issue not mentioned is that you need to enable the console from the keyboard/mouse options menu I am using keyboard and one wired Xbox360 controller as suggested. Getting the controller to switch to channel 2 was tricky at first but as Chameleon8 mentions plugging it out and in again during loading works. The trick for me was to do the plug / p...

Lotro: The Forgotten Treasury

Throg joined a Kinship group for the Forgotten Treasury instance last night. It was an enjoyable change from the solo questing that the now level 55 dwarf champion has been mostly doing so far in Moria. Some members of the group had tried and failed to clear the Treasury before so we knew it would be challenging but we were lucky enough to have a well balanced group with Guardian, Minstrel, Lore Master, Hunter, Burglar and Champion (Throg). Throg (level 55) and the minstrel (53) were both below the 56ish level of the instance but the others were all higher so it more or less balanced out. [SPOILERs ahead] It is a well designed enjoyable instance set in a circular chamber with balcony around. As you enter, a boss absconds to a locked side chamber with his treasure leaving the fellowship to clear trash ringed around the balcony. Once the trash are cleared you have access to a puzzle which must be solved in order to open the locked door. Clearing the (including six mini bosses) also get...