简体   繁体   中英

Is it possible to transfer a process from a native machine to a virtual machine?

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.

You are correct in your assumptions. Live KVM migrations are now possible via virsh from guest machine to guest machine so there's progress being made. I'm sure eventually there will be process migrations from guest to guest, but I'm not so sure if people are working on host to guest process migrations. It sounds like you're interested in the technical details, so here's a good read by RedHat on VM live migrations .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM