Suppose I have a process foo executing (natively) on my computer. After it has been executing for some time, I want to move this process into a virtual machine - for example, I create a VM using QEMU or Virtualbox. Is it possible to do this?
To my understanding, if it's possible, it's incredibly difficult - you'd need to clone the stack and the heap; you'd need to modify any virtual addresses in both locations; and you'd need to sample the CPU's current state to recreate it on the VM. Are these assumptions correct, or am I missing something?
I've found some evidence that this has been implemented for computing clusters in the form of openMosix/LinuxPMI, but nothing regarding physical-to-virtual machine.