[libvirt] [PATCH V2 2/2] libxl: fix disk detach when <driver> not specified

Michal Privoznik mprivozn at redhat.com
Thu Feb 9 07:18:47 UTC 2017


On 02/07/2017 08:46 PM, Jim Fehlig wrote:
> When a user does not explicitly set a <driver> in the disk config,
> libvirt defers selection of a default to libxl. This approach works
> fine when starting a domain with such configuration or attaching a
> disk to a running domain. But when detaching such a disk, libxl
> will fail with "unrecognized disk backend type: 0". libxl makes no
> attempt to recalculate a default backend (driver) on detach and
> simply fails when uninitialized.
> 
> This patch updates the libvirt disk config with the backend selected
> by libxl when starting a domain or attaching a disk to a running
> domain. Another benefit of this approach is that the live XML is
> also updated with the backend driver selected by libxl.
> 
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
>  src/libxl/libxl_conf.c   | 32 ++++++++++++++++++++++++++++++++
>  src/libxl/libxl_conf.h   |  4 ++++
>  src/libxl/libxl_domain.c | 25 +++++++++++++++++++++++++
>  src/libxl/libxl_driver.c |  1 +
>  4 files changed, 62 insertions(+)

ACK

Michal




More information about the libvir-list mailing list