Saturday, May 10, 2008

Hillary making Obama's superdelegates an offer they can't refuse...

Monday, May 05, 2008

Running XP as a Virtual Machine on ASUS EEE PC

Hi everyone,

We're taking a little pause from the Bird and the Ant for just a moment to talk about the Asus EEE PC... and how to get XP running on it without removing the Xandros default install.

There are a lot of guides on how to install XP on your EEEPC which are really great and I appreciate the time and effort that has been put into them… but if you’re like me, some of you may have tried and failed due to one reason or another. In my case, I had XP2002 which won’t install on the EEEPC as the guides will tell you.

I was convinced to try running XP as a virtual machine on my computer and I was initially against it as I thought it would be a major burden on my system (i.e. my impatient self couldn’t handle the decrease in speed) and that it wouldn’t fully work etc. But seeing as I had little option I went ahead and it did and the results were pretty amazing. Yes XP runs slow, but not 286 slow… it has full functionality and you DON’T NEED TO INSTALL ASUS XP DRIVERS. You read correctly, completely unnecessary!

I have the following programs installed (working fully functional): Office 2007, Endnote, Foxit reader, Esword and Ccleaner. My biggest complaint with Open Office (and by extension Linux) is that it isn’t compatible with Endnote… and for a PhD student like myself who is writing a thesis, Endnote is a must and none of the alternatives are compatible. Running Office and Endnote simultaneously via Wine is out of the question (too complex and difficult, not chance it will work). But on a Virtual machine running XP, I can run Office 2007 beautifully with Endnote… no problems at all.

So I’d like to put down the following guide on how to run XP as a virtual machine using Virtual Box. I haven’t tried running Vista as a virtual machine, though you’re welcome to try and post here.

Ok… to install virtual box on your desktop and EEEPC - there are already instructions on the Wiki here. IMPORTANT: Follow the instructions carefully and make sure you read the 3rd post down by Spode when he follows up a question (this is critical to making sure Vbox installs… i.e. sudo usermod –a –G vboxusers user). This whole process may take some time if you’re a Linux n00b like me. Make sure you have enough hard drive space on your EEEPC to install the source (don’t freak, just make sure you don’t have a couple 100Mb left is what I mean). The reason you need a desktop is because creating your virtual computer with XP+ will be faster and significantly easier than if you did it on your EEEPC.

Part 2 – Creating your virtual computer

This is where the fun begins… a fantastic article has already been written by ‘Doody’ located here. Follow his instructions for creating your virtual computer carefully. Here are my little modifications:

Don’t worry about conserving Ram at this stage because you’re creating your virtual machine on your desktop… follow Doody’s guide as it relates to the amount of Ram you have your desktop. Pay close attention to Part 5 because you’ll need to set the Ram at an optimized level… remember!

Create a ‘dynamically expanding image’ for your hard drive… now when I first did this I misunderstood what this was about. The hard drive file (.vdi) will start out a few KB in size, but after you install XP and Office etc it grow as space is required. When you create this hard drive and set it to ‘dynamically expanding image’, you have to set a ceiling for the hard drive. If you set it to 3Gig, then the hard drive won’t expand past 3Gig.

When you create the hard drive, my recommendation is that you set it at 6Gig… my chief reason is because I installed a full version of XP on my EEEPC, not an Nlited version (I’ll explain more of this later). A full version of XP (SP2) plus software will take up 3Gig easy.

Everything else is pretty straightforward if you follow the guide by Doody.

Part 3 – Install XP and software on your virtual computer

So you might be wondering why I installed a full version of XP on my EEEPC thereby wasting precious space on my SDHC card… well I tried on several occasions to create a Nlited version of XP and it always didn’t work out. I used to always miss something like administrative privileges and sometimes it just didn’t work… who knows, after a while I stopped trying. If you’ve created a working Nlited version of XP, knock yourself out and try it out. If it doesn’t work, be assured that full version isn’t that bad.

Now here’s the kicker… you don’t need to install the Asus XP drivers (and I don’t think you can anyway) on your virtual XP (see the discussion on Doody’s guide). I’ll explain why in Part 5.

The key for this stage is to install all the software you’re going to use on your virtual machine now on your desktop… after you finish this, you simply transfer the virtual machine to your EEEPC and you’re ready to go. Like I said I installed SP2, Office 2007, Endnote, Foxit, Esword and Ccleaner on my virtual computer using my desktop (don’t bother validating Windows or Office yet, you’ll have to do it again when it’s running on your EEEPC because it detects the move). The elegance in all of this is that the virtual computer is just one .vdi file on your desktop computer… not complicated at all.

To get install files to your virtual computers there are a few ways to do it. For Windows XP and Office it’s easy because they’re on CD and the virtual machine will connect to your CD drive to boot/run off the CD. But if you have lots of install files you want to get to your virtual computer the most direct way is to create an Iso containing all the files you want (I’m going to assume you know how to do this). When you run the virtual machine you can mount Iso images from your desktop onto the virtual machine and run the ‘virtual CD’… pretty sweet. For the moment ignore ‘run guest additions’ under the devices tab on your taskbar but remember it for later.

Part 4 – Transferring the .vdi file from the desktop PC to EEEPC

So there are two ways you can do this: USB stick or network. If you have a USB stick, that’s pretty simple and easy to do. If you don’t, setup a network connection between your desktop and EEEPC. I didn’t have the USB stick so I did the network connection. I’m not going to get into setting up network connections between the EEEPC and Windows/Ubuntu/Mac/whatever… except to say that there’s plenty of info on the forums and on the Wiki to help you through this, but if you’re a n00b like me this may be a bottleneck for time (sorry). Word of advice if you’re setting up a network connection to a Windows computer… plug your network cable from your EEEPC to the modem not directly into your computer and follow these instructions very carefully here.

When transferring the .vdi file (default installation should place the file at - C:\Documents and Settings\User\.VirtualBox\VDI), transfer it directly to your SDHC card already inserted in your EEEPC. By this time, your virtual machine .vdi file should be a couple of Gig in size depending on what you installed. Take a break, have a coffee and go expose yourself to sunlight to stimulate Vitamin D production cause the transfer’s going to take a little while… if it’s night time, read a book and don’t look at pR0n cause it ruins lives and marriages.

Part 5 – Setting up your virtual machine on your EEEPC

OK so I’m assuming that you’ve successfully installed Virtual Box on your EEEPC. I tried doing the script for the Icon on Linux desktop (Easy mode) but it didn’t work. Every time I want to run Virtual box, I open up a terminal and type:

sudo /bin/vboxrun

If it bothers you that much, write a script that’s easy to do and post it. Now everything I’m writing from here on in is from memory because I installed the Virtual Machine a little while ago… so if it doesn’t work out exactly as I said it would you’ll have to improvise like I did when I did it for the first time, all else fails just post a question.

You’ll have to create a new virtual machine so click ‘New’… type in the name of your computer and make sure the pull-down tab has ‘Windows XP’ selected… set your Ram size:

Most people don’t have 1G ram installed on their EEEPC… ok I don’t so I’m stuck with 512MB. The minimum allocated Ram that Vbox will run on the EEEPC is 220MB. Any higher and EEEPC will reset itself (don’t ask me why, computer can’t take it). If you have more RAM to play with then use Doody’s guide for allocating Ram.

Next you’ll come up to selecting the primary hard disk… here we click the ‘existing’ button and locate your .vdi file on your SDHC (for my n00b brethren… look under ‘Home’ or ‘Media’ directory). After you’ve selected your .vdi file you should be ready to rock and roll. So now before you start, if you want sound you’ll have to scroll down on the right panel of the main Virtual Box window to where it says ‘Audio’. Click it and another window should pop up… click ‘Enable Sound’ and select the ‘OSS Driver’ (I think that’s the right one, not sure… no drama if it isn’t, just go through all the options until it works). One last thing before you get started, go to the main window at ‘File->Preferences->Input’ and change the host key to ‘Right Alt’ (because you don’t have a right control button).

Go back to the main screen, select your Virtual Machine and click ‘Start’. Windows will load up after a minute or so (again depending whether it’s a full version or not) but once it’s done you’ll get a whole series of messages like ‘you need to activate windows or die’ and ‘the screen resolution is optimized for an elf, click here to change it’. Don’t change the resolution yet… this is the great bit, you don’t have to install the Asus XP drivers because Virtual Box has a nifty little feature to adjust resolution and whatnot for you. Make sure your virtual machine isn’t at full screen (press Right Alt-F if it is), go to ‘Devices’ in the virtual machine window and click ‘Install Guest additions’. Follow the instructions and reset the computer when it’s done. Now XP should be at a resized form that looks great. I recommend installing a program for XP that lets you move windows around like in Linux, by pressing the Alt and LMB as some windows sizes will still be too big for the screen.

Make sure you have an active internet connection so you can activate Windows and Office 2007 (if you have it).

Part 7 – Run and Enjoy

So I think I’ve covered everything… I’m sure I’ve missed something but I’ve tried to give you all the tips and tricks I could think of as I went through this process. Like I said, I haven’t tried this with Vista or Ubuntu although I’m sure it would work… if you do get it work, please let us know. Any questions, post on the EEE user forums.

Dr Washo

(Credit to Spode and Doody in particular for the excellent guides and EEE user for their delightful Wiki and Forum)