[PATCH 0/7] qemu: support updating device's bootindex

Jiang Jiacheng posted 7 patches 1 year, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20221117020533.45412-1-jiangjiacheng@huawei.com
There is a newer version of this series
src/conf/device_conf.h       |   3 +
src/conf/domain_conf.c       |   9 ++-
src/conf/domain_postparse.c  |   8 +-
src/qemu/qemu_conf.c         | 140 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_conf.h         |  16 ++++
src/qemu/qemu_domain.c       |   3 +-
src/qemu/qemu_driver.c       |  35 +++++++++
src/qemu/qemu_hotplug.c      |  17 +++--
src/qemu/qemu_monitor.c      |  20 +++++
src/qemu/qemu_monitor.h      |   6 ++
src/qemu/qemu_monitor_json.c |  33 +++++++++
src/qemu/qemu_monitor_json.h |   6 ++
12 files changed, 286 insertions(+), 10 deletions(-)
[PATCH 0/7] qemu: support updating device's bootindex
Posted by Jiang Jiacheng 1 year, 5 months ago
Support updating device's(support cdrom, disk and network) bootindex
online in virDomainUpdateDeviceFlags. The new bootindex will take effect
after guest rebooting. Enable bootindex can be set to 0, it means cancel
the device's bootindex.

To use this feature, we need to get the device's xml first and modify
the boot order in the xml, then use 'virsh update-device <domain> <xml>
--flag' to update the bootindex. Note that the flag should be --config
or --persistent if the vm is running.

diff to v1:
* add a bool bootIndexSpecified in device info to indicates that the
  bootorder of the device can be set.
* use boot order = '0' to cancel the previous bootorder instead of '-1'

Jiang Jiacheng (7):
  qemu: Introduce qemuDomainChangeBootIndex API
  qemu: Add bootIndexSpecified and support set bootIndex to '0'
  qemu: Introduce qemuCheckBootIndex and qemuChangeDiskBootIndex API
  qemu: Support update disk's bootindex
  qemu: Support update net's bootindex
  qemu: Support add bootindex = 0 to boothash when its
    bootIndexSpecified is true
  qemu: Reserve bootIndexSpecified when update device

 src/conf/device_conf.h       |   3 +
 src/conf/domain_conf.c       |   9 ++-
 src/conf/domain_postparse.c  |   8 +-
 src/qemu/qemu_conf.c         | 140 +++++++++++++++++++++++++++++++++++
 src/qemu/qemu_conf.h         |  16 ++++
 src/qemu/qemu_domain.c       |   3 +-
 src/qemu/qemu_driver.c       |  35 +++++++++
 src/qemu/qemu_hotplug.c      |  17 +++--
 src/qemu/qemu_monitor.c      |  20 +++++
 src/qemu/qemu_monitor.h      |   6 ++
 src/qemu/qemu_monitor_json.c |  33 +++++++++
 src/qemu/qemu_monitor_json.h |   6 ++
 12 files changed, 286 insertions(+), 10 deletions(-)

-- 
2.33.0