Libvirt Virtual Network Creation Operation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 9: Line 9:
  virsh net-create
  virsh net-create


  virsh net-define
=net-define=
 
  virsh net-define <''xml-file''>
 
A sample XML configuration file is available as /usr/share/libvirt/networks/default.xml:
 
<syntaxhighlight lang='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>
</syntaxhighlight>
 
=net-create=

Latest revision as of 05:23, 19 April 2018

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