<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't know about any changes you made to /dev/nbd0p1 until you reboot -- so you shouldn'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"><<a href="mailto:gorcunov@gmail.com" target="_blank">gorcunov@gmail.com</a>></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>
> I m running a sample process on my host machine and dumping it on the<br>
> host. If i try to restore the process on the host OS, the process gets<br>
> restored back successfully. But now I m tarring my dumped files directory<br>
> into a .tgz file and sending it to guest using virtIO serial as the medium<br>
> of transfer. The transfer of dumped files take place successfully as I m<br>
> checking the hash values of both the files using md5sum. I m untarring it<br>
> on guest and trying to restore it back on the guest system but due to some<br>
> 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>
> 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 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 /dev/pts/no<br>
> i.e. some number associated with that terminal. We checked with the code<br>
> of tty.c which has facilities for both PTS and CONSOLE. But we are not<br>
> getting the exact reason for criu not working on guest, since we are<br>
> creating exact copy of the kernel on host system, the guest should have<br>
> all the facilities 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 present. Even<br>
> /dev/pts/ptmx is present.<br>
><br>
> What can be the problems on guest side which will make our project work?<br>
> What is exactly going wrong?<br>
><br>
> Another thing is that to remove restore.log file from guest I need to<br>
> mount my vdisk.img. How can I proceed with that?<br>
><br>
> I used these commands :<br>
> modprobe max_parts=8<br>
><br>
> qemu-nbd -c /dev/nbd0 vdisk.img<br>
><br>
> partprobe /dev/nbd0<br>
><br>
> mount /dev/nbd0p1 /mnt/vdisk.img<br>
><br>
> 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't<br>
consists of some sensible information?<br>
</blockquote></div><br></div>