When you try to setup Windows Server 2012 or Windows Server 2012 R2 to Oracle VirtaulBox, it gives an error following picture. It says that we need to restart PC and gives some error codes. VirtualBox explain this error this link.
The solution is that run the following command whenever you open the virtual machine.
VBoxManage setextradata global VBoxInternal/CPUM/CMPXCHG16B 1
Alternative solution is that you can upgrade the virtualbox version to latest one.