[CRIU] Criu Restore Error
Christopher Covington
cov at codeaurora.org
Wed Mar 25 08:31:31 PDT 2015
Hi Priyanka,
On 03/24/2015 01:31 AM, Priyanka Naik wrote:
> I m running a sample process on my host machine and dumping it on the host. If
> i try to restore the process on the host OS, the process gets restored back
> successfully. But now I m tarring my dumped files directory into a .tgz file
> and sending it to guest using virtIO serial as the medium of transfer. The
> transfer of dumped files take place successfully as I m checking the hash
> values of both the files using md5sum. I m untarring it on guest and trying to
> restore it back on the guest system but due to some reasons we are unable to
> restore it back on the guest system.
Perhaps file transfer over serial is more useful to you, but in my environment
I've found the 9P passthrough filesystem to be the easiest way to transfer files.
http://www.linux-kvm.org/page/9p_virtio
http://wiki.qemu.org/Documentation/9psetup
(If you want a 9P *rootfs*, which is what I use, you'll need the following in
your kernel command line:
rootfstype=9p rootflags=trans=virtio,version=9p2000.L
You'll also need to use the mount tag "/dev/root" and/or add
"root=<mount_tag>" to the kernel command line.)
> Firstly to start the guest we are using following command :
>
> qemu-system-x86_64 -m 1024 -s -hda vdisk.img -kernel
> /usr/src/linux-3.17.6/arch/x86_64/boot/bzImage -initrd
> /home/priyanka/tmp2/newinitrd.img -append "root=/dev/sda10" -name myguest
> -device virtio-serial -chardev socket,path=/tmp/foo,server,nowait,id=foo
> -device virtserialport,chardev=foo,name=org.fedoraproject.port.0
>
> Now once we boot the system and type the tty command on the guest we get
> /dev/console and if we type tty on host it gives output as /dev/pts/no i.e.
> some number associated with that terminal. We checked with the code of tty.c
> which has facilities for both PTS and CONSOLE. But we are not getting the
> exact reason for criu not working on guest, since we are creating exact copy
> of the kernel on host system, the guest should have all the facilities
> required for criu since criu is working on host.
>
> And as Cyrill said that we need /dev/ptmx on guest, so it is present. Even
> /dev/pts/ptmx is present.
>
> What can be the problems on guest side which will make our project work? What
> is exactly going wrong?
You may be able to work around the issue by redirecting STDIN, STDOUT, and
STDERR from and to files. That's what I've been doing on ARM where ttyAMA (ARM
PL011 serial) hasn't historically been supported (although maybe that's been
fixed now). Example:
app /share/suite/app/input < /dev/null &> app.log &
The full log that Pavel was talking about (contents of logfile from `criu -v4
> logfile` or criu -v4 -o logfile`) would have details about what exactly is
going wrong.
Hope that helps,
Chris
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
More information about the CRIU
mailing list