libvirt/src/qemu
Laine Stump a8e3247e65 qemu: add bootindex option to hostdev network interface commandline
when appropriate, of course. If the config for a domain specifies boot
order with <boot dev='blah'/> elements, e.g.:

     <os>
       ...
       <boot dev='hd'/>
       <boot dev='network'/>
     </os>

Then the first disk device in the config will have ",bootindex=1"
appended to its qemu commandline -device options, and the first (and
*only* the first) network interface device will get ",bootindex=2".

However, if the first network interface device is a "hostdev" device
(an SRIOV Virtual Function (VF) being assigned to the domain with
vfio), then the bootindex option will *not* be appended. This happens
because the bootindex=n option corresponding to the order of "<boot
dev='network'/>" is added to the -device for the first network device
when network device commandline args are constructed, but if it's a
hostdev network device, its commandline arg is instead constructed in
the loop for hostdevs.

This patch fixes that omission by noticing (in bootHostdevNet) if the
first network device was a hostdev, and if so passing on the proper
bootindex to the commandline generator for hostdev devices - the
result is that ",bootindex=2" will be properly appended to the first
"network" device in the config even if it is really a hostdev
(including if it is assigned from a libvirt network pool). (note that
this is only the case if there is no <bootmenu enabled='yes'/> element
in the config ("-boot menu-on" in qemu) , since the two are mutually
exclusive - when the bootmenu is enabled, the individual per-device
bootindex options can't be used by qemu, and we revert to using "-boot
order=xyz" instead).

If a greater level of control over boot order is desired (e.g., more
than one network device should be tried, or a network device other
than the first one encountered in the config), then <boot
dev='network'/> in the <os> element should not be used; instead, the
individual device elements in the config should be given a "<boot
order='n'/>

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1278421
2015-12-15 10:57:27 -05:00
..
EVENTHANDLERS.txt
libvirtd_qemu.aug qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c virJSONValueArraySize: return ssize_t 2015-10-09 15:25:08 +02:00
qemu_agent.h qemu: wire up virDomainSetUserPassword 2015-05-21 16:24:02 +02:00
qemu_blockjob.c qemuDomainEventQueue: Check if event is non-NULL 2015-09-18 13:50:03 +02:00
qemu_blockjob.h qemu: Use domain condition for synchronous block jobs 2015-06-19 15:15:10 +02:00
qemu_capabilities.c qemu: add capability for virtio-input-host-device 2015-11-30 12:29:02 +01:00
qemu_capabilities.h qemu: add capability for virtio-input-host-device 2015-11-30 12:29:02 +01:00
qemu_capspriv.h Implement infrastracture for mocking up QEMU capabilities cache 2015-09-22 13:56:59 +02:00
qemu_cgroup.c qemu cgroups: move new threads to new cgroup after cpuset is set up 2015-12-14 15:58:05 -05:00
qemu_cgroup.h rename qemuSetupHostdevCGroup to qemuSetupHostdevCgroup 2015-11-23 13:52:18 +01:00
qemu_command.c qemu: add bootindex option to hostdev network interface commandline 2015-12-15 10:57:27 -05:00
qemu_command.h qemu: add bootindex option to hostdev network interface commandline 2015-12-15 10:57:27 -05:00
qemu_conf.c qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
qemu_conf.h qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
qemu_domain.c qemu: Add helper to retrieve vCPU pid 2015-12-09 14:57:12 +01:00
qemu_domain.h qemu: Add helper to retrieve vCPU pid 2015-12-09 14:57:12 +01:00
qemu_driver.c qemu: driver: Refactor qemuDomainHelperGetVcpus 2015-12-09 14:57:12 +01:00
qemu_driver.h
qemu_hostdev.c qemu: hostdev: Introduce qemuHostdevUpdateActiveDomainDevices() 2015-10-26 13:50:35 +01:00
qemu_hostdev.h qemu: hostdev: Introduce qemuHostdevUpdateActiveDomainDevices() 2015-10-26 13:50:35 +01:00
qemu_hotplug.c qemu: add bootindex option to hostdev network interface commandline 2015-12-15 10:57:27 -05:00
qemu_hotplug.h
qemu_hotplugpriv.h
qemu_interface.c qemu: add udp interface support 2015-09-02 10:17:50 +02:00
qemu_interface.h
qemu_migration.c qemu: convert monitor to use qemuDomainLogContextPtr indirectly 2015-11-26 14:30:15 +00:00
qemu_migration.h qemu: Use -incoming defer for migrations 2015-11-19 09:41:23 +01:00
qemu_monitor_json.c qemuMonitorJSONEjectMedia: don't stringify the replay at all 2015-12-15 12:18:27 +01:00
qemu_monitor_json.h qemu: Add APIs for migrate-incoming QMP command 2015-11-19 09:41:23 +01:00
qemu_monitor_text.c qemu: monitor: Remove weird return values from qemuMonitorSetCPU 2015-12-09 14:57:12 +01:00
qemu_monitor_text.h qemu: Make virtType of type virDomainVirtType 2015-09-25 15:34:09 -04:00
qemu_monitor.c qemu: monitor: Remove weird return values from qemuMonitorSetCPU 2015-12-09 14:57:12 +01:00
qemu_monitor.h qemu: convert monitor to use qemuDomainLogContextPtr indirectly 2015-11-26 14:30:15 +00:00
qemu_process.c qemu: do not put a task into machine cgroup 2015-12-14 15:48:05 -05:00
qemu_process.h qemu: convert monitor to use qemuDomainLogContextPtr indirectly 2015-11-26 14:30:15 +00:00
qemu_processpriv.h
qemu.conf qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
test_libvirtd_qemu.aug.in qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
THREADS.txt There is no virDomainFindBy{ID, Name, UUID} anymore 2015-08-03 13:08:00 +02:00