[CRIU] Restoring with different PID
Pavel Emelyanov
xemul at parallels.com
Tue May 7 15:29:20 EDT 2013
On 05/07/2013 11:21 PM, Kir Kolyshkin wrote:
> On 05/07/2013 11:06 AM, Pavel Emelyanov wrote:
>> On 05/06/2013 11:09 PM, Bhargav Bhikkaji wrote:
>>> Hi All,
>>>
>>> A process on VM-1 is running with PID: 26861. Check-pointed this process using following command
>>>
>>> ./criu dump -vvvv -D /root/download/test-images/ -o /root/download/test-images/dump.log -t 26861 -R --shell-job && echo OK
>>>
>>> Moved *.img files on to VM-2 and restored them with following command.
>>>
>>> ./criu restore -vvvv -d -D /root/download/test-images -o /root/download/test-images/restore.log -t 27397 --shell-job && echo OK
>>>
>>> Pls note, tried to restore with different process ID but what is observed is that *restore* always restores with original process id it was check pointed with.
>>>
>>> Is it possible to change the process id during restore ?
>> It's almost impossible. The thing is that tasks tend to keep pid-s values in their
>> internal data structures and we cannot change these numbers, as we do not know the
>> logic used by tasks.
>>
>> One of examples of pids storing is glibc -- it caches the pid value e.g. for speeding
>> up the getpid() function.
>>
>> Thus I see no ways for restoring a task with its pid changed.
>
> So should we remove -t argument from criu restore then? It's not working
> as expected, and it's not needed as far as I understand.
Yes, we can.
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
More information about the CRIU
mailing list