Filed under: Utilities, Windows, Linux, Open Source
Run Windows in a virtual machine using Ubuntu and Virtualbox

So we decided it would be fun to try running Windows XP within Ubuntu. Because as much as we love a good open source Linux operating system, there are some Windows applications that we just need to run on a day to day basis. And rather than rebooting into Windows. Inspired by an article showing 4 virtualization applications for Ubuntu, we fired up VirtualBox OSE (open source edition) and pulled out a Windows XP install disc.
One thing to note is that you'll need to add your username to the vboxusers group. You can do this by clicking the System menu in Ubuntu, then finding the Users and Groups option in the Administration submenu.
Windows XP seems just about as responsive when running in VirtualBox as it does when running from a dedicated partition on the same computer. Sound was turned off by default, but that was easy to fix by tweaking the VirtualBox settings. The only real problem we have is that VirtualBox and Windows XP were unable to recognize USB devices. We tried following several sets of instructions from the Ubuntu forums to no avail. Has anyone else tried running Windows XP or Vista in VirtualBox on Ubuntu? What problems have you run into, and how did you overcome them?



Reader Comments (Page 1 of 1)
Rusbee said 12:45PM on 2-10-2008
Virtualbox is a pretty cool application, relatively light-weight and runs fine both under windows and linux.
However, under Gutsy (and many other linux distros), it has a very serious bug when running windows xp (I have not tried Vista). It works just fine for an hour, two hours or more, and then suddenly, it dies. As simple as that, no power down of the OS running in VM, it just closes the virtual machine without even saving its status.
This is a very nasty, persistent bug, and is there regardless of pc architecture (does not matter with Intel or AMD CPUs, if AMD-V or Intel VT is supported by CPU or not). There were long threads of complaints in the support forums of Innotek for a long time, no real solution though.
It made me stop using it, and I never even tried to install the newer VirtualBox 1.5.4, maybe they have solved it by now. Yet, I would not start using it again unless making sure the bug is not there anymore, and certainly not recommend it, unless of course reliability is not a critical factor. In the meantime, why not use the VM-Ware server which is also free?
Reply
Olivier said 12:07AM on 2-11-2008
KVM will be built into Ubuntu's next version, called Hardy Heron and due in April:
http://www.news.com/8301-13580_3-9867657-39.html?tag=nefd.top
elevine said 12:51PM on 2-10-2008
You'll need to use the VirtualBox closed source version to get USB support and some other features (http://www.virtualbox.org/wiki/Editions). Once your guest OS is up an running, install the VirtualBox Guest Additions in your guest OS (in the Windows guest, this should show up through an extra CD drive ). In addition to the Ubuntu tweaks found in the forums, I had to turn off USB 2.0 in the Windows guest settings to get USB hard drive devices (like an iPod) working in the Windows guest. You'll also need to add USB filters in the guest settings to get make the devices available to the guest OS.
Reply
Crafton said 12:51PM on 2-10-2008
Used Virtualbox on Gutsy 64 with windows XP, vista Business, and Centos 5 with absolutely no problems. It is surprisingly fast in Vista. The only issue I had with vista was mounting the vbox shared drive, the work-around is simply to switch off the annoying vista UAC.
Reply
rothgar said 1:38PM on 2-10-2008
I can't seem to make my XP sp2 installation reliably go fullscreen or put it in coherence mode. My Ubuntu background freezes and other things stop responding. I also don't have USB support but I don't care about that too much. It would be ideal to have XP on one side of my cube in full screen mode with vista, ubuntu, osx on the other three. but that is asking a heck of a lot from my computer.
I also have still not found a way to install OSX 10.5 :(
Reply
David said 10:44PM on 2-10-2008
I installed XP on vmware and virtualbox, and I can get internet on virtual box, but not networking or USB devices
Reply
dannymichel said 1:50AM on 2-19-2008
How did you get your internet working?
Freezer said 12:54AM on 2-11-2008
The only thing holding VirutalBox back rom being perfect is that it doesn't support Direct3D - which means I need to dual-boot for most of my games (I was stunned at how many causal games were built around Direct3D with no OpenGL support). From what I've heard, D3D support is a couple of years away, minimum. And there's no way I'm paying $50 for unguaranteed results with Cedega.
Reply
Kevin said 7:39AM on 2-11-2008
I have run Windows XP and Windows Vista under VirtualBox; I'd prefer running XP over Vista, especially since Vista needs more RAM. I've used it with Ubuntu as the host operating system, and I loved using the seamless mode (with my start bar on screen with my Gnome (or KDE) panels. One thing I noticed is that it acts funky when no Windows XP application is open and it is in seamless mode - the background kind of flashes. I believe I've had the USB support working (sometimes I have to restart the guest, and if I'm using XP as the host, I *have* to restart XP the first time.) I've never managed to get the shared folders feature working.
I have not run into the bug Rusbee described, but I never had my Windows guest open that long. The main issue I have is with a Windows XP guest running with seamless mode and the desktop "funkyness." Also, I have problems when the "desktop effects" are turned on in Ubuntu.
Reply
Lisa said 12:40PM on 2-11-2008
Bought a Toshiba laptop a few months ago. A215-S7422. It was a retail purchase and I couldn't find one with Windows XP at the price I got it for, about $500 after rebates (didn't get the rebates yet). So I got stuck with Windows Vista, with 1GB ram, a speedy AMD Turion dual-core processor, and supposedly decent graphics. My last laptop was a Toshiba with a 133 MHz processor. That one came with the IBM mouse pointing stick in the middle of the keyboard. This new laptop has the Synaptics Touchpad instead, something I knew I would detest before I bought the laptop, but price trumps features in my case. After I brought the laptop home, I tried Windows Vista for a few days and detested it so much I installed Debian Etch in a dual boot setup. Anyone considering purchasing a Toshiba laptop to run Linux...don't. It was a freakin nightmare to get the AMD/ATI proprietary video driver working after I finally found it on the AMD/ATI site. This is after months of google searching over the video issue and trying the very few blog tips I found. In the meantime, the laptop was using the default vesa driver and automatically logging me out of and killing the X server every few days, losing all my work and open browser tabs. Oh, and no sound working yet.
I installed KVM so I could use Windows Vista when I have to without shutting down Linux, but KVM appears to be command line only and the necessary switches/flags required to initially set it up looked a bit too complicated for my taste. Then I saw someone else mention Virtualbox. I installed that, and the setup was a breeze. I downloaded the netinstall iso for Debian testing and tried to create an image using that, but I can't get X to work all because of the detested Synaptics Touchpad. I'm using the laptop as a temporary web server until I replace a crashed web server, and wanted to create a sandbox to try out Drupal and Joomla (and get a handle on security issues since I see Drupal and Joomla probes in my web server logs) without messing with the web sites the laptop is currently serving.
So...here's the error messages if anyone has a clue...
$ startx...
...
(==) Using config file: "/etc/X11/xorg.conf"
(II) Module already built-in
(EE) AIGLX: Screen 0 is not DRI capable
Synaptics Touchpad no synaptics event device found (checked 14 nodes)
Query no Synaptics: 6003C8
(EE) Synaptics Touchpad no synaptics touchpad detected and no repeater device
(EE) Synaptics Touchpad Unable to query/initialize Synaptics hardware
(EE) PreInit failed for input device "Synaptics Touchpad"
expected keysym, got XF86KbdLightOnOff: line 70 of pc
expected keysym, got XF86KbdBrightnessDown: line 71 of pc
expected keysym, got XF86KbdBrightnessUp: line 72 of pc
waiting for X server to shut down FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.
$
If I could get this working, I plan on trying/installing Kubuntu, WinVista (keeping the dual boot strictly for BIOS updates and a GPS that requires Windows to load maps and performing other tasks/utilities, and any other tasks requiring Windows that won't work with Linux will be virtualized if it works that way) and installing/trying a few other linux distros, something I used to do when I could pick up a desktop and use as a desktop or server for $200 back in the AMD 1 GHz days, these days those old computers are dead (dead power supply, motherboard problem, a few other problems, too many to swap around hardware anymore). Virtualization will enable me to experiment once again with different Linux distros and create some web development environments with Drupal, Joomla, ezPublish, and try out SugarCRM and other applications I'm interested in trying.
Reply
Ken said 10:46AM on 2-28-2008
Lisa, have you tried ubuntu gutsy on the toshiba? I installed it on my dell inspiron which also has a synaptics touchpad and ATI graphics and have had little problem (I also found that there is a ton of forum support.)
If you go here: http://albertomilone.com/nvidia_scripts1.html
you can download Envy and it will install an ATI driver for you and configure xorg.
I also had to install ndiswrapper to handle my wifi, but that's about all I had to do to get my laptop working well.
David said 5:06PM on 2-18-2008
dannymichel, I am not sure how I got Internet working...I'm not sure if I did it by accident or if I found a tutorial. the Ubuntu Forums helped me a lot regardless, you might find an answer there. I really don't know...It might have automatically done it, or it might be something in the settings that I changed around.
Reply
Ken said 12:05PM on 2-28-2008
I run ubuntu gutsy on my laptop that I use for work. The database that we run only works with Internet Explorer 6 and higher, and doesn't work that well with user agent switcher in firefox. I also like the functionality of tabs and despise the windows live toolbar, so IE6 under wine is out for me.
I've been running XP on virtualbox for the past five months or so with few problems. I use it daily for six to eight hours a day.
There's a good thread on how to enable USB support for virtualbox here: http://www.ubuntu1501.com/2007/12/installing-virtualbox-with-usb-support.html
After following the guide I got it to work well on my inspiron. I can sync my ppc PDA over my virtualbox outlook easily... something that is a nightmare to configure with linux.
My only complaint about this software is the lack of direct3d support. I don't play a lot of games, but my kids do. Their games typically have small hardware requirements and could easily be managed in a virtual environment. It would be nice not to have to dual-boot to run a game for them.
Overall, however, i'm very happy with this software. It lets me run quicken and do other things that I normally couldn't do without dual-booting, or getting frustrated with crossover or wine configurations.
Reply
Joe said 9:57PM on 4-03-2008
A great guide Thanks.
Very interesting that Sun has acquired VIrtualBox.
http://www.virtualizationmanager.com/
Reply
DeepUbuntu said 6:10AM on 4-25-2008
Hi , I have HP lapto DV 5118 I have ubuntu 7.01, i installed Virtual box and guest os is win XP
Sound is proper
Video Graphics are proper
the only thing i cant configure is internet connection,
using ubuntu i am connected to the broadband internet connection but i am not able to run and web page in guest os xp
please help me with this situation.
Reply
altosax said 3:52PM on 4-27-2008
I'm a Ubuntu 7.10 user but I need to load windows to run some photo processing software. I am thinking of buying a windows xp home OEM disk from newegg or tiger direct and I'm wondering if I'll have any problems loading an OEM version of windows. Here's a link to the product
http://www.newegg.com/Product/Product.aspx?Item=N82E16832116056
Reply