All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Iain J. Watson" <lists@ij-watson.co.uk>
Cc: kvm@vger.kernel.org
Subject: Re: Swap virtio images
Date: Wed, 06 Jun 2012 16:27:27 +0200	[thread overview]
Message-ID: <4FCF68CF.3060008@redhat.com> (raw)
In-Reply-To: <CAA-N7kyFr5S_8dQieWVRS7L6noTRtE+NHmRv8zpevvL35d+6=w@mail.gmail.com>

Am 06.06.2012 15:35, schrieb Iain J. Watson:
> Hello,
> 
> I am trying to find a way to use backing files to make snapshots of
> running VMs. The idea is I pause the VM, use qemu-img to create a new
> disk file with the currently used file as a backing file, swap the
> images then unpause the VM.
> 
> Commands would be something like:
> 
> ----------
>   (qemu) stop
>   (qemu) drive_del virtio0
> 
>   $ qemu-img create -f qcow2 -b os-disk-0.qcow2 os-disk-1.qcow2
> 
>   (qemu) drive_add 0 file=os-disk-1.qcow2   # I'm not 100% sure on the
> drive_add syntax
>   (qemu) c
> ----------
> 
> If I try and do this just now I get the error "Can't hot-add drive to
> type 7" when running the drive_add command.
> 
> Is there another way to achieve this? Is this something that could
> potentially be added or would architecture not support what I'm trying
> to do?

You're looking for the 'snapshot_blkdev' monitor command:

(qemu) snapshot_blkdev virtio0 os-disk1.qcow2 qcow2

Kevin

  parent reply	other threads:[~2012-06-06 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 13:35 Swap virtio images Iain J. Watson
2012-06-06 13:46 ` Mauricio Tavares
2012-06-06 14:27 ` Kevin Wolf [this message]
2012-06-06 15:04   ` Iain J. Watson
     [not found]     ` <4FCF76AA.9070903@suresafe.co.uk>
2012-06-06 15:51       ` Iain J. Watson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FCF68CF.3060008@redhat.com \
    --to=kwolf@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lists@ij-watson.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.