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

Jiang Jiacheng posted 7 patches 1 year, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20221011133834.384749-1-jiangjiacheng@huawei.com
There is a newer version of this series
src/conf/device_conf.h       |  4 +--
src/conf/domain_conf.c       | 38 +++++++++++++++-----
src/conf/domain_conf.h       |  4 +++
src/conf/domain_postparse.c  |  8 ++++-
src/qemu/qemu_command.c      | 38 ++++++++++----------
src/qemu/qemu_conf.c         | 69 ++++++++++++++++++++++++++++++++++++
src/qemu/qemu_conf.h         | 12 +++++++
src/qemu/qemu_domain.c       |  3 +-
src/qemu/qemu_driver.c       | 32 +++++++++++++++++
src/qemu/qemu_hotplug.c      | 17 ++++++---
src/qemu/qemu_monitor.c      | 12 +++++++
src/qemu/qemu_monitor.h      |  6 ++++
src/qemu/qemu_monitor_json.c | 22 ++++++++++++
src/qemu/qemu_monitor_json.h |  6 ++++
src/qemu/qemu_process.c      |  8 ++---
src/qemu/qemu_validate.c     |  6 ++--
16 files changed, 242 insertions(+), 43 deletions(-)
[PATCH 0/7] qemu: support updating device's bootindex
Posted by Jiang Jiacheng 1 year, 6 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 -1, 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.

Jiang Jiacheng (7):
  qemu: Introduce qemuDomainChangeBootIndex API
  qemu: Introduce qemuCheckBootIndex and qemuChangeDiskBootIndex API
  qemu: Support update disk's bootindex
  qemu: Support update net's bootindex
  qemu: Support set bootindex to -1
  qemu: Support add bootindex = -1 to boothash
  qemu: Reserve bootindex = -1 in virDomainDeviceDefCopy

 src/conf/device_conf.h       |  4 +--
 src/conf/domain_conf.c       | 38 +++++++++++++++-----
 src/conf/domain_conf.h       |  4 +++
 src/conf/domain_postparse.c  |  8 ++++-
 src/qemu/qemu_command.c      | 38 ++++++++++----------
 src/qemu/qemu_conf.c         | 69 ++++++++++++++++++++++++++++++++++++
 src/qemu/qemu_conf.h         | 12 +++++++
 src/qemu/qemu_domain.c       |  3 +-
 src/qemu/qemu_driver.c       | 32 +++++++++++++++++
 src/qemu/qemu_hotplug.c      | 17 ++++++---
 src/qemu/qemu_monitor.c      | 12 +++++++
 src/qemu/qemu_monitor.h      |  6 ++++
 src/qemu/qemu_monitor_json.c | 22 ++++++++++++
 src/qemu/qemu_monitor_json.h |  6 ++++
 src/qemu/qemu_process.c      |  8 ++---
 src/qemu/qemu_validate.c     |  6 ++--
 16 files changed, 242 insertions(+), 43 deletions(-)

-- 
2.33.0
Re: [PATCH 0/7] qemu: support updating device's bootindex
Posted by Peter Krempa 1 year, 6 months ago
On Tue, Oct 11, 2022 at 21:38:26 +0800, Jiang Jiacheng wrote:
> 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 -1, 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.

Your series doesn't pass our test suite, namely there are trailing
spaces and missing '%s' in an error message.

Make sure you run the test suite including syntax-check before your next
submission:

https://www.libvirt.org/hacking.html#preparing-patches