KVM networking with libvirt (virsh) questions
-
I'm using
MacVTap
driver on plain kvm (debian 11) but I don't understand how kvm networking configuration using libvirt relates to the linux networking configuration.When I create a network using
virsh
I would expect/etc/networking/interfaces
on the host to also contain my newly created networks but it doesn't.I'm probably looking at the wrong things or with the wrong tools. But when I search, I find old information that isn't current. Right now I don't know where to look cause I don't know how it works.
What I'm trying to accomplish is to find out what linux utilities (not libvirt related) I have that I can use to inspect what has actually happened "under the hood".
Any ideas on how I should learn what I don't understand?
-
I assume that Debian 11 uses
NetworkManager
? I don't have a clean Debian system running KVM to check.If so
nmcli
and its related commands are your friend.This is from Fedora 36 + KVM:
-
@JaredBusch said in KVM networking with libvirt (virsh) questions:
I assume that Debian 11 uses NetworkManager? I don't have a clean Debian system running KVM to check.
I will check.
-
@Pete-S said in KVM networking with libvirt (virsh) questions:
@JaredBusch said in KVM networking with libvirt (virsh) questions:
I assume that Debian 11 uses NetworkManager? I don't have a clean Debian system running KVM to check.
I will check.
No, debian 11 doesn't use NetworkManager by default, at least not on servers (package is called network-manager).
So
nmcli
is not available. -
@JaredBusch said in KVM networking with libvirt (virsh) questions:
I assume that Debian 11 uses
NetworkManager
? I don't have a clean Debian system running KVM to check.If so
nmcli
and its related commands are your friend.Thanks Jared.
Reading about
nmcli
and seeing your screenshots led me to understand that macvtap devices are only active when the VM is actually running.Using
ip link
I can now see the macvtap device on the host. One for each VM connected.