Februar 2009 Archives

Fr 20. Feb 20:04:37 CET 2009

Static ip assignment with libvirt

I just started to use libvirt and needed to have static ip assignment for some of the systems. Libvirt supports this but there is no documentation for this, a patch with documentation has just been send to the mailing list, but thats all (except the documentation in the *.c files ;-)

A simple example which assigns 192.168.122.2 to the host with the mac AA:BB:CC:DD:EE:FF:
<network>
  <name>sample</name>
  <bridge name='intbr0' />
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
      <host mac='AA:BB:CC:DD:EE:FF' ip='192.168.122.2' name='foobar'/>
    </dhcp>
  </ip>
</network>

Posted by Ulrich Dangel | Permanent Link | Categories: Stuff