Freelancer on VirtualBox: you heard it here first

10 April 2009

You can now play Freelancer under Linux with 100% compatibility by running it under VirtualBox with Direct3D acceleration!

Freelancer in VirtualBox

Thanks to the OpenGL support in VirtualBox, and the awesome WineD3D work by Robert Millan, Freelancer, which is a 2003 Direct3D 8.1 game, runs perfectly in VirtualBox.

All you need is the latest VirtualBox (2.1 or 2.2 will do), a copy of Windows to run inside it, and the latest WineD3D for Windows. I tested on both XP and Vista — it ran smoother on Vista (ironically), but both were playable.

Freelancer has worked in Wine on Linux without virtualisation for some years now, but multiplayer support is something that has never worked properly. With virtualisation, Freelancer can use the native Windows networking, and thus works perfectly with multiplayer.

(Well, actually, if you use Windows Vista, you have to disable IPv6, otherwise multiplayer doesn’t work, but that’s a different story.)

The game runs much smoother than back when I ran it in VMware: the speed was inconsistent, and I used to get booted off multiplayer servers for allegedly using “speed mods”. With VirtualBox, performance is extremely consistent. (Although Moore’s Law may have something to do with that.)

Have fun!

VERR_SUPDRV_COMPONENT_NOT_FOUND on VirtualBox

6 January 2009

If anybody is getting the VERR_SUPDRV_COMPONENT_NOT_FOUND error when trying to start a VM in VirtualBox when trying to set up Host Interface networking, the error is occurring because VirtualBox can’t communicate with the vboxnetflt driver.

To fix this, simply load the vboxnetflt module:

# modprobe vboxnetflt

Then, try starting the VM again. If it works, you know that the problem is that the vboxnetflt module is not loading on startup.

If it didn’t work, make sure the module has been built. A little # /etc/init.d/vboxdrv setup ought to do the trick.

On most Linux systems, you can add an entry to /etc/modprobe.conf to make the module load on startup. (On OpenRC-based Gentoo systems, you can add an entry to /etc/conf.d/modules to do it the Gentoo Way™.)

VirtualBox 2.1.0 does OpenGL 3D acceleration

18 December 2008

VirtualBox 2.1.0, released today (see the changelog), does OpenGL 3D acceleration, which is something I have been hanging out for for a very long time. It doesn’t yet do Direct3D acceleration, but OpenGL is sufficient to run many popular games, namely ones based on the id Tech 3 (Quake III Arena, Jedi Knight II, Jedi Academy, Alice, etc.), Half-Life, or Source engine.

The 3D acceleration works with a Windows guest (with guest additions installed), and works on any host operating system (including Linux).

OpenGL in VirtualBox

The above screenshot shows me running Quake III Arena in Windows XP in VirtualBox 2.1.0 in Gentoo, which is running at 52fps.

It is quite ironic that VirtualBox only supports OpenGL acceleration. VMware has had 3D acceleration for a while now, but they have only supported Direct3D, not OpenGL. So I suppose in the meantime, you can use VirtualBox for OpenGL games, and VMware for Direct3D games. Everybody’s happy!

Update: I filed a bug report in the VirtualBox bug tracker saying that WineD3D should be used to achieve Direct3D acceleration.

This is for real

11 November 2007

Yesterday, I discovered that VirtualBox features a “seamless” mode, which allows you to display windows from your virtual machine in your host desktop environment. It’s actually very cool — check out the screenshot:

Windows Vista and Mac OS X running under Ubuntu

Just for kicks, I also ran a VM of Mac OS X, which you can see in the screenshot as well.