Skip to content

Oz network configuration

clalancette edited this page Mar 14, 2013 · 5 revisions

With the default configuration, oz-install will attempt to find a suitable bridge to use to do the install. It finds bridges by walking the list of running libvirt networks and looking for one that is a NATed network. If it cannot find one, oz-install will throw an exception.

If it does throw an exception, there are a few ways to fix it. By far the easiest (and recommended way for new users) is to start the libvirt 'default' network:

# virsh net-start default

It is also possible that the default network failed to start because it conflicts with an already defined network in the guest. If the above command fails, that may be what is happening. In that case it is recommended to edit the default network configuration and choose a different subnet:

# virsh net-edit default
change all references to 192.168.122.x to a different subnet (e.g. 192.168.123.x)
# virsh net-start default

It is also possible that the default network was disabled by an administrator. In that case, there are 2 possible solutions.

The first solution is to define a new default network and start it:

# cat << \EOF > net-default.xml
<network>
  <name>default</name>
  <uuid>def935b0-fa36-4c23-8a58-6fe0e22ca1f5</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:55:a7:C6'/>
  <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>
EOF
# virsh net-define net-default.xml
# virsh net-start default

The second solution is to define your own bridge and point Oz to it. In that case, you would create your own bridge (the details of which are beyond the scope of this document), and then tell Oz to use that bridge by editing /etc/oz/oz.cfg and setting libvirt_bridge to the name of your bridge.

Clone this wiki locally