Simulating power failure in VM

I’m working on power failure consistency. This is very hard to test and debug for what should be obvious reasons.

Running my code in a VM helps because I can hit the "power off" button on the Hyper-V management window frame. However, that doesn’t allow me to specify where in my code I want the power failure event to occur, which is what I really need.

Is there a way in a VM to tell the hypervisor to simulate a power failure, i.e., do the same thing as hitting the "stop" button, at a specific point in code? Maybe executing a particular illegal instruction would do it?

If not, that would be a wonderful addition to Hyper-V because it would make testing power failure scenarios much easier.

Thanks in advance for any assistance.

Read full post . . . .

Go Que Newsroom Categories

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 46 bytes) in /home/content/36/8658336/html/goquecom/wp-includes/wp-db.php on line 1995