<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Priyanka Naik</b> <span dir="ltr"><<a href="mailto:prnk.nk1@gmail.com">prnk.nk1@gmail.com</a>></span><br>Date: Wed, Mar 25, 2015 at 9:54 PM<br>Subject: Re: [CRIU] Criu Restore Error<br>To: Christopher Covington <<a href="mailto:cov@codeaurora.org">cov@codeaurora.org</a>><br><br><br><div dir="ltr"><div>I got these errors after running following command :</div><div><br></div><div>root@priyanka-Lenovo-G510:/usr/bin# 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 -fsdev local,security_model=passthrough,id=fsdev0,path=/tmp/share -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare</div><div><br></div><div><br></div><div>qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare: Virtio-9p Failed to initialize fs-driver with id:fsdev0 and export path:/tmp/share</div><div><br></div><div>qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare: Device initialization failed.</div><div><br></div><div>qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare: Device 'virtio-9p-pci' could not be initialized</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 9:31 PM, Christopher Covington <span dir="ltr"><<a href="mailto:cov@codeaurora.org" target="_blank">cov@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Priyanka,<br>
<span><br>
On 03/25/2015 11:49 AM, Priyanka Naik wrote:<br>
> On 25 Mar 2015 21:09, "Priyanka Naik" <<a href="mailto:prnk.nk1@gmail.com" target="_blank">prnk.nk1@gmail.com</a><br>
</span><span>> <mailto:<a href="mailto:prnk.nk1@gmail.com" target="_blank">prnk.nk1@gmail.com</a>>> wrote:<br>
><br>
> That is fine that I should provide u with log files but my guest does not<br>
> scroll bcoz of which I m nt able to see the errors and not even able to<br>
> take that file out of guest.<br>
<br>
</span>Try adding these QEMU arguments:<br>
<br>
-nographic -monitor none -serial stdio<br>
<span><br>
> So he suggested me the way of mounting my vdisk.img but the steps as I<br>
> told you gave me errors. So I m unable to proceed.<br>
<br>
</span>If you use the 9P passthrough filesystem I mentioned, there's no extra work to<br>
get files out of the guest--they're always available to the host.<br>
<br>
Chris<br>
<span><br>
> On 25 Mar 2015 21:01, "Christopher Covington" <<a href="mailto:cov@codeaurora.org" target="_blank">cov@codeaurora.org</a><br>
</span><div><div>> <mailto:<a href="mailto:cov@codeaurora.org" target="_blank">cov@codeaurora.org</a>>> wrote:<br>
><br>
> Hi Priyanka,<br>
><br>
> On 03/24/2015 01:31 AM, Priyanka Naik wrote:<br>
> > I m running a sample process on my host machine and dumping it on<br>
> the host. If<br>
> > i try to restore the process on the host OS, the process gets<br>
> restored back<br>
> > successfully. But now I m tarring my dumped files directory into a<br>
> .tgz file<br>
> > and sending it to guest using virtIO serial as the medium of<br>
> transfer. The<br>
> > transfer of dumped files take place successfully as I m checking the<br>
> hash<br>
> > values of both the files using md5sum. I m untarring it on guest and<br>
> trying to<br>
> > restore it back on the guest system but due to some reasons we are<br>
> unable to<br>
> > restore it back on the guest system.<br>
><br>
> Perhaps file transfer over serial is more useful to you, but in my<br>
> environment<br>
> I've found the 9P passthrough filesystem to be the easiest way to<br>
> transfer files.<br>
><br>
> <a href="http://www.linux-kvm.org/page/9p_virtio" target="_blank">http://www.linux-kvm.org/page/9p_virtio</a><br>
> <a href="http://wiki.qemu.org/Documentation/9psetup" target="_blank">http://wiki.qemu.org/Documentation/9psetup</a><br>
><br>
> (If you want a 9P *rootfs*, which is what I use, you'll need the<br>
> following in<br>
> your kernel command line:<br>
><br>
> rootfstype=9p rootflags=trans=virtio,version=9p2000.L<br>
><br>
> You'll also need to use the mount tag "/dev/root" and/or add<br>
> "root=<mount_tag>" to the kernel command line.)<br>
><br>
> > Firstly to start the guest we are using following command :<br>
> ><br>
> > qemu-system-x86_64 -m 1024 -s -hda vdisk.img -kernel<br>
> > /usr/src/linux-3.17.6/arch/x86_64/boot/bzImage -initrd<br>
> > /home/priyanka/tmp2/newinitrd.img -append "root=/dev/sda10" -name<br>
> myguest<br>
> > -device virtio-serial -chardev socket,path=/tmp/foo,server,nowait,id=foo<br>
> > -device virtserialport,chardev=foo,name=org.fedoraproject.port.0<br>
> ><br>
> > Now once we boot the system and type the tty command on the guest we get<br>
> > /dev/console and if we type tty on host it gives output as<br>
> /dev/pts/no i.e.<br>
> > some number associated with that terminal. We checked with the code<br>
> of tty.c<br>
> > which has facilities for both PTS and CONSOLE. But we are not<br>
> getting the<br>
> > exact reason for criu not working on guest, since we are creating<br>
> exact copy<br>
> > of the kernel on host system, the guest should have all the facilities<br>
> > required for criu since criu is working on host.<br>
> ><br>
> > And as Cyrill said that we need /dev/ptmx on guest, so it is<br>
> present. Even<br>
> > /dev/pts/ptmx is present.<br>
> ><br>
> > What can be the problems on guest side which will make our project<br>
> work? What<br>
> > is exactly going wrong?<br>
><br>
> You may be able to work around the issue by redirecting STDIN, STDOUT, and<br>
> STDERR from and to files. That's what I've been doing on ARM where<br>
> ttyAMA (ARM<br>
> PL011 serial) hasn't historically been supported (although maybe<br>
> that's been<br>
> fixed now). Example:<br>
><br>
> app /share/suite/app/input < /dev/null &> app.log &<br>
><br>
> The full log that Pavel was talking about (contents of logfile from<br>
> `criu -v4<br>
> > logfile` or criu -v4 -o logfile`) would have details about what<br>
> exactly is<br>
> going wrong.<br>
><br>
> Hope that helps,<br>
> Chris<br>
><br>
> --<br>
> Qualcomm Innovation Center, Inc.<br>
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,<br>
> a Linux Foundation Collaborative Project<br>
><br>
<br>
<br>
--<br>
Qualcomm Innovation Center, Inc.<br>
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,<br>
a Linux Foundation Collaborative Project<br>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>