|
|
d76c62 |
From a7ad591f6a6b86b24b1ed030cc9b1ca5b3bf4346 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <a7ad591f6a6b86b24b1ed030cc9b1ca5b3bf4346@dist-git>
|
|
|
d76c62 |
From: Laine Stump <laine@redhat.com>
|
|
|
d76c62 |
Date: Thu, 30 Jan 2020 14:12:44 -0500
|
|
|
d76c62 |
Subject: [PATCH] docs: document <interface> subelement <teaming>
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Laine Stump <laine@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit f0f34056ab26eaa9f903a51cd1fa155088fd640f)
|
|
|
d76c62 |
|
|
|
d76c62 |
Conflicts:
|
|
|
d76c62 |
docs/news.xml - feature is in release 6.1.0 upstream, but
|
|
|
d76c62 |
that release doesn't exist downstream.
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/1693587
|
|
|
d76c62 |
Signed-off-by: Laine Stump <laine@redhat.com>
|
|
|
d76c62 |
Message-Id: <20200130191244.24174-7-laine@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
docs/formatdomain.html.in | 101 ++++++++++++++++++++++++++++++++++++++
|
|
|
d76c62 |
docs/news.xml | 28 +++++++++++
|
|
|
d76c62 |
2 files changed, 129 insertions(+)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
|
|
|
d76c62 |
index 4db9c292b7..98a811bd09 100644
|
|
|
d76c62 |
--- a/docs/formatdomain.html.in
|
|
|
d76c62 |
+++ b/docs/formatdomain.html.in
|
|
|
d76c62 |
@@ -5873,6 +5873,107 @@
|
|
|
d76c62 |
</devices>
|
|
|
d76c62 |
...
|
|
|
d76c62 |
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ Since 6.1.0 (QEMU and KVM only, requires
|
|
|
d76c62 |
+ QEMU 4.2.0 or newer axnd a guest virtio-net driver supporting
|
|
|
d76c62 |
+ the "failover" feature, such as the one included in Linux
|
|
|
d76c62 |
+ kernel 4.18 and newer)
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ The <teaming> element of two interfaces can
|
|
|
d76c62 |
+ be used to connect them as a team/bond device in the guest
|
|
|
d76c62 |
+ (assuming proper support in the hypervisor and the guest
|
|
|
d76c62 |
+ network driver).
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+...
|
|
|
d76c62 |
+<devices>
|
|
|
d76c62 |
+ <interface type='network'>
|
|
|
d76c62 |
+ <source network='mybridge'/>
|
|
|
d76c62 |
+ <mac address='00:11:22:33:44:55'/>
|
|
|
d76c62 |
+ <model type='virtio'/>
|
|
|
d76c62 |
+ <teaming type='persistent'/>
|
|
|
d76c62 |
+ <alias name='ua-backup0'/>
|
|
|
d76c62 |
+ </interface>
|
|
|
d76c62 |
+ <interface type='network'>
|
|
|
d76c62 |
+ <source network='hostdev-pool'/>
|
|
|
d76c62 |
+ <mac address='00:11:22:33:44:55'/>
|
|
|
d76c62 |
+ <model type='virtio'/>
|
|
|
d76c62 |
+ <teaming type='transient' persistent='ua-backup0'/>
|
|
|
d76c62 |
+ </interface>
|
|
|
d76c62 |
+</devices>
|
|
|
d76c62 |
+...
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ The <teaming> element required
|
|
|
d76c62 |
+ attribute type will be set to
|
|
|
d76c62 |
+ either "persistent" to indicate a device that
|
|
|
d76c62 |
+ should always be present in the domain,
|
|
|
d76c62 |
+ or "transient" to indicate a device that may
|
|
|
d76c62 |
+ periodically be removed, then later re-added to the domain. When
|
|
|
d76c62 |
+ type="transient", there should be a second attribute
|
|
|
d76c62 |
+ to <teaming> called "persistent"
|
|
|
d76c62 |
+ - this attribute should be set to the alias name of the other
|
|
|
d76c62 |
+ device in the pair (the one that has <teaming
|
|
|
d76c62 |
+ type="persistent'/>).
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ In the particular case of QEMU,
|
|
|
d76c62 |
+ libvirt's <teaming> element is used to setup
|
|
|
d76c62 |
+ a virtio-net "failover" device pair. For this setup, the
|
|
|
d76c62 |
+ persistent device must be an interface with <model
|
|
|
d76c62 |
+ type="virtio"/>, and the transient device must
|
|
|
d76c62 |
+ be <interface type='hostdev'/>
|
|
|
d76c62 |
+ (or <interface type='network'/> where the
|
|
|
d76c62 |
+ referenced network defines a pool of SRIOV VFs). The guest will
|
|
|
d76c62 |
+ then have a simple network team/bond device made of the virtio
|
|
|
d76c62 |
+ NIC + hostdev NIC pair. In this configuration, the
|
|
|
d76c62 |
+ higher-performing hostdev NIC will normally be preferred for all
|
|
|
d76c62 |
+ network traffic, but when the domain is migrated, QEMU will
|
|
|
d76c62 |
+ automatically unplug the VF from the guest, and then hotplug a
|
|
|
d76c62 |
+ similar device once migration is completed; while migration is
|
|
|
d76c62 |
+ taking place, network traffic will use the virtio NIC. (Of
|
|
|
d76c62 |
+ course the emulated virtio NIC and the hostdev NIC must be
|
|
|
d76c62 |
+ connected to the same subnet for bonding to work properly).
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ NB1: Since you must know the alias name of the virtio NIC when
|
|
|
d76c62 |
+ configuring the hostdev NIC, it will need to be manually set in
|
|
|
d76c62 |
+ the virtio NIC's configuration (as with all other manually set
|
|
|
d76c62 |
+ alias names, this means it must start with "ua-").
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ NB2: Currently the only implementation of the guest OS
|
|
|
d76c62 |
+ virtio-net driver supporting virtio-net failover requires that
|
|
|
d76c62 |
+ the MAC addresses of the virtio and hostdev NIC must
|
|
|
d76c62 |
+ match. Since that may not always be a requirement in the future,
|
|
|
d76c62 |
+ libvirt doesn't enforce this limitation - it is up to the
|
|
|
d76c62 |
+ person/management application that is creating the configuration
|
|
|
d76c62 |
+ to assure the MAC addresses of the two devices match.
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ NB3: Since the PCI addresses of the SRIOV VFs on the hosts that
|
|
|
d76c62 |
+ are the source and destination of the migration will almost
|
|
|
d76c62 |
+ certainly be different, either higher level management software
|
|
|
d76c62 |
+ will need to modify the <source> of the
|
|
|
d76c62 |
+ hostdev NIC (<interface type='hostdev'> ) at
|
|
|
d76c62 |
+ the start of migration, or (a simpler solution) the
|
|
|
d76c62 |
+ configuration will need to use a libvirt "hostdev" virtual
|
|
|
d76c62 |
+ network that maintains a pool of such devices, as is implied in
|
|
|
d76c62 |
+ the example's use of the libvirt network named "hostdev-pool" -
|
|
|
d76c62 |
+ as long as the hostdev network pools on both hosts have the same
|
|
|
d76c62 |
+ name, libvirt itself will take care of allocating an appropriate
|
|
|
d76c62 |
+ device on both ends of the migration. Similarly the XML for the
|
|
|
d76c62 |
+ virtio interface must also either work correctly unmodified on
|
|
|
d76c62 |
+ both the source and destination of the migration (e.g. by
|
|
|
d76c62 |
+ connecting to the same bridge device on both hosts, or by using
|
|
|
d76c62 |
+ the same virtual network), or the management software must
|
|
|
d76c62 |
+ properly modify the interface XML during migration so that the
|
|
|
d76c62 |
+ virtio device remains connected to the same network segment
|
|
|
d76c62 |
+ before and after migration.
|
|
|
d76c62 |
+
|
|
|
d76c62 |
|
|
|
d76c62 |
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/docs/news.xml b/docs/news.xml
|
|
|
d76c62 |
index 731f010297..408ffc8518 100644
|
|
|
d76c62 |
--- a/docs/news.xml
|
|
|
d76c62 |
+++ b/docs/news.xml
|
|
|
d76c62 |
@@ -65,6 +65,34 @@
|
|
|
d76c62 |
</change>
|
|
|
d76c62 |
</section>
|
|
|
d76c62 |
<section title="New features">
|
|
|
d76c62 |
+ <change>
|
|
|
d76c62 |
+ <summary>
|
|
|
d76c62 |
+ support for virtio+hostdev NIC <teaming>
|
|
|
d76c62 |
+ </summary>
|
|
|
d76c62 |
+ <description>
|
|
|
d76c62 |
+ QEMU 4.2.0 and later, combined with a sufficiently recent
|
|
|
d76c62 |
+ guest virtio-net driver (e.g. the driver included in Linux
|
|
|
d76c62 |
+ kernel 4.18 and later), supports setting up a simple network
|
|
|
d76c62 |
+ bond device comprised of one virtio emulated NIC and one
|
|
|
d76c62 |
+ hostdev NIC (which must be an SRIOV VF). (in QEMU, this is
|
|
|
d76c62 |
+ known as the "virtio failover" feature). The allure of this
|
|
|
d76c62 |
+ setup is that the bond will always favor the hostdev device,
|
|
|
d76c62 |
+ providing better performance, until the guest is migrated -
|
|
|
d76c62 |
+ at that time QEMU will automatically unplug the hostdev NIC
|
|
|
d76c62 |
+ and the bond will send all traffic via the virtio NIC until
|
|
|
d76c62 |
+ migration is completed, then QEMU on the destination side
|
|
|
d76c62 |
+ will hotplug a new hostdev NIC and the bond will switch back
|
|
|
d76c62 |
+ to using the hostdev for network traffic. The result is that
|
|
|
d76c62 |
+ guests desiring the extra performance of a hostdev NIC are
|
|
|
d76c62 |
+ now migratable without network downtime (performance is just
|
|
|
d76c62 |
+ degraded during migration) and without requiring a
|
|
|
d76c62 |
+ complicated bonding configuration in the guest OS network
|
|
|
d76c62 |
+ config and complicated unplug/replug logic in the management
|
|
|
d76c62 |
+ application on the host - it can instead all be accomplished
|
|
|
d76c62 |
+ in libvirt with the interface <teaming> subelement
|
|
|
d76c62 |
+ "type" and "persistent" attributes.
|
|
|
d76c62 |
+ </description>
|
|
|
d76c62 |
+ </change>
|
|
|
d76c62 |
<change>
|
|
|
d76c62 |
<summary>
|
|
|
d76c62 |
new PCI hostdev address type: unassigned
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.0
|
|
|
d76c62 |
|