Changes

65 bytes removed ,  19:53, 14 March 2013
simplify formatting (indentation==auto <pre>)
Line 3: Line 3:  
; step 1
 
; step 1
 
: Prepare a tmpfs mount on both sides, where you will put images other than those with apps memory. These images are typically very small and will not create significant memory pressure on nodes.
 
: Prepare a tmpfs mount on both sides, where you will put images other than those with apps memory. These images are typically very small and will not create significant memory pressure on nodes.
<pre>
+
 
dst# mount -t tmpfs none <dir>
+
dst# mount -t tmpfs none <dir>
src# mount -t tmpfs none <dir>
+
src# mount -t tmpfs none <dir>
</pre>
      
; step 2
 
; step 2
 
: Launch a page server on destination node. The page server will accept pages from <code>crtools</code> and will put them into the tmpfs mount. Since we're about to rucn the apps on destination node, it will ''have'' to bear with this memory consumption. The source node will not have to store these images.
 
: Launch a page server on destination node. The page server will accept pages from <code>crtools</code> and will put them into the tmpfs mount. Since we're about to rucn the apps on destination node, it will ''have'' to bear with this memory consumption. The source node will not have to store these images.
<pre>
+
 
dst# crtools page-server --images-dir <dir> --port <port>
+
dst# crtools page-server --images-dir <dir> --port <port>
</pre>
      
After this crtools will wait for incoming connections to read the apps memory and put them into <code><dir></code>.
 
After this crtools will wait for incoming connections to read the apps memory and put them into <code><dir></code>.
Line 18: Line 16:  
; step 3
 
; step 3
 
: Dump the applications, just like it should be done when doing live migration, but with options explaining to crtools where the page server is
 
: Dump the applications, just like it should be done when doing live migration, but with options explaining to crtools where the page server is
<pre>
+
 
src# crtools dump --tree <pid> --images-dir <dir> --leave-stopped --page-server --address <dst> --port <port>
+
src# crtools dump --tree <pid> --images-dir <dir> --leave-stopped --page-server --address <dst> --port <port>
</pre>
      
; step 4
 
; step 4
 
: Copy rest images onto destination node
 
: Copy rest images onto destination node
<pre>
+
 
src# scp -r <dir> <dst-node>/<dir>
+
src# scp -r <dir> <dst-node>/<dir>
</pre>
      
As was said, CRIU images other than those with pages are very small and this won't take long.
 
As was said, CRIU images other than those with pages are very small and this won't take long.
Line 32: Line 28:  
; step 5
 
; step 5
 
: Restore the applications. By that time page server mush have stopped (check this by it's ret code) and images with pages are already in the <code><dir></code>.
 
: Restore the applications. By that time page server mush have stopped (check this by it's ret code) and images with pages are already in the <code><dir></code>.
<pre>
+
 
dst# crtools restore --tree <pid> --images-dir <dir>
+
dst# crtools restore --tree <pid> --images-dir <dir>
</pre>
      
; step 6
 
; step 6
 
: Kill the tmpfs mount with old images. It's no longer required
 
: Kill the tmpfs mount with old images. It's no longer required
<pre>
+
 
dst# umount <dir>
+
dst# umount <dir>
</pre>
      
; step 7
 
; step 7
 
: Kill apps on source node, as they are already on the destination one
 
: Kill apps on source node, as they are already on the destination one