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.