libvirt/docs/schemas
Laine Stump 3b1c191fe7 conf: parse/format type='hostdev' network interfaces
This is the new interface type that sets up an SR-IOV PCI network
device to be assigned to the guest with PCI passthrough after
initializing some network device-specific things from the config
(e.g. MAC address, virtualport profile parameters). Here is an example
of the syntax:

  <interface type='hostdev' managed='yes'>
    <source>
      <address type='pci' domain='0' bus='0' slot='4' function='3'/>
    </source>
    <mac address='00:11:22:33:44:55'/>
    <address type='pci' domain='0' bus='0' slot='7' function='0'/>
  </interface>

This would assign the PCI card from bus 0 slot 4 function 3 on the
host, to bus 0 slot 7 function 0 on the guest, but would first set the
MAC address of the card to 00:11:22:33:44:55.

NB: The parser and formatter don't care if the PCI card being
specified is a standard single function network adapter, or a virtual
function (VF) of an SR-IOV capable network adapter, but the upcoming
code that implements the back end of this config will work *only* with
SR-IOV VFs. This is because modifying the mac address of a standard
network adapter prior to assigning it to a guest is pointless - part
of the device reset that occurs during that process will reset the MAC
address to the value programmed into the card's firmware.

Although it's not supported by any of libvirt's hypervisor drivers,
usb network hostdevs are also supported in the parser and formatter
for completeness and consistency. <source> syntax is identical to that
for plain <hostdev> devices, except that the <address> element should
have "type='usb'" added if bus/device are specified:

  <interface type='hostdev'>
    <source>
      <address type='usb' bus='0' device='4'/>
    </source>
    <mac address='00:11:22:33:44:55'/>
  </interface>

If the vendor/product form of usb specification is used, type='usb'
is implied:

  <interface type='hostdev'>
    <source>
      <vendor id='0x0012'/>
      <product id='0x24dd'/>
    </source>
    <mac address='00:11:22:33:44:55'/>
  </interface>

Again, the upcoming patch to fill in the backend of this functionality
will log an error and fail with "Unsupported Config" if you actually
try to assign a USB network adapter to a guest using <interface
type='hostdev'> - just use a standard <hostdev> entry in that case
(and also for single-port PCI adapters).
2012-03-05 23:24:28 -05:00
..
basictypes.rng Use a common xml type for ceph secret usage. 2011-10-28 16:01:14 -06:00
capability.rng Fix capabilities XML to use generic terms for suspend targets 2011-11-30 10:12:29 +00:00
domain.rng snapshot: update rng to support full domain in xml 2011-09-03 08:12:13 -06:00
domaincommon.rng conf: parse/format type='hostdev' network interfaces 2012-03-05 23:24:28 -05:00
domainsnapshot.rng snapshot: also support disks by path 2011-09-05 07:03:04 -06:00
interface.rng xml: create an RNG file for common types and move some definitions there 2011-07-05 12:33:21 -04:00
Makefile.am snapshot: update rng to support full domain in xml 2011-09-03 08:12:13 -06:00
network.rng Adding the element pf to network xml. 2012-01-11 13:10:21 -07:00
networkcommon.rng Implement DNS SRV record into the bridge driver 2012-01-02 23:05:55 +08:00
nodedev.rng npiv: Expose fabric_name outside 2011-12-07 18:42:08 +08:00
nwfilter.rng Introduce possibility to have an iterator per variable 2012-01-11 06:42:37 -05:00
secret.rng Use a common xml type for ceph secret usage. 2011-10-28 16:01:14 -06:00
storageencryption.rng Remove accidentally added UUID re-definition in storage schema 2009-09-14 19:11:13 +01:00
storagepool.rng Fix parsing of port attribute in storage XML configuration 2010-11-23 14:55:33 +00:00
storagevol.rng maint: convert leading TABs in *.rng files to equivalent spaces 2010-03-01 20:19:20 +01:00