Tuesday, September 30, 2008
Wine vs Virtualization
For this 'lebaran' holiday i've managed to free up some time to try out virtualbox. Something i wanted to do along time, but got no time to actually do it. The goal is simple, try out virtualization and able to run some windows application in my ubuntu laptop, namely CounterStrike and Warcraft :D
Installing VirtualBox
Installing virtual box is quite easy, you can install it using apt, but I choose install it from the deb package. Just go to http://www.virtualbox.org/wiki/Downloads, and download the appropriate package, in my case it was for ubuntu 8.04 hardy heron.
After the download has finished, install the deb package using sudo dpkg -i [virtual_box_package. deb]. After answering couple of question and license agreement VirtualBox should be available under application > system tools > Sun xVM VirtualBox
Installing the Guest OS
My ubuntu OS in virtualization is known as the "Host OS". While the OS i want to install in VirtualBox is known by the term "Guest OS". In my case I'm planning to install Windows XP as my Guest OS.
The first step in installing the guest os is having the Installation CD or the image for that Installation CD. So i created an image from my XP Installation CD. The first try is a failure. Somehow the image i created using nero express couldn't be booted. So i try making a second image using UltraISO, and it worked. Boot from the CD and installing the Windows XP OS is like a walk in the park.
When you're installing the Guest OS for the first time you will be asked to set the memory and hardisk for your Guest OS. 2GB memory should be enough for my needs. And for the hardisk, I choose 10 GB dynamic hardisk allocation. By using dynamic allocation, it allow the space to grow, from the minimum installation to max 10 GB. Its better instead of allocating 10 GB right away. With fixed hardisk allocation you'll gain better performance, but the dynamic thing fits my need.
With this finished i have two OS running on my laptop, and my work is complete without a hustle. But here come the show stopper.
The Show Stopper
To be able to play a network game, my Guest OS Should be able to connect to the same local network as my Host OS. In VirtualBox 2.0.2 they say that if I'm using DHCP the NAT would work out of the box. To bad my home network only have static IP address :(
After tampering a while, trying couple of the network setting, my Guest OS Network connection still couldn't connect to my local network or the internet. The windows lan connection say that it is connected. But i couldn't ping my gateway.
After googling in the internet, i found out that i need to create a bridge between my Host and Guest OS. But i couldn't find this settings in VirtualBox Network tab. It turn out you need to install uml-utilites and bridge-utils package for ubuntu. You can install it using apt command or synaptic package manager.
I've got the general step from this Post.
Basically you need to set-up a bridge and/or a tap connection in your network interface. And then change the network setting in your VirtualBox Guest OS network setting Attached To option to Host interface. Then use the created tap0 name as the interface name (the bridge name shold work as well but i haven't test it). Then set your Guest OS Network Settings to use your Host IP as it Gateway.
The Other Problem
After succeded doing this. I try running warcraft on the Guess OS. It worked , but i can only go as far as the main screen. Can you guess what the problem is ?
Should have guess it from the start. In virtualization, you got the whole OS virtualized, but that also mean that the hardware is also virtualized. Though it worked out fine for some application. But for games that uses OpenGL and DirectX. It simply wasn't enough.
And that sum up my trial for virtualization. You can play arround with couple of cool stuff in virtualization like guest addition and seamless mode. Try it, its very cool.
A Taste of Wine
While my trial for virtualization is a success, i still didn't get what i wanted. Its time to try a different approach.
For many people that migrating from windows to linux, there's one definite stopper. Games !!
You can find many application that can run in linux and windows. Or find some alternative that have similar capabilities with it windows compatriot. But with games, its a real problem. And wine has been the heroes for this kind of people.
Although its not the real windows, wine implemented almost all of the Windows API in its own way. In same cases it even perform faster than the original windows implementation. Since it stripped down a lot of things that doesn't needed.
In my case after installing wine 1.0.0 from ubuntu repository using apt-get. Installing Counter strike and Running Warcraft like my previous post. Is as simple as a single click :)
An Unimportant Conclusion
In virtualization, you've got the whole package. The real OS, yeah i repeat the real one, run on top of your Host OS. Re-installing the Guest OS wouldn't cause a problem to your primary OS like using dual boot. And you can also run many Operating System at once on a single computer that act like a separated machine.
There are many other advantaged using virtualization, but one thing that it lacked is the access to the real hardware. But I think the advantage still far outweigh the disadvantage.
In my special case i need to be able to run windows program and access the hardware capability. In this part Wine is still the best. There's a lot of program that wine can do, but that also the disadvantage of wine. You need your application to be supported by wine, to know that it will run smoothly on wine. But still there's a whole lot of application that wine supported, including spore *Wow*.
And also since Wine is Windows Emulator, it emulate the application for windows platform only. So your OS option is far more limited.
But the key is know the right tool for your needs. In my case this time, the right tool is Wine :D
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment