[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] networking static ip address

On Friday 20 February 2009 13:54:20 Francisco José Martín wrote:

> We have tried several ways to assign a static ip address to the guest os
> eth0 device on boot, but we didn't success. Is there any easy way to do it?

Yes. Create a network definition, specify a host element to the dhcp 
definition, attach the machine to the created bridge and it should work.

  <forward dev='eth0' mode='nat'/>
  <bridge name='intbr0' stp='on' forwardDelay='0' />
  <ip address='' netmask=''>
      <range start='' end='' />
      <host mac='AA:BB:CC:DD:EE:FF' ip=''/>

Snippet for the domain definition:

<interface type='bridge'>
  <mac address='AA:BB:CC:DD:EE:FF'/>
  <source bridge='intbr0'/>
  <target dev='vnet0'/>

> When the guest OS is booted, the eth0 device exists, but is not up, and
> doesn't have the IP.

Is dnsmasq installed and running? Does the guest system use dhcp?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]