virBufferAsprintf(&buf, "<source %s='%s'/>\n",
virDomainNetTypeToString(typ), source);
break;
+ case VIR_DOMAIN_NET_TYPE_DIRECT:
+ virBufferAsprintf(&buf, "<source dev='%s'/>\n", source);
+ break;
case VIR_DOMAIN_NET_TYPE_USER:
case VIR_DOMAIN_NET_TYPE_ETHERNET:
case VIR_DOMAIN_NET_TYPE_CLIENT:
case VIR_DOMAIN_NET_TYPE_MCAST:
case VIR_DOMAIN_NET_TYPE_INTERNAL:
- case VIR_DOMAIN_NET_TYPE_DIRECT:
case VIR_DOMAIN_NET_TYPE_HOSTDEV:
case VIR_DOMAIN_NET_TYPE_LAST:
vshError(ctl, _("No support for %s in command 'attach-interface'"),
[I<--target target>] [I<--mac mac>] [I<--script script>] [I<--model model>]
[I<--config>] [I<--inbound average,peak,burst>] [I<--outbound average,peak,burst>]
-Attach a new network interface to the domain. I<type> can be either
-I<network> to indicate connection via a libvirt virtual network or
-I<bridge> to indicate connection via a bridge device on the host.
-I<source> indicates the source of the connection (either the name of a
-network, or of a bridge device). I<target> is used to specify the
-tap/macvtap device to be used to connect the domain to the
+Attach a new network interface to the domain. I<type> can be
+I<network> to indicate connection via a libvirt virtual network, or
+I<bridge> to indicate connection via a bridge device on the host, or
+I<direct> to indicate connection directly to one of the host's network
+interfaces or bridges. I<source> indicates the source of the
+connection (the name of a network, or of a bridge device, or the
+host's network interfaces or bridges). I<target> is used to specify
+the tap/macvtap device to be used to connect the domain to the
source. Names starting with 'vnet' are considered as auto-generated
and are blanked out/regenerated each time the interface is attached.
I<mac> specifies the MAC address of the network interface; if a MAC