VirtualBox CompareExchange128 Error
Over the past few days, the Internet has been abuzz with articles, Tweets and showcases of Windows 8.1 Preview and Visual Studio 2013 Preview. My curiosity got the better of me, so last night I decided to give Windows 8.1 Preview a whirl.
So as any good intrepid explorer will do, I decided to install this on a Virtual Machine (My weapon of choice being Virtualbox – current version 4.2.14). VirtualBox is truly one of my most favourite development tools I have and I use it on a daily basis.
I fired up my VM and proceeded to mount the Windows 8.1 Preview ISO. The installation started executing quite smoothly but unfortunately after a minute or two later I was presented with a curious error. “You can’t install Windows 8.1 Preview because your processor doesn’t support CompareExchange128”.
It turns out that the problem is a quick one to fix and I decided to post a short article on how to resolve it below. The VirtualBox CompareExchange128 Error is caused by the fact that the CMPXCHG16B CPU Instruction hasn’t been enabled in VirtualBox.
Resolved: VirtualBox CompareExchange128 Error
To fix the VirtualBox CompareExchange128 Error, close down your VirtualBox VM and return to your host. Fire up your Command Prompt (run this as Administrator) and change your directory to the VirtualBox installation directory.
Then type the following command into the console window and press enter.
vboxmanage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1
At first it will seem as though nothing is happening because the command doesn’t return any feedback on the screen. If you see the path displayed on the screen in a new line, the command executed correctly.
Start your VirtualBox VM again and restart your Windows 8.1 Preview install. I hope that this short post will be of help to someone. Enjoy!
Update – 8 July 2013
The latest release of Virtualbox (version 4.2.16) resolves this issue. If you haven’t yet, download the latest version of Virtualbox. Thanks to Martin in the comments for pointing this out.