[libvirt] [PATCH v2 0/4] Explicit boot device ordering

Jiri Denemark jdenemar at redhat.com
Fri Jan 14 17:04:42 UTC 2011


Currently, boot order can be specified per device class but there is no
way to specify exact disk/NIC device to boot from. This patchset fixes
that.

There were two options suggested for how this should be modeled in
domain XML:

1)
    <os>
      <boot target='net1'/>
      <boot target='net0'/>
      <boot target='hdc'/>
      <boot target='hdb'/>
    <os>

    Where target attributes would match /domain/devices/*/target at dev

2) Adding <boot order='n'/> elements into appropriate device elements.

In addition to the two options Rich suggested a more compact variant of
option 1.

Per former discussion this patchset implements the second option.

Version 2:
- "qemu: Refactor qemuCapsParsePCIDeviceStrs using virCommand" dropped
  the rest was rebased on top of Eric's capabilities patches
- added support for floppy devices which was forgotten in v1

Jiri Denemark (4):
  conf: Move boot parsing into a separate function
  Introduce per-device boot element
  qemu: Support per-device boot ordering
  tests: Add tests for per-device boot elements

 docs/formatcaps.html.in                            |    1 +
 docs/formatdomain.html.in                          |   41 +++++-
 docs/schemas/domain.rng                            |   20 +++-
 src/conf/capabilities.c                            |    3 +-
 src/conf/domain_conf.c                             |  148 ++++++++++++++------
 src/conf/domain_conf.h                             |    2 +
 src/qemu/qemu_capabilities.c                       |    9 ++
 src/qemu/qemu_capabilities.h                       |    1 +
 src/qemu/qemu_command.c                            |   24 +++-
 src/qemu/qemu_command.h                            |    6 +-
 src/qemu/qemu_driver.c                             |    2 +
 src/qemu/qemu_hotplug.c                            |    8 +-
 .../qemuxml2argvdata/qemuxml2argv-boot-order.args  |    1 +
 tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml |   52 +++++++
 tests/qemuxml2argvtest.c                           |    2 +
 tests/qemuxml2xmltest.c                            |    1 +
 16 files changed, 265 insertions(+), 56 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-boot-order.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml

-- 
1.7.4.rc1




More information about the libvir-list mailing list