libvirt/tests
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
..
capabilityschemadata microblaze: Add architecture support 2011-07-07 17:49:21 -06:00
commanddata command: handle empty buffer argument correctly 2011-12-03 15:55:46 -07:00
confdata maint: improve tests distribution 2010-12-17 11:57:11 -07:00
cputestdata x86: add kvm32 and kvm64, update qemu64 2012-01-27 16:51:49 +01:00
domainschemadata xml: Add element <title> to allow short description of domains 2012-02-01 14:41:13 -07:00
domainsnapshotxml2xmlin snapshot: also support disks by path 2011-09-05 07:03:04 -06:00
domainsnapshotxml2xmlout conf: Introduce new attribute for device address format 2012-02-28 14:27:11 +08:00
interfaceschemadata Update interface.rng and xml test files to match netcf 0.1.5 2010-01-19 21:13:03 +01:00
networkxml2argvdata tests: dynamically replace dnsmasq path 2012-02-01 17:02:45 -07:00
networkxml2xmlin Adding the element pf to network xml. 2012-01-11 13:10:21 -07:00
networkxml2xmlout Adding the element pf to network xml. 2012-01-11 13:10:21 -07:00
nodedevschemadata nodedev: Add removable storage 'media_label' prop 2009-12-14 14:58:23 +01:00
nodeinfodata Modify the tests/nodeinfotest.c to use sysfs in addition 2011-12-08 08:39:26 -05:00
nwfilterxml2xmlin Add test cases for new ways to access variables in filters 2012-01-11 06:42:37 -05:00
nwfilterxml2xmlout Add test cases for new ways to access variables in filters 2012-01-11 06:42:37 -05:00
qemuhelpdata Add support for QEMU 1.0 2011-12-05 13:02:54 +01:00
qemuxml2argvdata conf: parse/format type='hostdev' network interfaces 2012-03-05 23:24:28 -05:00
qemuxml2xmloutdata conf: Introduce new attribute for device address format 2012-02-28 14:27:11 +08:00
qemuxmlnsdata qemu: Test name-space handling 2011-10-19 07:59:59 -06:00
sexpr2xmldata xen_xs: Guard against set but empty kernel argument 2011-10-10 22:58:04 +02:00
storagepoolxml2xmlin storage: add support for Vendor and Model in XML 2010-08-19 15:58:43 -06:00
storagepoolxml2xmlout storage: add support for Vendor and Model in XML 2010-08-19 15:58:43 -06:00
storagevolxml2xmlin tests: Add storage volume XML 2 XML tests. 2009-10-16 10:52:27 -04:00
storagevolxml2xmlout tests: Add storage volume XML 2 XML tests. 2009-10-16 10:52:27 -04:00
vmx2xmldata conf: Introduce new attribute for device address format 2012-02-28 14:27:11 +08:00
xencapsdata Add suspend info to Xen, LXC and UML hypervisor capabilities 2011-11-30 10:12:30 +00:00
xmconfigdata conf: add <listen> subelement to domain <graphics> element 2011-07-28 13:46:39 -04:00
xml2sexprdata Do not drop kernel cmdline for xen pv domains 2011-07-11 09:11:15 -06:00
xml2vmxdata vmx: Better Workstation vmx handling 2012-02-24 11:53:23 +01:00
.valgrind.supp tests: suppress more valgrind situations 2011-05-03 08:03:39 -06:00
capabilityschematest Make test suite output less verbose 2010-01-15 16:28:05 +00:00
commandhelper.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
commandtest.c command: allow merging stdout and stderr in string capture 2012-02-03 10:02:34 -07:00
conftest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
cpuset tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
cputest.c tests: Fix build with -Werror 2012-02-06 09:35:47 +01:00
daemon-conf tests: fix daemon-conf testing failure 2010-11-03 11:43:11 +01:00
define-dev-segfault domain: add implicit USB controller 2012-02-09 16:44:57 -07:00
domainschematest tests: Test qemuxml2xml when expected xml changes 2010-07-28 16:47:56 -04:00
domainsnapshotschematest Domain snapshot RNG and tests. 2010-05-20 13:50:03 -04:00
domainsnapshotxml2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
esxutilstest.c build: properly skip tests 2011-12-01 13:49:20 -07:00
eventtest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
int-overflow tests: Don't use bash if we don't have to 2011-07-29 17:17:21 +02:00
interfaceschematest Make test suite output less verbose 2010-01-15 16:28:05 +00:00
interfacexml2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
jsontest.c Add test case for parsing JSON docs 2011-06-30 18:04:02 +01:00
libvirtd-fail Fix up "make check" 2009-10-07 12:18:13 +02:00
libvirtd-pool Fix up "make check" 2009-10-07 12:18:13 +02:00
Makefile.am Do not include binaries in EXTRA_DIST 2012-02-29 15:24:35 +08:00
networkschematest Make test suite output less verbose 2010-01-15 16:28:05 +00:00
networkxml2argvtest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
networkxml2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
nodedevschematest Make test suite output less verbose 2010-01-15 16:28:05 +00:00
nodedevxml2xmltest.c npiv: Auto-generate WWN if it's not specified 2012-02-10 12:53:25 +08:00
nodeinfotest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
nwfilterschematest nwfilter: Add filter schema for nwfilter XML, extend domain XML schema 2010-04-06 11:09:46 -04:00
nwfilterxml2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
object-locking.ml maint: typo fixes 2011-06-24 08:01:10 -06:00
oomtrace.pl maint: mark more perl scripts executable 2011-05-16 10:12:21 -06:00
openvzutilstest.c build: properly skip tests 2011-12-01 13:49:20 -07:00
openvzutilstest.conf openvz: Add simple test for openvzReadNetworkConf 2011-06-01 11:58:15 +02:00
pkix_asn1_tab.c Add a test case for certificate validation 2011-07-22 15:18:32 +01:00
qemuargv2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
qemuhelptest.c qemu: require qmp on new enough qemu 2012-01-27 08:45:50 -07:00
qemumonitortest.c qemu: unescape HMP commands before converting them to json 2012-02-27 16:06:02 -07:00
qemuxml2argvtest.c tests: Add tests for virtio-scsi and ibmvscsi controllers 2012-02-28 14:28:21 +08:00
qemuxml2xmltest.c conf: parse/format type='hostdev' network interfaces 2012-03-05 23:24:28 -05:00
qemuxmlnstest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
qparamtest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
read-bufsiz build: use portable sed expressions 2010-09-14 08:42:10 -06:00
read-non-seekable tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
reconnect.c tests: avoid xend ABRT crash report 2011-11-18 15:00:18 -07:00
schematestutils.sh tests: fix schema checks sorting 2011-12-22 13:01:09 -07:00
seclabeltest.c security: Driver 'none' cannot create confined guests 2012-02-08 11:55:56 +01:00
sexpr2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
shunloadhelper.c Prevent crash from dlclose() of libvirt.so 2011-09-16 15:51:31 -06:00
shunloadtest.c build: properly skip tests 2011-12-01 13:49:20 -07:00
sockettest.c Split src/util/network.{c,h} into 5 pieces 2011-11-15 10:27:54 +00:00
ssh.c Introduce a generic object for using network sockets 2011-06-24 11:48:18 +01:00
start tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
statstest.c tests: avoid xend ABRT crash report 2011-11-18 15:00:18 -07:00
storagepoolschematest Make test suite output less verbose 2010-01-15 16:28:05 +00:00
storagepoolxml2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
storagevolschematest Make test suite output less verbose 2010-01-15 16:28:05 +00:00
storagevolxml2xmltest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
test_conf.sh Make test suite output less verbose 2010-01-15 16:28:05 +00:00
test-lib.sh tests: simplify formatting 2011-07-11 09:21:37 -06:00
testutils.c build: use correct type for pid and similar types 2012-03-02 06:57:43 -07:00
testutils.h build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
testutilsqemu.c Add support for cpu mode attribute 2012-01-17 11:39:23 +01:00
testutilsqemu.h remove all trailing blank lines 2009-07-16 15:06:42 +02:00
testutilsxen.c Fix default console type setting 2011-11-03 12:01:48 +00:00
testutilsxen.h remove all trailing blank lines 2009-07-16 15:06:42 +02:00
undefine virsh: properly interleave shared stdout and stderr 2011-08-19 09:22:22 -06:00
utiltest.c build: avoid 'make syntax-check' failure 2011-07-01 16:46:20 -06:00
vcpupin tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
virbuftest.c virbuf: add auto-indentation support 2011-10-20 16:02:16 -06:00
virhashdata.h Rename hash.h and hash.c to virhash.h and virhash.c 2012-01-26 14:11:13 +00:00
virhashtest.c Rename hash.h and hash.c to virhash.h and virhash.c 2012-01-26 14:11:13 +00:00
virnetmessagetest.c tests: Fix memory leak in virnetmessagetest 2011-06-29 10:47:54 +08:00
virnetsockettest.c Santize naming of socket address APIs 2011-11-09 17:10:23 +00:00
virnettlscontexttest.c tests: virnettlscontexttest needs gnutls-2.6.0 2012-02-01 16:36:13 -07:00
virsh-all tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
virsh-optparse build: update to latest gnulib 2011-12-01 14:12:59 -07:00
virsh-schedinfo build: update to latest gnulib 2011-12-01 14:12:59 -07:00
virsh-synopsis tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
virshtest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
virt-aa-helper-test fix AppArmor driver for pipe character devices 2011-09-28 15:43:39 +08:00
virtimetest.c Add internal APIs for dealing with time 2011-11-30 11:43:49 +00:00
vmx2xmltest.c vmx: Better Workstation vmx handling 2012-02-24 11:53:23 +01:00
xencapstest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
xmconfigtest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
xml2sexprtest.c build: expand rule to cover testsuite 2012-02-03 10:41:46 -07:00
xml2vmxtest.c vmx: Better Workstation vmx handling 2012-02-24 11:53:23 +01:00