From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cendrin Sa Subject: Re: Save/Restore is not working properly Date: Fri, 19 Aug 2016 20:45:49 +0430 Message-ID: References: <20160810111147.vm4urkdnje5ngkwh@mac> <20160811151813.GQ20641@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2931080767482396126==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bamSY-0007Oe-0g for xen-devel@lists.xenproject.org; Fri, 19 Aug 2016 16:15:54 +0000 Received: by mail-ua0-f169.google.com with SMTP id 74so88246767uau.0 for ; Fri, 19 Aug 2016 09:15:51 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu Cc: xen-devel , George Dunlap , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= List-Id: xen-devel@lists.xenproject.org --===============2931080767482396126== Content-Type: multipart/alternative; boundary=001a11427c2008af5e053a6f0389 --001a11427c2008af5e053a6f0389 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi again, So save/restore has a bug or not? I still have problem with it when i use LVM. On Sat, Aug 13, 2016 at 11:10 AM, Cendrin Sa wrote: > I used save without any option when my VM was in running state, save won'= t > work if I pause a VM. > > > On Sat, Aug 13, 2016 at 11:04 AM, Cendrin Sa wrote: > >> >> - I'm using Xen unstable 4.8 manually compiled on debian , I create a >> debian netinst guest using the following config file and then just us= e >> save/restore, after restoring a machine *kernel hangout task happens*= . >> >> >> - We've test it With Xen 4.7 manually compiled on ubuntu 14.04 and >> the same thing happened. the guest VM was ubuntu 14.04 with GUI, afte= r >> restoring we were able to move the mouse but the VM was crashed. >> >> >> - Also, the same *kernel hangout task *happened on CentOS (also its >> kernel is 2.6...) and with Xen 4.2. >> >> These is important to note that after creating VMs using a raw image fil= e >> created with both "qemu-img" and "dd" the problem solved and save/restor= e >> is working properly. >> It seems there is a problem related to LVM. >> >> >> 1. >> 2. builder =3D "hvm" >> 3. memory =3D 1024 >> 4. vcpus =3D 2 >> 5. name =3D "debian64" >> 6. vif =3D [ 'bridge=3Dxenbr0' ] >> 7. disk =3D [ >> 8. 'file:/dev/vg0/debian64_clone.img,xvda,rw', >> 9. 'file:/home/lisbeth/src/debian-8.5.0-amd64-netinst.iso,xvd= c:cdrom,r' >> 10. ] >> 11. >> 12. boot =3D "c" >> >> >> On Thu, Aug 11, 2016 at 7:48 PM, Wei Liu wrote: >> >>> On Wed, Aug 10, 2016 at 02:24:09PM +0100, George Dunlap wrote: >>> > On Wed, Aug 10, 2016 at 12:11 PM, Roger Pau Monn=C3=A9 < >>> roger.pau@citrix.com> wrote: >>> > > On Sun, Aug 07, 2016 at 07:51:14PM +0430, Cendrin Sa wrote: >>> > >> Hi, >>> > >> I was searching a way to clone a machine using both memory and dis= k >>> > >> approach. >>> > >> I checked xen save/restore but after restoring, I can only work so= me >>> > >> seconds with my machine and it will crash with >>> the_kernel_task_hang_up. >>> > >> using an script* to clone a machine is not working either. >>> > >> so is it a bug or something or I'm cloning the wrong way? >>> > > >>> > > Hello, >>> > > >>> > > I've not tried to perform cloning myself, but I have a little scrip= t >>> to >>> > > perform VM checkpoints (so that you can restore the VM to any given >>> point in >>> > > time). It's based on FreeBSD so it uses ZFS, but it should work wit= h >>> LVM >>> > > also if you replace it with the appropriate runes. AFAICT it should >>> be quite >>> > > easy to expand it to also do VM cloning. This is transparent from a >>> VM point >>> > > of view. >>> > >>> > FWIW on a recent version of Xen-unstable, "xl save -c" appears to be >>> > broken, at least with me CentOS 6 VM. If I do "xl save" then "xl >>> > restore", everything works fine; but if I do "xl save -c", then the >>> > save appears to work as normal, and after it's done the guest console >>> > has output similar to the output it has when restoring, but processes >>> > which access the disk hang, and in 2 minutes I get "hung process" >>> > output as Cendrin described. >>> > >>> > I do get some warning messages though: >>> > >>> > Using NULL legacy PIC >>> > WARNING: g.e. still in use! >>> > WARNING: leaking g.e. and page still in use! >>> > WARNING: g.e. still in use! >>> > WARNING: leaking g.e. and page still in use! >>> > WARNING: g.e. still in use! >>> > WARNING: leaking g.e. and page still in use! >>> > Changing capacity of (202, 0) to 4194288 sectors >>> > >>> > This is the stock CentOS 6.6 kernel: 2.6.32-504.16.2.el6.x86_64 >>> > >>> >>> It looks like the guest kernel is trying to free up all the grant >>> references. >>> >>> In the case of xl save -c my impression is that it shouldn't be doing >>> that because the suspend is supposed to be canceled from guest's PoV. >>> >>> See comment in xenctrl.h for xc_domain_resume. >>> >>> Also related: 8903a7a5f6a47cc40c1c204a1cc28b0030b04486 >>> >>> Wei. >>> >>> > -George >>> >> >> > --001a11427c2008af5e053a6f0389 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi again,
So save/restore has a bug or not?= I still have problem with it when i use LVM.

On Sat, Aug 13, 2016 at 11:10 AM, Cen= drin Sa <cendrinoe@gmail.com> wrote:
I used save without any option when my VM wa= s in running state, save won't work if I pause a VM.


On Sat, Aug 13, 2016 at 11:04 AM, Cendrin Sa <cendr= inoe@gmail.com> wrote:
  • I'm using Xen unstable 4.8 manually= compiled on debian , I create a debian netinst guest using the following c= onfig file and then just use save/restore, after restoring a machine = kernel hangout task happens.
  • We'v= e test it With Xen 4.7=C2=A0 manually compiled on ubuntu 14.04 and the same= thing happened. the guest VM was ubuntu 14.04 with GUI, after restoring we= were able to move the mouse but the VM was crashed.
  • Also, the same kernel hangout task happened on C= entOS (also its kernel is 2.6...) and with Xen 4.2.
  • These is important to note that after creating VMs using a= raw image file created with both "qemu-img" and "dd" t= he problem solved and save/restore is working properly.
    It seems = there is a problem related to LVM.

    1. builder =3D "hvm&quo= t;
    2. memory =3D 1= 024
    3. vcpus =3D 2=
    4. name =3D "= ;debian64"
    5. vif =3D [ 'bridge=3Dxenbr0'= ]
    6. disk =3D [
    7. 'file:/dev/vg0/de= bian64_clone.img,xvda,rw',
    8. = 'file:/home/lisbeth/src/debian-8.5.0-amd64-netinst= .iso,xvdc:cdrom,r'
    9. ]
    10. =C2=A0
    11. boot =3D "c"

    On = Thu, Aug 11, 2016 at 7:48 PM, Wei Liu <wei.liu2@citrix.com> wrote:
    On Wed, Aug 10, 2016 a= t 02:24:09PM +0100, George Dunlap wrote:
    > On Wed, Aug 10, 2016 at 12:11 PM, Roger Pau Monn=C3=A9 <roger.pau@citrix.com>= wrote:
    > > On Sun, Aug 07, 2016 at 07:51:14PM +0430, Cendrin Sa wrote:
    > >> Hi,
    > >> I was searching a way to clone a machine using both memory an= d disk
    > >> approach.
    > >> I checked xen save/restore but after restoring, I can only wo= rk some
    > >> seconds with my machine and it will crash with the_kernel_tas= k_hang_up.
    > >> using an script* to clone a machine is not working either. > >> so is it a bug or something or I'm cloning the wrong way?=
    > >
    > > Hello,
    > >
    > > I've not tried to perform cloning myself, but I have a little= script to
    > > perform VM checkpoints (so that you can restore the VM to any giv= en point in
    > > time). It's based on FreeBSD so it uses ZFS, but it should wo= rk with LVM
    > > also if you replace it with the appropriate runes. AFAICT it shou= ld be quite
    > > easy to expand it to also do VM cloning. This is transparent from= a VM point
    > > of view.
    >
    > FWIW on a recent version of Xen-unstable, "xl save -c" appea= rs to be
    > broken, at least with me CentOS 6 VM.=C2=A0 If I do "xl save"= ; then "xl
    > restore", everything works fine; but if I do "xl save -c&quo= t;, then the
    > save appears to work as normal, and after it's done the guest cons= ole
    > has output similar to the output it has when restoring, but processes<= br> > which access the disk hang, and in 2 minutes I get "hung process&= quot;
    > output as Cendrin described.
    >
    > I do get some warning messages though:
    >
    > Using NULL legacy PIC
    > WARNING: g.e. still in use!
    > WARNING: leaking g.e. and page still in use!
    > WARNING: g.e. still in use!
    > WARNING: leaking g.e. and page still in use!
    > WARNING: g.e. still in use!
    > WARNING: leaking g.e. and page still in use!
    > Changing capacity of (202, 0) to 4194288 sectors
    >
    > This is the stock CentOS 6.6 kernel: 2.6.32-504.16.2.el6.x86_64
    >

    It looks like the guest kernel is trying to free up all the gra= nt
    references.

    In the case of xl save -c my impression is that it shouldn't be doing that because the suspend is supposed to be canceled from guest's PoV.
    See comment in xenctrl.h for xc_domain_resume.

    Also related: 8903a7a5f6a47cc40c1c204a1cc28b0030b04486

    Wei.

    >=C2=A0 -George



    --001a11427c2008af5e053a6f0389-- --===============2931080767482396126== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============2931080767482396126==--