Discussion in 'Server Operation' started by Tripple, May 26, 2011.

  1. Tripple

    Tripple New Member

    I moved all my VMWare servers to qemu-kvm on CentOS 5.6 64-bit systems using qcow2 images.

    Before any operation on a VM I'm used to take a snapshot first. So I was looking into a way to do that with qemu-kvm on a less important VM.

    Here's my story.
    Take a snapshot:
    qemu-img snapshot -c somename.snapshot myvm.qcow2

    Let's check this out:
    qemu-img snapshot -l myvm.qcow2

    Looking good. Maybe an extra snapshot:
    qemu-img snapshot -c somename.snapshot myvm.qcow2

    Great, two snapshots. Not possible with VMWare server 1.

    Now, let's delete a snapshot:
    qemu-img snapshot -d myvm.qcow2

    Nope, didn't work. Or was it:
    qemu-img snapshot -d somename.snapshot
    Didn't work either. The VM is still running though.

    I've been reading you shouldn't take a snapshot on a live VM? I shutdown the VM, no luck. Now the VM doesn't boot anymore.

    After one error after another I tried this:
    qemu-img snapshot -l myvm.qcow2
    qemu-img: Could not open 'myvm.qcow2'

    I rebooted the host server, but no matter what I try, qemu-img is unable to open the image. This is the error when I try to boot the vm:
    File "/usr/lib64/python2.4/site-packages/libvirt.py", line 333, in create if ret==-1: raise libvirtError ('virDomainCreate() failed', dom=self)
    libvirtError: internal error Process exited while reading console log output: raw_pread: read beyond end of file

    How do I fix this before taking snapshots on production servers?
    Last edited: May 26, 2011
  2. Tripple

    Tripple New Member

    Looks like I shouldn't been taken a snapshot from a running guest.
    I was not able to repair the image.

Share This Page