I've spent a few days learning and playing with KVM. I understand a Bridge is like a virtual unmanaged switch. I looked at a few install guides (i.e. https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-kvm-qemu-on-centos-7-rhel-7.html). The initial setup (with a single working VM I can ssh into from host. From the host I can do this (in terms of bridges/networks)
$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000acd288913 no enp1s2
virbr0 8000.5254009da072 yes virbr0-nic
$ sudo virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
So if I understand correctly I have 2 bridges (virtual switches), one (br0) connected to enp1s2 (my main server interface connected to the host) and virbr0 connected to virbr0-nic (internal KVM network?).
So my question is how is this wired and why is it wired like this. What other commands are there to help me work this out? Something like VM->virbr0->br0->host.
I'm also a little confused about Spanning Tree Protocol, what exactly it does and how KVM needs/uses it. All the descriptions I have read confuse my poor little brain.
Lastly with this setup (if the firewall is set up to allow port 22) if I set up the VM with a Public IP would I be able to ssh into the VM from the internet. I.e. I only need to set up the public IP on the VM (not the host) and the bridge routers it to from internet to VM (via the host) without setting up any specific routings/forwards ....
Ben
0 Answers