mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Introduce per-device boot element
Currently, boot order can be specified per device class but there is no way to specify exact disk/NIC device to boot from. This patch adds <boot order='N'/> element which can be used inside <disk/> and <interface/>. This is incompatible with the older os/boot element. Since not all hypervisors support per-device boot specification, new deviceboot flag is included in capabilities XML for hypervisors which understand the new boot element. Presence of the flag allows (but doesn't require) users to use the new style boot order specification.
This commit is contained in:
@@ -55,6 +55,7 @@ BIOS you will see</p>
|
||||
</arch>
|
||||
<features>
|
||||
<cpuselection/>
|
||||
<deviceboot/>
|
||||
</features>
|
||||
</guest></span>
|
||||
...
|
||||
|
||||
@@ -103,8 +103,11 @@
|
||||
<dd>The <code>dev</code> attribute takes one of the values "fd", "hd",
|
||||
"cdrom" or "network" and is used to specify the next boot device
|
||||
to consider. The <code>boot</code> element can be repeated multiple
|
||||
times to setup a priority list of boot devices to try in turn.
|
||||
<span class="since">Since 0.1.3</span>
|
||||
times to setup a priority list of boot devices to try in turn. The
|
||||
<code>boot</code> element cannot be used if per-device boot elements
|
||||
are used (see <a href="#elementsDisks">disks</a> and
|
||||
<a href="#elementsNICS">network interfaces</a> sections below.
|
||||
<span class="since">Since 0.1.3, per-device boot since 0.8.8</span>
|
||||
</dd>
|
||||
<dt><code>bootmenu</code></dt>
|
||||
<dd> Whether or not to enable an interactive boot menu prompt on guest
|
||||
@@ -625,6 +628,7 @@
|
||||
<driver name="tap" type="aio" cache="default"/>
|
||||
<source file='/var/lib/xen/images/fv0'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<boot order='2'/>
|
||||
<encryption type='...'>
|
||||
...
|
||||
</encryption>
|
||||
@@ -640,6 +644,7 @@
|
||||
<host name="hostname" port="7000"/>
|
||||
</source>
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<boot order='1'/>
|
||||
</disk>
|
||||
</devices>
|
||||
...</pre>
|
||||
@@ -692,6 +697,14 @@
|
||||
controls the cache mechanism, possible values are "default", "none",
|
||||
"writethrough" and "writeback". <span class="since">Since 0.1.8</span>
|
||||
</dd>
|
||||
<dt><code>boot</code></dt>
|
||||
<dd>Specifies that the disk is bootable. The <code>order</code>
|
||||
attribute determines the order in which devices will be tried during
|
||||
boot sequence. The per-device <code>boot</code> elements cannot be
|
||||
used together with general boot elements in
|
||||
<a href="#elementsOSBIOS">BIOS bootloader</a> section.
|
||||
<span class="since">Since 0.8.8</span>
|
||||
</dd>
|
||||
<dt><code>encryption</code></dt>
|
||||
<dd>If present, specifies how the volume is encrypted. See
|
||||
the <a href="formatstorageencryption.html">Storage Encryption</a> page
|
||||
@@ -813,6 +826,7 @@
|
||||
<source bridge='xenbr0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<script path='vif-bridge'/>
|
||||
<boot order='1'/>
|
||||
</interface>
|
||||
</devices>
|
||||
...</pre>
|
||||
@@ -1090,6 +1104,29 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
ignored.
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsNICSBoot">Specifying boot order</a></h5>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
<target dev='vnet1'/>
|
||||
<b><boot order='1'/></b>
|
||||
</interface>
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
For hypervisors which support this, you can set exact NIC which should
|
||||
be used for network boot. The <code>order</code> attribute determines
|
||||
the order in which devices will be tried during boot sequence. The
|
||||
per-device <code>boot</code> elements cannot be used together with
|
||||
general boot elements in
|
||||
<a href="#elementsOSBIOS">BIOS bootloader</a> section.
|
||||
<span class="since">Since 0.8.8</span>
|
||||
</p>
|
||||
|
||||
<h4><a name="elementsInput">Input devices</a></h4>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -121,9 +121,9 @@
|
||||
</optional>
|
||||
<choice>
|
||||
<ref name="osbootkernel"/>
|
||||
<oneOrMore>
|
||||
<zeroOrMore>
|
||||
<ref name="osbootdev"/>
|
||||
</oneOrMore>
|
||||
</zeroOrMore>
|
||||
</choice>
|
||||
<optional>
|
||||
<element name="bootmenu">
|
||||
@@ -525,6 +525,9 @@
|
||||
<ref name="driver"/>
|
||||
</optional>
|
||||
<ref name="target"/>
|
||||
<optional>
|
||||
<ref name="deviceBoot"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="readonly">
|
||||
<empty/>
|
||||
@@ -963,6 +966,7 @@
|
||||
- the IP address bound to the interface
|
||||
- the name of the script used to set up the binding
|
||||
- the target device used
|
||||
- boot order
|
||||
-->
|
||||
<define name="interface-options">
|
||||
<interleave>
|
||||
@@ -1035,6 +1039,9 @@
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="deviceBoot"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
<define name="virtualPortProfile">
|
||||
@@ -2008,6 +2015,15 @@
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="deviceBoot">
|
||||
<element name="boot">
|
||||
<attribute name="order">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!--
|
||||
Optional hypervisor extensions in their own namespace:
|
||||
QEmu
|
||||
|
||||
Reference in New Issue
Block a user