Sergey Chulanov
My notes to remember

Vagrant

Tested on: Ubuntu 22.04

Install vagrant and plugin for libvirt:

You should install libvirt

sudo apt install vagrant
sudo vagrant plugin install vagrant-libvirt

You can run export VAGRANT_DEFAULT_PROVIDER=libvirt to choose default driver.

Get ubuntu image and init Vagrantfile:

vagrant box add generic/ubuntu2004 --provider=libvirt
vagrant box add generic/ubuntu2204 --provider=libvirt
vagrant box list
vagrant box remove generic/ubuntu2204
vagrant init generic/ubuntu2004

Change setting and run:

Bridge with nmcli and KVM

Tested on: Ubuntu 22.04

Get current network config:

nmcli con show
nmcli connection show --active

We musn’t use wireless interface? I’ve spend a lot of time to find solution, but wireless bridge always doesn’t work.
This approach also doesn’t work:

# To bridge wifi interface you may use iw tool to enable 4addr likewise:
# iw dev <wifiInterface> set 4addr on
# brctl addif <bridgename> <wifiInterface>
can't add <wifiInterface> to bridge <bridgename>: Operation not supported
# iw dev <wifiInterface> set 4addr on
# brctl addif <bridgename> <wifiInterface>
Now it should work. You can show bridges using:
# brctl show

Hmm: link Hmm:link

xsel for buffer

Install package to save file context into clipboard buffers:

sudo apt install xsel

To save in the primary (to paste: Shift + Insert, xsel -po):

cat /etc/hosts | xsel -ip

To save in the secondary (to paste: xsel -so)