VirtualBox CompareExchange128 Error on Windows 8.1 Preview Install

VirtualBox CompareExchange128 Error on Windows 8.1 Preview Install

On 4 July, 2013 07:00:15, in How To, by Dirk Strauss

VirtualBox CompareExchange128 ErrorOver 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″.

windows 8.1 preview virtualbox install error

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.

Command Prompt VirtualBox

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.

The following two tabs change content below.

Dirk Strauss

Software Developer
Dirk is a Software Developer and Microsoft MVP from South Africa. He loves all things Technology and is slightly addicted to Twitter and Jimi Hendrix. Apart from writing code, he also enjoys writing human readable articles. "I love sharing knowledge and connecting with people from around the world. It's the diversity that makes life so beautiful." Dirk feels very strongly that pizza is simply not complete without Tabasco, that you can never have too much garlic, and that cooking the perfect steak is an art he has yet to master.

Latest posts by Dirk Strauss (see all)

  • Fredrik Barrud

    Still needs your fix for VirtualBox on OSX, even with the latest version

  • Pingback: upgrading from 8 to 8.1 inside VirtualBox - Page 2

  • cees

    Not only Win81 Preview gives this error but also upgrading from Win8 to Win81 (build 6900). Your suggestion fixed it. Thanx

  • temeraf

    Thx, working! is it possible to add this globally for every new VM created?

  • Pingback: Windows 8.1 Installation

  • raphael.web

    How can this be fixed on a Macbook Pro? I downloaded the latest Mac version of VirtualBox (4.30), and the problem persists. BTW, this is for the final version of 8.1, not the preview. Thanks!

    • Sparky

      I’m running VB 4.2.18 for Mac and just got it to start downloading 8.1. Had the same error. I don’t know if all this is necessary, but here’s what I did.
      – Shut down Windows from inside Virtual Box
      – Open Terminal
      – cd /Applications/VirtualBox.app
      – vboxmanage setextradata Windows-8 VBoxInternal/CPUM/CMPXCHG16B 1

      In the last command, Windows-8 is the name of my virtual machine.
      – Close Terminal

      Maybe this update hasn’t been done in the Mac version of VirtualBox?

      Anyway, good luck! Thanks for the info, Dirk!

      • Ben

        If the name of your virtual computer contains spaces, put the name in parentheses!

  • a guest

    This article solved my problem upgrading to Win8.1 on a vm. Some of the other comments were not accurate in my experience. For instance, it is not true that the latest version of VirtualBox has fixed the problem by activating the instruction since I have the latest version (v 4.3.0 r89960) and still had to manually make the command with vboxmanage before it would work for me on Win8 Pro 64-bit. Also, the first time using the command it failed with an error saying that vbox.com server (or some such thing) was not running (huh?), and I had to reboot the host machine to clear memory. Lastly, the statement about having the name of the vm in parenthesis applies only, I believe, when there is a space in the name because it was not necessary in my case on one without spaces.
    The final point I would like to make is that this information about having to activate a cpu instruction because it was not already working by default makes me wonder whether there are other instructions not working, of which I am not yet aware? If so, the vm may be experiencing a problem as a result without my knowing the cause, or it may be working at less than 100% efficiency.

  • Pat

    Thanks a lot. Works like a charm

    • Dirk Strauss

      Hey Pat. I’m glad that it helped you.

  • Matt

    VM name is case sensitive as well.

  • Pingback: Windows 8 - Page 82

  • Frank Taeter

    works on vbox 4.2.18 on Mac host w/ win8 as vm. note that vm name cannot contain spaces. Once I ran the vboxmanage cmd, install of win 8.1 worked. Thanks!!

  • Ryan

    Thank you so much. In my case I found that I had to *not* run CMD as an admin (which is what another site directed) and I also had to close the VB Manager app. Otherwise, I was receiving an error that the “COM server had not started”.
    Works now. I appreciate it!

    • Dirk Strauss

      Hey Ryan. Thank you for your feedback. It is interesting that you had to run cmd without elevated permissions (ie not as admin). So thank you for the tip.

      • ofer

        thanks its work for me

  • David Chou

    The new version for Mac is no lucky, but the command helps me. Thanks!

  • Martin

    The new version of virtual box version ….16 (instead of …………14) has resoved this issue.

    • Dirk Strauss

      This is awesome news! Thanks!

    • bruce_armstrong

      I just tried 4.2.16 r86992 and it has the same issue out of the box. About to try the suggested tweak.

      • Dirk Strauss

        Hey Bruce. Did the workaround work?

        • bruce_armstrong

          Yes, once I spelled it correctly. Mistook the last B for an 8.

          SInce I’m using the ISO install (because it’s Windows 8 Enterprise) it then prompted me for a Product Key, and wouldn’t take the one from the original install. Took me a while to realize that there was a different one for the preview.

    • Pete

      Actually, version 4.2.18 still has the problem also. The suggested tweak did resolve the issue though. Thanks Dirk!

  • Steve

    Thanks, worked for me. Make sure you include quotes around the Virtual Machine name, for example:

    vboxmanage setextradata “Windows 8″ VBoxInternal/CPUM/CMPXCHG16B 1

    • Dirk Strauss

      Awesome, thanks Steve. You’re correct. Thank you.

    • Guest

      OMG Thank You!!! I kept getting errors at first since I named mine Windows 8 (64x) but the quotes made it execute perfectly. Also I thank
      Dirk Strauss for the initial post.

  • Pingback: Douglas C. Engelbart Featured In The Daily Six Pack: July 4, 2013