Hey at all, my Name is Jens-Uwe Sperling. Iám a young student in computer science. I want install a VM for testing at home. i had install a VM with virt-install and the default parameters. (Number cpu, mem etc.) After that i install my OS and configure it. Now i want work on this image in a transient way. So i can use the OS with the given config but every change i do from now should not change my image. I found three ways to do that: - Make a snapshot from my image and kill the snapshot after using. - Using the transient option in the xml file under disk. - Making a qcow2 image and run that. I test the last one but for that i must change my xml file to use the new image. A little bit better explained: i must detach the old disk and attach the new one. So my questions are: - Is the last one stable? - whats your experience with the option transient? - Is the performance when i snapshot the image okay? - Do you had make experience with transient images? Thank you very much P.S. Maybe when you dont understand a sentences ask me. I do my best to explain it better. Jens
On 11.09.2015 11:34, Mcburn wrote:> Hey at all, > > my Name is Jens-Uwe Sperling. Iám a young student in computer science. > I want install a VM for testing at home. > > i had install a VM with virt-install and the default parameters. (Number > cpu, mem etc.) > > After that i install my OS and configure it. > > Now i want work on this image in a transient way. > So i can use the OS with the given config but every change i do from now > should not change my image. > > I found three ways to do that: > > - Make a snapshot from my image and kill the snapshot after using.Yes, this will work perfectly.> - Using the transient option in the xml file under disk.Wow, I didn't even know we have such element.> - Making a qcow2 image and run that.You mean copy the original image and run from that copy? The first option has advantage, that you can save the progress or drop it if you don't like it. I mean, you'll create a snapshot, and then continue using the guest. As time moves on, you may find out that you actually want the state to be persistent, so you merge the active layer into the base. If not, then just drop it. With option #2 you don't have this opportunity. Option #3 is like #1 except that you're doing the snapshot yourself :) Michal
On 09/11/2015 08:03 AM, Michal Privoznik wrote:>> - Using the transient option in the xml file under disk. > > Wow, I didn't even know we have such element.We added the XML, but (still) have not wired it up to actually work :(> >> - Making a qcow2 image and run that. > > You mean copy the original image and run from that copy? > > The first option has advantage, that you can save the progress or drop > it if you don't like it. I mean, you'll create a snapshot, and then > continue using the guest. As time moves on, you may find out that you > actually want the state to be persistent, so you merge the active layer > into the base. If not, then just drop it. With option #2 you don't have > this opportunity.With option #2 (if someone ever implements it), I'd assume we'd want to add support for dropping <transient/> at run-time when it is decided that we want to commit to the disk after all; probably through a block-commit operation. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
On Fri, Sep 11, 2015 at 04:03:20PM +0200, Michal Privoznik wrote:> On 11.09.2015 11:34, Mcburn wrote: > > Hey at all, > > > > my Name is Jens-Uwe Sperling. Iám a young student in computer science. > > I want install a VM for testing at home. > > > > i had install a VM with virt-install and the default parameters. (Number > > cpu, mem etc.) > > > > After that i install my OS and configure it. > > > > Now i want work on this image in a transient way. > > So i can use the OS with the given config but every change i do from now > > should not change my image. > > > > I found three ways to do that: > > > > - Make a snapshot from my image and kill the snapshot after using. > > Yes, this will work perfectly. > > > - Using the transient option in the xml file under disk. > > Wow, I didn't even know we have such element.Don't expect it to actually work with QEMU though :-) if (disk->transient) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("transient disks not supported yet")); goto error; } Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
On Fri, Sep 11, 2015 at 04:03:20PM +0200, Michal Privoznik wrote:> On 11.09.2015 11:34, Mcburn wrote: > > Hey at all, > > > > my Name is Jens-Uwe Sperling. Iám a young student in computer science. > > I want install a VM for testing at home. > > > > i had install a VM with virt-install and the default parameters. (Number > > cpu, mem etc.) > > > > After that i install my OS and configure it. > > > > Now i want work on this image in a transient way. > > So i can use the OS with the given config but every change i do from now > > should not change my image. > > > > I found three ways to do that: > > > > - Make a snapshot from my image and kill the snapshot after using. > > Yes, this will work perfectly. > > > - Using the transient option in the xml file under disk. > > Wow, I didn't even know we have such element. > > > - Making a qcow2 image and run that. > > You mean copy the original image and run from that copy? > > The first option has advantage, that you can save the progress or drop > it if you don't like it. I mean, you'll create a snapshot, and then > continue using the guest. As time moves on, you may find out that you > actually want the state to be persistent, so you merge the active layer > into the base. If not, then just drop it.Related notes on what Michal is talking about: http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit#Procedure> With option #2 you don't have this opportunity. Option #3 is like #1 > except that you're doing the snapshot yourself :)-- /kashyap