Saturday, April 25, 2009

VirtualBox 2.2.0 Bug: HostKey Can't Be Changed

I recently upgraded my VirtualBox installation to the latest & greatest version 2.2.0, on my Vista Business notebook, just to find that NAT and bridged-networking wouldn't work in my Windows XP Professional guest. Research revealed that this problem could be fixed simply by re-running the installation and choosing "Repair." That's precisely what I did and that fixed the issue, however, only partially. Now I could browse the Internet in my guest OS but I couldn't access any resources on my office's network (my host connects to the office via Cisco VPN). So this time around, I uninstalled VirtualBox, restarted my notebook, and installed VirtualBox 2.2.0 afresh. This resolved all networking-related issues. However, now it wouldn't let me change the HostKey from Right Ctrl to Right Alt, or any other for that matter. After a bit of Googling, I landed at a page describing this was a bug in the newest version (the bug's been fixed and the fix will be available in the upcoming release). Crap! Because I couldn't live with Right Ctrl as my HostKey, I had to figure out a way to change it to Right Alt. Here's how you do it without having to hand-edit any configuration files. Perhaps an easy way of changing the HostKey until the fix is released is to use VBoxManage with the setextradata switch. So if you wanted to change the HostKey to the Right Alt key (numeric code 165), you would execute the following command: VBoxManage.exe setextradata global GUI/Input/HostKey 165 I've posted this solution at the bug page also. You could see details on the bug and this work-around (and others) here.