Posted by: reformedmusings | December 12, 2008

Creating a Windows XP guest in VirtualBox for Linux

In a previous post, I showed how to set up Sun’s VirtualBox in Ubuntu 8.10 Intrepid. Then, I went through setting up a PCLinuxOS virtual machine in VirtualBox, followed up with how to install Guest Additions in that virtual machine. However, many folks probably want to run a Windows guest under Linux, so this post will run through that procedure. You’ll find it remarkably similar to the PCLinuxOS example, though the Guest Additions install somewhat differently.

Begin by clicking on New on the VirtualBox icon bar. The initial steps are the same as in my previous post, so I won’t run though it all again. This time, VirtualBox will suggest a 10GB hard drive image. I believe that’s a safe size for most test purposes. If you want to run a number of large Windows programs, a larger size may be worthwhile. If you follow the recommendation to use dynamic sizing on the disk image, it’s harmless to pick a larger image size because it will start small and grow as you need. Also remember that Windows is a memory hog, so 512MB should be a good minimum RAM size if you have the system RAM available.

In order to save time, I ripped my WinXP CD to an iso image file that loads much faster in a virtual machine than a physical CD. Set the VirtualBox CD/DVD-ROM to either point to your physical CD or its iso image. When you are all set, Click on Start. The virtual machine will boot off of the Windows CD/image:

winxp-setup

That may look familiar. Work through the normal Windows installation process, answering the usual questions in the usual way. All the screens look as usual:

winxp-setup2

I put that screen up because of the funky time estimate on the left. When installing from a CD, WinXP takes much longer than these estimates. From an iso image, though, the installation proceeds with alacrity. Not nearly as quick as a Linux install, but very quick for Windows.

When all is done in this phase, reboot the virtual machine for the graphic installation phase. You’ll have to enter the dreaded, long serial number that symbolizes the slavery that goes with Microsoft. After the install completes and the system reboots yet again, you’ll be in full-up WinXP under Linux:

winxp-started

Tour of WinXP, anyone? But, you aren’t done yet. You still need to install VirtualBox Guest Additions in the virtual machine.

To start this process, right click on the CD icon on the bottom-right tool panel. If the mouse is captured by the guest, you’ll have to release it first with the right-control key. On the menu popup after right-clicking the CD icon, select “CD/DVD ROM image…”:

winxp-vdmIf you previously installed VirtualBox Guest Additions in another virtual machine, that CD image will still be listed as in this case above. If not, its path should be /usr/share/virtualbox/VBoxGuestAdditions.iso if VirtualBox installed from a repository. If you installed it from a user download, the iso file will probably under /opt/VirtualBox-2.0.6/ according to Sun’s documentation. After adding the image to the list, select the image and click on Select. If AutoStart is enabled in the WinXP guest, the CD will start the installation automatically. You can also try starting the install from the menu:

winxp-install-ga-menu

If not, open the CD in a file manager and execute VBoxWindowsAdditions.exe. This is what you’ll get:

winxp-ga-setup

Simply keep clicking on Next to work through the installation. At some point, you will get two warnings from Windows about non-certified drivers. One will be for the video driver, the other for the mouse:

winxp-ga-warnings

The correct answer is to Continue Anyway. When the installation completes, you’ll get this:

winxp-ga-done

You will have to restart the guest after clicking on finish. After the reboot, you’ll have a small cube icon in the system tray that indicates that Guest Additions is loaded:

winxp-final-ie

You can now set a better video resolution, the mouse will auto-capture, you can cut and paste between host and guest, share files between them, etc. I listed the benefits at the end of this post. One that I didn’t illustrate earlier is the Seemless Windows feature. For this example, I used the Internet Explorer from the above screenshot and started Seemless Windows. That put IE on the Linux desktop, looking as if it was a native Linux program:

winxp-ie-seemless

Note that the Windows launcher panel locates to the bottom of the screen. It works just as it would in the virtual machine window. Whatever program that you launch from the Start menu comes up on the Linux desktop looking like a native Linux program. Very cool.

From what I can tell so far, Windows XP appears to work quite well under VirtualBox. It seems about as responsive as it would be in a dual-boot arrangement. So, if you need some Windows programs in Linux that won’t run under Wine, Sun’s VirtualBox provides a good and free approach.

Advertisements

Responses

  1. […] To create the template I must create a new virtual machine, the process is no different from any other VM creation. Rather than reinvent the wheel and guide you through installing Windows in a VirtualBox guest I am going to send you to a good tutorial I found Creating a Windows XP guest in VirtualBox for Linux. […]

  2. […] In a previous post, I showed how to set up Sun’s VirtualBox in Ubuntu 8.10 Intrepid. Then, I went through setting up a PCLinuxOS virtual machine in VirtualBox, followed up with how to install Guest Additions in that virtual machine. However, many folks probably want to run a Windows guest under Linux, so this post will run through that procedure. You’ll find it remarkably similar to the PCLinuxOS example, though the Guest Additions install somewh … Read More […]


Categories

%d bloggers like this: