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

Re: [virt-tools-list] problems with dhcp on bridged network



On 10/31/2011 05:02 AM, Cam Mac wrote:
To reply to myself, the problem seems to be a delay (possibly due to a bug?) whereby it times out. I cannot see any DHCP requests leaving the br0 device. However, when I use 'crtl+b' to get into the gPXE prompt, and run 'dhcp net0' some DHCP packets are sent and get a reply, and the interface gets an IP address.

Not sure what is going on here!


-Cam

-





KVM host has been set up with bridged networking, and I can successfully kickstart a host using the command line

virt-install --name=vtest --ram 512 -f /dev/vg00/vtest --vcpus=2 --network bridge=br0 -l http://10.62.128.11/mirrors/scientific/6.1/x86_64/os -x "ks=http://10.62.128.11/kickstart/vm-test.cfg console=ttyS0"

However, I cannot get it to work when using virt-manager GUI

I select 'Network Boot' (PXE), under 'Advanced Options', I select 'Host device em1 (Bridge 'br0'), leaving the default Mac address options, however, it fails to get a DHCP address, giving the following error in the console:

---------------------------8<------------------------

Waiting for link up on net0....ok
DHCP (net052:54:00:35:8c:c2)......................connection timed out (0x4c106035)

No more network devices

---------------------------8<------------------------

It generates the following network config in the xml:


----------------8<----------------

<interface type='bridge'>
<source bridge='br0'/>
<mac address='52:54:00:35:8c:c2'/>
<model type='virtio'/>
</interface>

----------------8<----------------

>From KVM guests I have kickstarted via the command line method, I can get DHCP addresses. I cannot even see any DHCP requests on br0 on the KVM when it is attempting to get an address via GUI method

You need to add:

DELAY=0

to your interface definition for the bridge you are using for the VMs.

By default, the bridge will set a delay on any new MAC address to prevent a Spanning Tree issue.

In the case of VMs on a bridge, there should not ever be a spanning tree issue, so just turn the delay off.

Here is the one we use for our VMs:

DEVICE=br0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
DELAY=0


Good luck!



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