mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-05 16:33:50 +00:00
qemu: validate: Allow 'preserve' action for on_crash lifecycle action
In fact keeping the VM around for debugging is a desirable configuration
and actually the implementation has no code as we keep the VM around.
Remove the validation and add a note that it's actually used.
Fixes: b1b85a475f
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
This commit is contained in:
parent
cd09fd71d9
commit
3a90cb03ee
@ -3647,6 +3647,7 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
||||||
|
/* the VM is kept around for debugging */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1083,10 +1083,9 @@ qemuValidateLifecycleAction(virDomainLifecycleAction onPoweroff,
|
|||||||
/* The qemu driver doesn't yet implement any meaningful handling for
|
/* The qemu driver doesn't yet implement any meaningful handling for
|
||||||
* VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE */
|
* VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE */
|
||||||
if (onPoweroff == VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE ||
|
if (onPoweroff == VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE ||
|
||||||
onReboot == VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE ||
|
onReboot == VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE) {
|
||||||
onCrash == VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("qemu driver doesn't support the 'preserve' action for 'on_reboot'/'on_poweroff'/'on_crash'"));
|
_("qemu driver doesn't support the 'preserve' action for 'on_reboot'/'on_poweroff'"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user