KVM QEMU ethernet bridge using network manager, and guest display resolution

I'm completely new to KVM/QEMU, and been trying to shift to KVM / QEMU from VirtualBox.

After going through over 10+ guides and forum threads, I was able to create Ethernet bridge using Network Manager GUI, and create a virtual machine (If I create the bridge using /etc/network/interfaces, I cannot use network manager anymore).

Both host and guest machines are Ubuntu MATE 20.10

The issues I'm running into are:

(1) Host machine Ethernet connectivity: after every reboot, host machine gets automatically connected to "Ethernet Network", and there'll be no internet. Upon clicking "Wired connection 1" from the drop-down, I do get internet access back.

Though there is no "Ethernet Network" under "Network Connections".

(2) Guest machine display resolution: It doesn't get automatically adjusted to window size like it would in VirtualBox or VMware.

And if I set the guest machine resolution to 1920x1080, I would constantly need to scroll up/down to see the bottom part of guest machine window.

(3) How could I (1) Run, and (2) Open the virtual machine window with a keyboard shortcut:

I tried by assigning "Mod4+H" combination to execute the following but it's not working, though it does work from a terminal:

virsh start ubuntu20.10 && virt-manager --connect qemu:///system --show-domain-console ubuntu20.10

(4) Finally, I would also like to know if this is the proper way to install and setup KVM/QEMU:

sudo apt install qemu qemu-kvm qemu-system libvirt-daemon libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager virt-top libguestfs-tools libosinfo-bin cpu-checker

Create bridge using Network Manager GUI:

1, Network icon > Edit Connections > '+' >

> Bridge (under "Virtual") > create.

2, Change both (1) Connection name, and (2) Interface name to: "br0"

3, Click Add > select Ethernet (as Connection type) > create.

4, Ethernet tab > drop-down arrow under Device > select "enp0s25" > save.

5, Uncheck Enable STP (Spanning Tree Protocol) > save.

6, Reboot > network icon > Edit Connections > will display:

Ethernet:
Wired Connection 1
br0 slave 1

Bridge:
br0
virbr0

7, sudo nano /etc/libvirt/qemu/networks/host-bridge.xml

add:

<network>
  <name>host-bridge</name>
  <forward mode="bridge"/>
  <bridge name="br0" />
</network>

8, sudo virsh net-define /etc/libvirt/qemu/networks/host-bridge.xml

virsh net-start host-bridge

virsh net-autostart host-bridge

9, virsh net-list --all

Name          State    Autostart   Persistent
----------------------------------------------
default       active   yes         yes
host-bridge   active   yes         yes

sudo grep -R "host-bridge" /etc/libvirt/

/etc/libvirt/qemu/networks/host-bridge.xml:  virsh net-edit host-bridge
/etc/libvirt/qemu/networks/host-bridge.xml:  <name>host-bridge</name>

10, sudo adduser admn libvirt

sudo adduser admn libvirt-qemu

cat /etc/group | grep libvirt | awk -F':' {'print $1'} | xargs -n1 sudo adduser $USER

Output:
The user `admn' is already a member of `libvirt'.
The user `admn' is already a member of `libvirt-qemu'.
Adding user `admn' to group `libvirt-dnsmasq' ...
Adding user admn to group libvirt-dnsmasq

11, sudo adduser $USER kvm

Output:
Adding user `admn' to group `kvm' ...
Adding user admn to group kvm

Reboot.

Many thanks in advance.

Replying to my own questions:

(1) sudo nano '/etc/NetworkManager/system-connections/Wired connection 1.nmconnection'

edit:

autoconnect=true
autoconnect-priority=10

(2) Guest machine > View > Scale display > Auto resize VM with window

(3) Still searching... either to "merge" both the commands or run one after another from keyboard shortcuts.

From what I have found so far, virsh can start a VM but cannot open a window, and virt-manager cannot bootup a VM but can open a new window from either terminal or from keyboard shortcuts.

I found this tutoral pretty good: here

basicly to get virtualization with kvm working with bridged networking, you need these packages:

sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils ovmf
and if you want a gui, also install this package
sudo apt install virt-manager

And follow this guide for configuring bridge networking over: here.

That's how I did it, so no more virtualbox for me. I hope this helps.

@denpes thank you for the reply and links.

Yes, I have created network bridge just as described in your 2nd link.

I've already created a test VM and it's working fine... except one issue of guest os display resolution not automatically adjusted to the window. Which I solved by setting up custom resolution by:

nano ~/.xprofile

#!/bin/sh

xrandr --newmode "1920x975_60.00"  155.25  1920 2040 2240 2560  975 978 988 1012 -hsync +vsync
xrandr --addmode Virtual-1 1920x975_60.00