libvirt/docs/schemas
Laine Stump 77f72a8615 conf: new "managed" attribute for target dev of <interface type='ethernet'>
Although <interface type='ethernet'> has always been able to use an
existing tap device, this is just a coincidence due to the fact that
the same ioctl is used to create a new tap device or get a handle to
an existing device.

Even then, once we have the handle to the device, we still insist on
doing extra setup to it (setting the MAC address and IFF_UP).  That
*might* be okay if libvirtd is running as a privileged process, but if
libvirtd is running as an unprivileged user, those attempted
modifications to the tap device will fail (yes, even if the tap is set
to be owned by the user running libvirtd). We could avoid this if we
knew that the device already existed, but as stated above, an existing
device and new device are both accessed in the same manner, and
anyway, we need to preserve existing behavior for those who are
already using pre-existing devices with privileged libvirtd (and
allowing/expecting libvirt to configure the pre-existing device).

In order to cleanly support the idea of using a pre-existing and
pre-configured tap device, this patch introduces a new optional
attribute "managed" for the interface <target> element. This
attribute is only valid for <interface type='ethernet'> (since all
other interface types have mandatory config that doesn't apply in the
case where we expect the tap device to be setup before we
get it). The syntax would look something like this:

   <interface type='ethernet'>
      <target dev='mytap0' managed='no'/>
      ...
   </interface>

This patch just adds managed to the grammar and parser for <target>,
but has no functionality behind it.

(NB: when managed='no' (the default when not specified is 'yes'), the
target dev is always a name explicitly provided, so we don't
auto-remove it from the config just because it starts with "vnet"
(VIR_NET_GENERATED_TAP_PREFIX); this makes it possible to use the
same pattern of names that libvirt itself uses when it automatically
creates the tap devices.)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-09 14:35:54 -04:00
..
basictypes.rng virpci: Allow greater PCI domain value in virPCIDeviceAddressIsValid 2019-08-05 19:42:15 +02:00
capability.rng Drop UML driver 2018-12-17 17:52:46 +01:00
cputypes.rng conf: Introduce memoryBacking/discard 2018-05-14 09:42:20 +02:00
domain.rng conf: set up for per-grammar overrides in schemas 2014-04-15 21:07:59 +02:00
domaincaps.rng conf: domcaps: Report device <rng> 2019-08-06 19:45:49 -04:00
domaincheckpoint.rng backup: Document new XML for checkpoints 2019-07-26 16:48:58 -05:00
domaincommon.rng conf: new "managed" attribute for target dev of <interface type='ethernet'> 2019-09-09 14:35:54 -04:00
domainsnapshot.rng docs: schemas: Add 'seclabel' for external disk snapshot 2019-06-20 17:08:53 +02:00
interface.rng schema: remove reference to brctl 2018-06-07 16:30:59 +02:00
network.rng network: wire up dnsmasq option xmlns 2019-07-17 17:18:56 -04:00
networkcommon.rng conf: introduce virNetworkPortDefPtr struct and XML support 2019-06-17 15:19:54 +01:00
networkport.rng conf: introduce virNetworkPortDefPtr struct and XML support 2019-06-17 15:19:54 +01:00
nodedev.rng xml: nodedev: make pci capability class element optional 2019-03-22 12:59:56 +03:00
nwfilter_params.rng schemas: add schema for nwfilter binding XML document 2018-06-26 11:22:07 +01:00
nwfilter.rng schemas: add schema for nwfilter binding XML document 2018-06-26 11:22:07 +01:00
nwfilterbinding.rng schemas: add schema for nwfilter binding XML document 2018-06-26 11:22:07 +01:00
secret.rng secret: Add support for usage type vTPM, extend schema and test case 2019-07-26 09:59:27 +01:00
storagecommon.rng storage: optional 'refresh' elemement on pool 2019-03-19 16:46:21 +01:00
storagepool.rng storage: escape ipv6 for ceph mon hosts to librados 2019-06-18 17:14:17 +02:00
storagepoolcaps.rng docs: Add schema for storage pool capabilities 2019-03-06 11:12:48 -05:00
storagevol.rng docs: schemas: Fix missing timestamp inside backingStore 2018-09-11 10:44:26 +02:00