Thankyou for your reply. I do not face the error using qemu.1.7.1 version.

1 quick question:

I want to create a qcow2 image file after my VM has completed booting;
i.e., when I boot from this new snapshot, I should directly get to my VMs
login prompt. How can i create such a qcow2 snapshot?

I tried stopped the VM using QMP after the VM had completed booting, and
then using host CLI to create a qcow2 image :

qemu-img create -b ubuntu.qcow2 -f qcow2 newsnap.qcow2

This created a new qcow2 file - newsnap.qcow2 on top of ubuntu.qcow2,
however when I boot using newsnap.qcow2, It takes me again through the
complete boot process - till the login prompt.

Is there a way to create the qcow2 snapshot after VM has completed booting?

--
Shehbaz



On Tue, Apr 15, 2014 at 1:37 PM, Dr. David Alan Gilbert <dgilb...@redhat.com
> wrote:

> * Shehbaz Jaffer (shehbazjaffer...@gmail.com) wrote:
> > Hi,
> >
> > I am running a Ubuntu 12.04 guest VM that I created using vm-builder on a
> > Ubuntu 12.04 Operating System. I am using qemu-2.0.0-rc0 version. I want
> to
> > boot from a saved snapshot instance of the guest VM, so I created a
> > snapshot using the Qemu Monitor as follows:
>
> Can you try something newer than -rc0; I remember there was a seg that
> looked
> similar to this on migration (that I suspect is also in the snapshot path).
>
> Dave
>
> >
> > <code>
> > stop
> > savevm new
> > cont
> > quit
> > </code>
> >
> > I checked if the snapshot had been created, and I could see the snapshot
> > for the qcow2 file:
> >
> > :~/qemu-2.0.0-rc0$ ./qemu-img snapshot -l ~/ubuntu-kvm/ubuntu.qcow2
> > Snapshot list:
> > ID        TAG                 VM SIZE                DATE       VM CLOCK
> > 1                                   0 2014-04-14 17:25:39   00:00:01.100
> > 4         new                     84M 2014-04-15 10:00:39   00:08:21.657
> >
> > However when I try to load the same vm during boot, I get the following
> bt:
> >
> > ~/qemu-2.0.0-rc0$ gdb ./x86_64-softmmu/qemu-system-x86_64
> > GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
> > Copyright (C) 2012 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html
> > >
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> > and "show warranty" for details.
> > This GDB was configured as "x86_64-linux-gnu".
> > For bug reporting instructions, please see:
> > <http://bugs.launchpad.net/gdb-linaro/>...
> > Reading symbols from
> > /home/manan/qemu-2.0.0-rc0/x86_64-softmmu/qemu-system-x86_64...done.
> > (gdb) r -hda ~/ubuntu-kvm/ubuntu.qcow2 -loadvm new2
> > Starting program:
> > /home/manan/qemu-2.0.0-rc0/x86_64-softmmu/qemu-system-x86_64 -hda
> > ~/ubuntu-kvm/ubuntu.qcow2 -loadvm new2
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library
> "/lib/x86_64-linux-gnu/libthread_db.so.1".
> > [New Thread 0x7fffedf07700 (LWP 4213)]
> > [New Thread 0x7fffed323700 (LWP 4214)]
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007ffff5751fb6 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> > (gdb) bt
> > #0  0x00007ffff5751fb6 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> > #1  0x00007ffff7e07ec9 in tlb_flush (cpu=<optimized out>,
> > flush_global=<optimized out>)
> >     at /usr/include/x86_64-linux-gnu/bits/string3.h:85
> > #2  0x00007ffff7e0ca2c in cpu_common_post_load (opaque=<optimized out>,
> > version_id=<optimized out>)
> >     at /home/manan/qemu-2.0.0-rc0/exec.c:423
> > #3  0x00007ffff7e00d2d in vmstate_load_state (f=0x7ffff8ad1400,
> > vmsd=0x7ffff82c9660, opaque=0x7ffff89715a0, version_id=1)
> >     at vmstate.c:87
> > #4  0x00007ffff7e719d7 in vmstate_load (version_id=<optimized out>,
> > se=0x7ffff8982210, f=0x7ffff8ad1400)
> >     at /home/manan/qemu-2.0.0-rc0/savevm.c:435
> > #5  qemu_loadvm_state (f=0x7ffff8ad1400) at
> > /home/manan/qemu-2.0.0-rc0/savevm.c:805
> > #6  0x00007ffff7e7227a in load_vmstate (name=<optimized out>) at
> > /home/manan/qemu-2.0.0-rc0/savevm.c:1091
> > #7  0x00007ffff7c5ab5c in main (argc=<optimized out>, argv=<optimized
> out>,
> > envp=<optimized out>) at vl.c:4457
> > (gdb)
> >
> > I even tried the command
> >
> > guest-fsfreeze-freeze as mentioned here:
> >
> > http://wiki.qemu.org/Features/Snapshots
> >
> > But the Qemu Monitor says the command doesnt exist. Do we need to issue a
> > command to flush the tlb buffer? Please advise.
> >
> > --
> > Shehbaz Jaffer
> --
> Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
>

Reply via email to