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

Re: [libvirt-users] Virsh snapshots



On 12/04/2013 04:44 PM, Eric Blake wrote:
> 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).

A simple test of what Eric described is here:

  http://kashyapc.fedorapeople.org/virt/external-system-checkpoint-snapshot.txt


> 
>>
>> 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.
> 
> 
> 
> _______________________________________________
> libvirt-users mailing list
> libvirt-users redhat com
> https://www.redhat.com/mailman/listinfo/libvirt-users
> 


-- 
/kashyap


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