[libvirt] [PATCH v1 00/14] Never ending story of user supplied aliases

Michal Privoznik mprivozn at redhat.com
Thu Oct 19 08:10:55 UTC 2017


As discussed earlier [1], we should allow users to set device
aliases at the define time. While the discussed approach calls
for generating missing aliases too, I'm saving that for another
patch set. There are couple of reasons for that:

a) I don't think it's really necessary (if users are interested
   in a device they can just set the alias).

b) This patch set is already big enough as is.

c) Generating aliases is going to have its own problems.

Therefore, for now I'm only proposing parsing user supplied
aliases. The idea is that it's not enabled by default for all
drivers. Any driver that want to/can provide this feature has to
set VIR_DOMAIN_DEF_FEATURE_USER_ALIAS. Note that we have some
drivers that don't have notion of device aliases. But the code is
generic enough so that it should be easy to use in the drivers
that do know what aliases are.

1: https://www.redhat.com/archives/libvir-list/2017-October/msg00201.html

Michal Privoznik (14):
  conf: Fix virDomainDeviceGetInfo const correctness
  virDomainObjGetOneDefState: Fix error message
  qemuAssignDeviceAliases: Use qemuAssignDeviceRNGAlias for assigning
    RNG aliases
  qemu: Move device alias assignment to separate functions
  qemu: Be tolerant to preexisting aliases
  conf: Pass xmlopt down to virDomainDeviceInfoParseXML
  conf: Parse user supplied aliases
  conf: Validate user supplied aliases
  virDomainDeviceInfoCheckABIStability: Check for alias too
  qemuxml2argvdata: Drop device aliases
  qemuhotplugtest: Load active XML
  conf: Format alias even for inactive XMLs
  docs: Document user aliases
  qemu: Parse alias from inactive XMLs

 docs/formatdomain.html.in                          |  23 ++
 src/conf/domain_conf.c                             | 353 ++++++++++++++++-----
 src/conf/domain_conf.h                             |   8 +-
 src/libvirt_private.syms                           |   1 +
 src/qemu/qemu_alias.c                              | 139 +++++++-
 src/qemu/qemu_domain.c                             |   3 +-
 src/qemu/qemu_driver.c                             |   3 +
 src/qemu/qemu_hotplug.c                            |   6 +-
 tests/qemuhotplugtest.c                            |   3 +-
 .../qemuxml2argv-disk-cdrom-network-ftp.xml        |   1 -
 .../qemuxml2argv-disk-cdrom-network-ftps.xml       |   1 -
 .../qemuxml2argv-disk-cdrom-network-http.xml       |   1 -
 .../qemuxml2argv-disk-cdrom-network-https.xml      |   1 -
 .../qemuxml2argv-disk-cdrom-network-tftp.xml       |   1 -
 .../qemuxml2argv-usb-redir-filter.xml              |   1 -
 15 files changed, 444 insertions(+), 101 deletions(-)

-- 
2.13.6




More information about the libvir-list mailing list