Re: Virsh snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/04/2013 08:29 AM, Juraj Melo wrote:
> Thanks for your answer,

[please don't top-post on technical lists, and use proper in-reply-to
headers to keep things properly threaded]

> 
> I am trying to make a snapshot of whole virtual machine (disk, CPU
> state, memory). But I need to make this snapshot in matter of seconds.

This is possible using external snapshots with memory, present since
libvirt 1.0.5.  The overall operation takes as long as a migration to
file, but the guest continues to operate throughout that phase.  The
actual guest downtime is a mere fraction of a second at the point where
the disk snapshots are taken once the migration to file completed.

virsh snapshot-create-as $dom $snapname --live --memspec /path/to/file

will store the memory state into /path/to/file, and create an external
disk snapshot of each disk (you may need to use the --diskspec option if
you want to control the filenames of those disk snapshots).

> 
> I have already try to create snapshot of  disk, which is not problem. I
> use qcow2 format, and create new disk image using original disk image as
> backing file. But still I am not able to assign state of vm with new disk.
> 
> I have found some commands for creating snapshots in libvirt API, so in
> my opinion one way how to accomplish my task is to create utility using
> theese commands, and create snapshot of vm in RAM - I hope it would be
> faster.
> 
> But I wonder whether virsh contains similar functionality, so I won't
> need to programm it again.
> 

Yes, virsh wraps the virDomainSnapshotCreateXML() API.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux