[libvirt] [PATCH 4/4] qemu: snapshot: Fix return value of external checkpoint with no disks

Eric Blake eblake at redhat.com
Tue May 20 16:16:05 UTC 2014


On 05/20/2014 08:29 AM, Peter Krempa wrote:
> On 05/20/14 16:28, Eric Blake wrote:
>> On 05/20/2014 07:36 AM, Peter Krempa wrote:
>>> When doing an external checkpoint of a VM with no disk selected we'd
>>> return failure but not set error code. This was a result of ret not
>>> being set to 0 during walking of the disk array.
>>>
>>> Rework early failure checking to avoid the problem.
>>>
>>> Fixes the following symptom (or without --diskspec for diskless VMs)
>>>
>>>  $ virsh snapshot-create-as snapshot-test  --memspec /tmp/asdf --diskspec hda,snapshot=no
>>>  error: An error occurred, but the cause is unknown
>>> ---
>>
>> Technically, this is equivalent to a 'virsh save'.  Would it be better
>> to avoid an error altogether and allow the operation as a longhand
>> spelling of the same action?
>>
> 
> virsh save kills the VM after it finishes. This allows to preserve the
> VM running and also allows snapshots of diskless VMs.

Adding an option to 'virsh save' to not kill the guest doesn't make much
sense in general, but might make sense for a diskless VM.  Meanwhile,
don't we already have the option to kill or keep the guest alive after
an external memory snapshot?

So I'm not quite sure where you are heading with this patch - is the
idea that we WANT to allow an external checkpoint with no disks, and
this is fixing a bug that gave an unknown error, or is this a case where
we want to forbid diskless external checkpoints, and you are just
improving the error message?

-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140520/9ef615df/attachment-0001.sig>


More information about the libvir-list mailing list