Error message:
vm exit[1] reason VMX rip 0x0000000000000000 inst_length 0 status 0 exit_reason 33 (VM-entry failure due to invalid guest state) qualification 0x0000000000000000 inst_type 0 inst_error 0 Abort trap (core dumped)
This error occurs because vm->vcpu[1] has not been allocated yet when vm_snapshot_vm() is called.
To fix this, move spinup_vcpu() before restore code. Use vm_vcpu_pause() before resume is started to avoid additional busy loop of all vcpu-s while resume is performing..
Sponsored by: vStack