Greetings,
I have this setup.
host and two vms, a and b.
vm a servers as router, it has one physical nic passed directly into it.
I want to connect vm a to vm b and the host to provide internet access to both.
so I've created a virtual switch like this:
<network>
<name>default</name>
<uuid>f90b3044-81c1-4c22-98df-8bbca3153f21</uuid>
<bridge name='virsw0' stp='on' delay='0'/>
<mac address='52:54:00:6b:1b:92'/>
</network>
with this xml entry:
<interface type='bridge'>
<mac address='xx:xx:xx:xx:xx:xx'/>
<source bridge='virsw0'/>
<model type='virtio'/>
<address type='pci' domain='x' bus='x' slot='x'
function='x'/>
</interface>
in vm a and vm b should connect the both to the virtual switch thus allowing vm b internet
access.
this however doesn't solves the host connection to the internet.
reading docs points to the fact I can add new tun devs outside of libvirt and add it to
the virtual switch.
so I did this:
$ ip tuntap add QemuTap0 mode tap user root
$ ip link set QemuTap0 master virsw0
and brctl show virsw0 returns this:
$ brctl show virsw0
bridge name bridge id STP enabled interfaces
virsw0 8000.5254006b1b92 yes QemuTap0
so theoretically speaking, when vm a is started and libvirt creates a device and connects
it to the virtual switch and run dhcpd, vm a will provide ip.
am I correct?
Thanks,
Dagg
Show replies by date