[CRIU] ubuntu container dump error

Andrey Vagin avagin at parallels.com
Mon Jun 9 00:58:16 PDT 2014


On Sun, Jun 08, 2014 at 03:31:50PM -0700, riya khanna wrote:
> I modified the "--root" option, but the command below fails:
> 
> $ criu restore --evasive-devices --tcp-established --file-locks -n net
> -n mnt -n ipc -n <pid> --action-script "`pwd`/network-script.sh
> restore $name.0" --veth-pair eth0=$name.0 --pidfile newpid.log --root
> /usr/local/lib/lxc/rootfs -vvvv -D data -d -o restore.log
> 
> (00.013816)      1: Path `/usr/local/lib/lxc/rootfs' resolved to `./' mountpoint

/usr/lib64/lxc/rootfs/ is a directory, where LXC mounts containers
roots. LXC creates a new directory there and bind-mounts a container
file system.

Look at my example:

# ps axf
  969 pts/0    S+     0:00  |       \_ lxc-start -n centos-lxc-4
  982 ?        Ss     0:00  |           \_ /sbin/init
 1231 ?        Sl     0:00  |               \_ /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
 1245 ?        Ss     0:00  |               \_ /usr/sbin/sshd
 1252 ?        Ss     0:00  |               \_ xinetd -stayalive -pidfile /var/run/xinetd.pid
 1259 ?        Ss     0:00  |               \_ /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
 1260 ?        S      0:00  |               |   \_ /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
 1275 ?        Ss     0:00  |               \_ sendmail: accepting connections
 1283 ?        Ss     0:00  |               \_ sendmail: Queue runner at 01:00:00 for /var/spool/clientmqueue
 1291 ?        Ss     0:00  |               \_ /usr/sbin/httpd
 1294 ?        S      0:00  |               |   \_ /usr/sbin/httpd
 1299 ?        Ss     0:00  |               \_ crond

# criu dump -v4 -t 982 -D dump/ -o dump.log --file-locks --tcp-established
# echo $?
0
# mkdir /usr/lib64/lxc/rootfs/centos-lxc-4
# mount --bind /vz/lxc/centos-6-x86_64 /usr/lib64/lxc/rootfs/centos-lxc-4
# criu restore -v4  -D dump/ -o restore.log --file-locks --tcp-established --root /usr/lib64/lxc/rootfs/centos-lxc-4 -d
# echo $?
0

> (00.013823)      1: Error (mount.c:1777): New root and old root are the same
> (00.082318) Error (cr-restore.c:1050): 16733 exited, status=1
> (00.082365) Error (cr-restore.c:1613): Restoring FAILED.
> 
> Also, if I remove the "--root" option then, it fails with the following error:
> 
> (00.470598)      1: cg: Move into 2
> (00.470605)      1: cg:   `-> blkio//lxc/test/tasks
> (00.470618)      1: Error (cgroup.c:275): cg: Can't move into
> blkio//lxc/test/tasks (-1/-1) : No such file or directory
> (00.487982) Error (cr-restore.c:1050): 15792 exited, status=255
> (00.488012) Error (cr-restore.c:1613): Restoring FAILED.
> 
> The log is attached.
> 
> On Fri, Jun 6, 2014 at 4:32 AM, Pavel Emelyanov <xemul at parallels.com> wrote:
> > On 06/06/2014 12:29 PM, riya khanna wrote:
> >> Yes, that does the trick. Thanks! I thought I'd tried that. Never mind.
> >>
> >> However, restore fails:
> >>
> >> (00.015354)      1: Error (mount.c:1755): chdir(/root/test-lxc-root)
> >> failed: No such file or directory
> >> (00.076583) Error (cr-restore.c:1050): 32397 exited, status=1
> >> (00.076632) Error (cr-restore.c:1613): Restoring FAILED.
> >>
> >
> > Probably you've missed the --root option for restore. It shows where
> > the container's root should be, and this path should be a mount point.
> >
> >
> > Thanks,
> > Pavel




More information about the CRIU mailing list