Libvirt Virtual Network Creation Operation

From NovaOrdis Knowledge Base
Revision as of 05:23, 19 April 2018 by Ovidiu (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

This section documents virtual network creation procedures.

virsh net-create

net-define

virsh net-define <xml-file>

A sample XML configuration file is available as /usr/share/libvirt/networks/default.xml:

<network>
  <name>default</name>
  <bridge name="virbr0"/>
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254"/>
    </dhcp>
  </ip>
</network>

net-create