Is is possible to copy a running process between machines?

To the best of my understanding, all linux process are actually files

You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc file system to a target /proc file system is doomed.

Is possible to copy a running process between machines?

One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.

Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.


Yes, it's possible. MOSIX (http://www.mosix.org) does process migration between linux machines (as mentioned in wikipedia link in @jlliagre answer), is open source and doesn't require kernel patch. It's for HPC applications and probably not what you want, but thought I'd mention for posterity.


No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.

Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.

These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.

This is a feature of the specific service, however, and not of Unix.

You may find more information on the ServerFault forum.