Product SiteDocumentation Site

2.60. net-dumpxml

Outputs the XML configuration for a virtual network, to stdout.
Usage
net-dumpxml --network network-identifier
Options
Name Required? Description
--network network-identifier
required
The name or UUID of the network whose XML configuration is to be displayed.
The word "--network" itself is optional.
Table 2.6. Options

Availability
Available from libvirt 0.2.0 onwards
Platform or Hypervisor specific notes
None yet
Examples
virsh # net-dumpxml mynetwork
Outputs the XML configuration for the virtual network named "mynetwork".
virsh # net-dumpxml --network mynetwork
Same as the above example.
virsh # net-dumpxml bfbc4c69-7d6a-cc9a-904c-09910ce179c0
Outputs the XML configuration for the virtual network that has a UUID of "bfbc4c69-7d6a-cc9a-904c-09910ce179c0".
virsh # net-dumpxml --network bfbc4c69-7d6a-cc9a-904c-09910ce179c0
Same as the above example.
Example in context
Starting with a few virtual networks already defined:
virsh # net-list --all
Name                 State      Autostart
-----------------------------------------
default              active     yes
examplenetwork       active     no
We use net-dumpxml to look at the XML configuration for "examplenetwork":
virsh # net-dumpxml examplenetwork
<network>
  <name>examplenetwork</name>
  <uuid>b7005dec-be1a-fe9a-338a-0cb1301dfcfd</uuid>
  <forward mode='route'/>
  <bridge name='virbr100' stp='on' delay='0' />
  <ip address='10.10.120.1' netmask='255.255.255.0'>
  </ip>
</network>
Done.
See also
  • net-list - Displays a list of the virtual networks libvirt is aware of.