Re: [PATCH] qemuProcessSetupDisksTransientHotplug: Add checking set-action capability

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

 



On Wed, Aug 25, 2021 at 19:08:46 -0400, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
> 
> The VM is terminated abnormally when <transient shareBacking='yes'/>
> is set to the disk option and the qemu doesn't have set-action capability.
> 
>   # virsh start guest01
>   error: Failed to start domain 'guest01'
>   error: internal error: qemu unexpectedly closed the monitor
> 
>   #
> 
> Add checking the capability before system_reset QMP command is sent
> so that the VM can stop correctly when the qemu doesn't have the cap.
> 
> Signed-off-by: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 3b4af61bf8..4bedd04679 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -7010,6 +7010,9 @@ qemuProcessSetupDisksTransientHotplug(virDomainObj *vm,
>      if (hasHotpluggedDisk) {
>          int rc;
>  
> +        if (!(virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)))
> +            return -1;

This should be in one of the validation functions checking support for
transient disks and with an appropriate error message.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux