Some tips on debugging the virtualization based validation tool.
The virtualization based validation tool is pretty rough, and it isn't uncommon to run into issues. Here we document some debugging tips.
This is likely either because you don't have permissions to open
This is probably the most difficult to debug issue you can come across. Essentially what has happened is that the state of the virtual machine is invalid. KVM can't give you more information because this is all the information the processor gave it. The SDM says that this error code (see SDM Volume 3 Chapter 27.8) means that the state failed one of the check in Chapter 27.3.1.
This part of the manual has a ton of different checks which may have failed, so it is basically useless. Here's a couple of suggestions on how to debug this. The first thing you should do is enable tracing of the KVM subsystem in Linux, enable dump invalid state, and then attempt to run the VM and look at the kernel log. Depending on the issue, you may notice something off in the log. Otherwise, move on to the following. It's pretty involved, but I have yet to find a better way.
Build a copy of QEMU's
Note: due to differences between VMX and SVM, it's possible that the behavior in QEMU doesn't match the behavior on an Intel processor. In my experience, it usually still fails, but in some other way. For example, in QEMU I had the VM triple fault instead. If you're getting some sort of exception, try setting breakpoints on some of the functions used to raise exceptions.