I was doing an install of Windows 7 Pro as a Xen hvm and ran into this problem. It took a while to figure out, and I finally found this is not an Xen issue but a well known issue with Windows for Windows 7 and 10.
The installation goes fine, then the machine reboots and you get the message:
The Computer Restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click OK to restart the computer and then restart the installation.
Pressing the return key reboots the system, then it ends up back at the same place. To repair do not press the “Ok” button. Instead:
See [https://answers.microsoft.com/en-us/windows/forum/all/error-message-the-computer-restarted-unexpectedly/b770f14d-e345-e011-90b6-1cc1de79d2e2] for full details (mainly people saying thank you to the solution).