This repo explains the steps to implement the CRIU based docker container migration for lrm node between a primary node and a secondary node
- Environement details:
- OS version: Ubuntu 16.04.7.
- CRIU version: 3.15.
- Docker version: 18.09 (expiremental).
- setting up the NFS pool between the primary and secondary node:
- On the primary Node :
- Install NFS :
sudo apt-get update
sudo apt-get install nfs-kernel-server - We’ll now create the root directory of the NFS shares, this is also known as an export folder
sudo mkdir /mnt/myshareddir - Edit the /etc/exports file in a text editor, and add the following directive.
/mnt/myshareddir ip_secondary_node (rw,sync,no_subtree_check) - Make the NFS Share Available to Clients.
exportfs -a - restart the NFS kernel
systemctl restart nfs-kernel-server
- Install NFS :
- On the secondary node
- Install NFS :
sudo apt-get update
sudo apt-get install nfs-common - Create a local directory—this will be the mount point for the NFS share:
sudo mkdir /var/locally-mounted - Edit the /etc/fstab by adding the following line :
{IP of NFS server}:/mnt/myshareddir /var/locally-mounted nfs defaults 0 0 - Now mount the file share using the following command:
mount /var/locally-mounted
mount {IP of NFS server}:/mnt/myshareddir
- Install NFS :
- On the primary Node :
- CRIU Migration
- On the primary Host
- Run the script Run.sh to run the lrm node
- --- Launch your VR application and connect your clients ( the VR unity sample is included in Tanks)
- Run the script Checkpoint.sh to save the state of the container
- On the secondary Host
- Run the script restore.sh to restore the lrm container in its previous state
- The VR sample game is the tank game provided by mirror with LRM incroporated in it in addaition to requestServerList the script that allows us to view and join existing servers and the script NeyworkPingDisplay from mirror that we modified to save the rtt every one 1s in a csv File.
- On the primary Host