[libvirt-users] backup procedure using blockcopy

Eric Blake eblake at redhat.com
Tue Jul 2 15:43:45 UTC 2013


On 07/02/2013 08:19 AM, Thomas Stein wrote:
>> Try this modification (again untested, but at least doesn't have a block
>> job running during the save attempt):
>>
>>    virsh dumpxml --security-info dom > dom.xml
>>    virsh undefine dom
>>    virsh blockcopy dom vda /path/to/backup-vda
>>    polling loop - check periodically until 'virsh blockjob dom vda'
>>      shows 100% completion
>>    virsh suspend dom
>>    virsh blockjob dom vda --abort
>>    virsh save dom /path/to/memory-backup --running

Good through here.

>>    virsh resume dom
>>    virsh define dom.xml
> 

> 
> virsh resume gentoo-template
> error: failed to get domain 'gentoo-template'
> error: Domain not found: no domain with matching name 'gentoo-template'

Aha - then 'virsh resume dom' is not correct; we merely need 'virsh
restore /path/to/memory-backup' which should load from the memory save
file and start it running again (since we saved it with --running in the
first place).

> 
> I think i have to use "start" instead of "resume" although i don't
> understand this behaviour. Maybe i have to define the VM first? Is
> "virsh save dom" shutting down the VM?

'virsh start' would resume a managed-save guest, but we aren't using
managed save.  You want 'restore'.  And yes, 'virsh save' shuts down the
guest (we might enhance it in the future to leave the guest running
after the save image has completed, now that we have a use case for
doing so, but that won't help you with current versions of libvirt).

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130702/bd40995c/attachment.sig>


More information about the libvirt-users mailing list