On Tue, 22 Sep 2020 at 22:30, Lucas Castro <lu...@gnuabordo.com.br> wrote:

>
> On 9/22/20 5:54 PM, James Allsopp wrote:
>
>
>
> On Tue, 22 Sep 2020 at 19:47, Lucas Castro <lu...@gnuabordo.com.br> wrote:
>
>>
>> On 9/22/20 1:26 PM, James Allsopp wrote:
>> > Hi,
>> > I've got a computer that I'm running debian 10 on with KVM. The
>> > machine is connected to a OpenWRT router which provides DHCP and DNS
>> > to the network, via a wifi link used for the host and an ethernet
>> > connection on eth1 used for a bridge
>>
>> Is your OpenWRT router running in vm on the same host or somewhere else
>> throughout physical network eth1?
>>
>>
> The OpenWRT is a completely separate device running at the end of the
> cable connected to eth1. The Wireless is also connected to an AP on that
> router. All of this is on the 192.168.1.* network.
>
>
>
>> >
>> > I've set this file up for the bridge in /etc/network/interfaces.d/br0
>> > auto eth1
>> > auto br0
>> > iface br0 inet dhcp
>> > bridge_ports eth1
>> > bridge_fd 0
>> > bridge_stp off
>> >
>> > ifup br0 brought it up nicely and it got an IP address in the range
>> > I'd expect. So far so good. The only problem is now, I can't get any
>> > of the VM's I create to use this network. When creating a VM using
>> > Virtual Machine Manager, it gives me the option to specify shared
>> > device name for the network source. One of these is for a network I
>> > already created in virsh;
>> >
>> > <network>
>> >   <name>host-bridge</name>
>> >   <forward mode="bridge"/>
>> >   <bridge name="br0"/>
>> > </network>
>>
> Try something like this ti get your vm settings.
>
> virsh -c qemu:///system dumpxml ${GUEST_NAME} | egrep -A5 -i
> "network|bridge"
>
>
> i.e.
>
> virsh -c qemu:///system dumpxml Buster | egrep -A5 -i "network|bridge"
>     <interface type='network'>
>       <mac address='52:54:00:1b:07:7c'/>
>       <source network='default' bridge='virbr0'/>
>       <target dev='vnet0'/>
>       <model type='virtio'/>
>       <alias name='net0'/>
>       <address type='pci' domain='0x0000' bus='0x01' slot='0x00'
> function='0x0'/>
>     </interface>
>     <interface type='bridge'>
>       <mac address='52:54:00:7c:96:61'/>
>       <source bridge='lxc-lan'/>
>       <target dev='vnet1'/>
>       <model type='virtio'/>
>       <alias name='net1'/>
>       <address type='pci' domain='0x0000' bus='0x07' slot='0x00'
> function='0x0'/>
>     </interface>
>
> >
>> > However, if I set the network to either 'host-bridge' or br0 directly,
>> > the route is never set and I can never get  a dhcp setting. I've
>> > checked ip_forward is set to 1.
>> >
>> > I'd just like to set it up this way, as it seems really inefficient to
>> > have a dhcp and then use difficult to remember static IP's everywhere.
>> >
>> > Thanks
>> > James
>> >
>> >
>> --
>> Lucas Castro
>>
>> Here's what I get;
 virsh -c qemu:///system dumpxml proxy1 | egrep -A5 -i "network|bridge"
    <interface type='bridge'>
      <mac address='52:54:00:8a:6e:57'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>

 12:40:09 pm BST  james  BigRaid 
❱ virsh -c qemu:///system dumpxml debian10 | egrep -A5 -i "network|bridge"
    <interface type='bridge'>
      <mac address='52:54:00:f8:30:32'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00'
function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
 Thanks
James

> --
> Lucas Castro
>
>

Reply via email to