All of lore.kernel.org
 help / color / mirror / Atom feed
* Best choice for copy/clone/snapshot
@ 2009-05-13  1:08 Ross Boylan
  2009-05-13  7:07 ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Boylan @ 2009-05-13  1:08 UTC (permalink / raw)
  To: kvm; +Cc: ross

First, I have a feeling this might be a question I could ask on a qemu
list.  Is there a way for me to tell which questions should go where?
Is it OK to ask here?

As I install software onto a system I want to preserve its state--just
the disk state---at various points so I can go back.  What is the best
way to do this?

First, I think I could just make a copy of the virtual disk, although I
haven't seen this suggested anywhere.  I assume this will work if the VM
is off; are there other circumstances in which it is safe?  Since my
original virtual disk file isn't really occupying its nominal space, I
assume this will be true of the copy too.

Second, kvm-img could create a copy on write image.  There are several
things I don't understand about this.  Suppose I go
kvm-img -b A.img  B.img

If I then go on and use A.img as I did before, changing what is on disk,
have I screwed up B.img?

Do A.img or B.img have to be qcow2 format?  I created a raw image for
portability.

Suppose I work for awhile installing new stuff on B.img, and then want
to preserve the state.  Is
kvm-img -b B.img C.img
sensible, or is this kind of recursive operation (B.img is already the
copy on write version of A.img) not OK?

Does ‘commit [-f fmt] filename’, documented as
        Commit the changes recorded in filename in its base image.
mean commit the recorded changes TO its base image?

Here are some other things I think I don't want to do.  Please let me
know if I'm mistaken.

-snapshot on the kvm command line: nothing persistent comes of this
(maybe if you commit you update the original image, but you don't get
2).

snapshot in the monitor: this snapshots the non-disk state of the VM;
further, that state is not guaranteed to work if you later change what
is on the disk.  I think kvm-img snapshot also accesses these
facilities.

Yours in confusion :)
Ross

P.S. Please cc me.
-- 
Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               ross@biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739                     hm:  (415) 550-1062


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-14  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13  1:08 Best choice for copy/clone/snapshot Ross Boylan
2009-05-13  7:07 ` Avi Kivity
2009-05-13 15:49   ` Ross Boylan
2009-05-13 17:19     ` Charles Duffy
2009-05-14  9:16     ` Avi Kivity

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.