I’m trying to compile some google’s code(Chromium) .
So, I need to install a virtual machine on my MacBook Pro.
I have downloaded the Windows 8.1’s iso on MS’s official website for Windows.
And just trying to install it like other operation systems. Then I got a critical error:
Your PC needs to restart.
Please hold down the power button.
Error code: 0x000000C4
Parameters:
0×0000000000000091
0x000000000000000F
0xFFFFF801E5962A80
0×0000000000000000
And without any log.
It is so frustrated, isn’t it?
After some googling, I got an answer like this:
This problem is because that the Chip of the virtual machine lacks of an instruction(CMPXCHG16B).
And I found the explain on the WikiPedia here.
Here is the quote of the document.
Early AMD64 processors lacked the CMPXCHG16B instruction, which is an extension of the CMPXCHG8B instruction present on most post-80486 processors. Similar to CMPXCHG8B, CMPXCHG16B allows for atomic operations on octal words. This is useful for parallel algorithms that use compare and swap on data larger than the size of a pointer, common in lock-free and wait-free algorithms. Without CMPXCHG16B one must use workarounds, such as a critical section or alternative lock-free approaches.[41] Its absence also prevents 64-bit Windows prior to Windows 8.1 from having a user-mode address space larger than 8 terabytes.[42] The 64-bit version of Windows 8.1 requires the instruction.[43]
See the line here? The 64-bit version of Windows 8.1 requires the instruction.
This is the problem of the VirtualBox, it only supports all the AMD instructions by default.
So, to solve this problem, you need to run the command
VBoxManage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1
The vmname should be your virtual machine’s name, and if you really don’t remember it, you can view the names using this command:
VBoxManage list vms
After this setup, your VirtualMachine is ready for Windows 8.1(though I really don’t like Windows).
It worked! Thanks