<div dir="ltr"><div>This what I m running to mount the vdisk.img file</div><div><br></div><div>root@priyanka-Lenovo-G510:~# modprobe nbd max_parts=8</div><div>root@priyanka-Lenovo-G510:~# qemu-nbd -c /dev/nbd0 /usr/bin/vdisk.img</div><div>root@priyanka-Lenovo-G510:~# partprobe /dev/nbd0</div><div>Error: Error informing the kernel about modifications to partition /dev/nbd0p1 -- Invalid argument.  This means Linux won&#39;t know about any changes you made to /dev/nbd0p1 until you reboot -- so you shouldn&#39;t mount it or use it in any way before rebooting.</div><div>Error: Failed to add partition 1 (Invalid argument)</div><div><br></div><div>I hava attached the vdisk.img and 3444.tgz file which contains dumped files related to process having PID 3444.</div><div><br></div><div>Since the initrd image through which I m booting my guest is big, so I will try uploading it on drive and share it with u.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 12:45 PM, Cyrill Gorcunov <span dir="ltr">&lt;<a href="mailto:gorcunov@gmail.com" target="_blank">gorcunov@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Mar 24, 2015 at 11:01:09AM +0530, Priyanka Naik wrote:<br>
&gt;    I m running a sample process on my host machine and dumping it on the<br>
&gt;    host. If i try to restore the process on the host OS, the process gets<br>
&gt;    restored back successfully. But now I m tarring my dumped files directory<br>
&gt;    into a .tgz file and sending it to guest using virtIO serial as the medium<br>
&gt;    of transfer. The transfer of dumped files take place successfully as I m<br>
&gt;    checking the hash values of both the files using md5sum. I m untarring it<br>
&gt;    on guest and trying to restore it back on the guest system but due to some<br>
&gt;    reasons we are unable to restore it back on the guest system.<br>
<br>
</span>Mind to put somewhere the image files (ie your tgz archive) so we would<br>
take a look on the internals?<br>
<div><div class="h5"><br>
&gt;    Firstly to start the guest we are using following command :<br>
&gt;<br>
&gt;    qemu-system-x86_64 -m 1024 -s -hda vdisk.img -kernel<br>
&gt;    /usr/src/linux-3.17.6/arch/x86_64/boot/bzImage -initrd<br>
&gt;    /home/priyanka/tmp2/newinitrd.img -append &quot;root=/dev/sda10&quot; -name myguest<br>
&gt;    -device virtio-serial -chardev socket,path=/tmp/foo,server,nowait,id=foo<br>
&gt;    -device virtserialport,chardev=foo,name=org.fedoraproject.port.0<br>
&gt;<br>
&gt;    Now once we boot the system and type the tty command on the guest we get<br>
&gt;    /dev/console and if we type tty on host it gives output as /dev/pts/no<br>
&gt;    i.e. some number associated with that terminal. We checked with the code<br>
&gt;    of tty.c which has facilities for both PTS and CONSOLE. But we are not<br>
&gt;    getting the exact reason for criu not working on guest, since we are<br>
&gt;    creating exact copy of the kernel on host system, the guest should have<br>
&gt;    all the facilities required for criu since criu is working on host.<br>
&gt;<br>
&gt;    And as Cyrill said that we need /dev/ptmx on guest, so it is present. Even<br>
&gt;    /dev/pts/ptmx is present.<br>
&gt;<br>
&gt;    What can be the problems on guest side which will make our project work?<br>
&gt;    What is exactly going wrong?<br>
&gt;<br>
&gt;    Another thing is that to remove restore.log file from guest I need to<br>
&gt;    mount my vdisk.img. How can I proceed with that?<br>
&gt;<br>
&gt;    I used these commands :<br>
&gt;    modprobe max_parts=8<br>
&gt;<br>
&gt;    qemu-nbd -c /dev/nbd0 vdisk.img<br>
&gt;<br>
&gt;    partprobe /dev/nbd0<br>
&gt;<br>
&gt;    mount /dev/nbd0p1 /mnt/vdisk.img<br>
&gt;<br>
&gt;    But I getting error for partprobe.<br>
<br>
</div></div>Which ones? I mean, put errors somewhere, lets check them. Also,<br>
if vdisk.img is big enough? Could you share it, I suppose it doesn&#39;t<br>
consists of some sensible information?<br>
</blockquote></div><br></div>