Monday, March 23, 2020

Setting up KVM on LMDE 4 in Debian Buster Style (Classic)

We would start via installs proposed for Ubuntu Focal Fossa and create file /etc/network/interfaces exactly as recommended in official Debian Buster manual to be able launch guests available over all office LAN.
Please be aware of LMDE aims to be as similar as possible to Linux Mint, but *without* using Ubuntu. The package base is provided by Debian instead. LMDE 4 is based on Debian Buster. See 
https://www.debian.org/releases/buster/amd64/release-notes/


$ sudo apt -y install qemu-kvm \
    libvirt-daemon bridge-utils \
    virtinst libvirt-daemon-system
$ sudo apt -y install virt-top libguestfs-tools \
   libosinfo-bin  qemu-system virt-manager

Load "virt-host" and update /etc/modules. 

$ sudo modprobe vhost_net 
$ lsmod | grep vhost
vhost_net              24576  0
tun                    49152   1 vhost_net
vhost                  49152  1 vhost_net
tap                    28672    1 vhost_net

$ echo vhost_net | sudo tee -a /etc/modules

Now create file /etc/network/interfaces per 
https://www.linuxtechi.com/install-configure-kvm-debian-10-buster/
as follows below , where enp3s0 is physical interface to office LAN.
***********************************************
#Primary network interface(enp3s0)
auto enp3s0
iface enp3s0 inet manual
#Configure bridge and give it a static ip
auto br1
iface br1 inet static
        address 192.168.0.19
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports enp3s0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
        dns-nameservers 8.8.8.8
**********************************************
When done reboot the "Debian 10" box . This ad appears at login screen after adding file above in folder /etc/network.



It would result creating bridge "br1" which is supposed to be used instead of libvirt's "br0" to deploy VMs on your office LAN 192.168.0.0/24. Now proceed with launching F32(beta) guest :-



  When with done make sure that F32 Guest is on your private LAN and available for ssh from any PC in your office




  Connecting to F32 WKS Guest




Switching LMDE 4 to Gnome desktop via snap


Attempt of kernel upgrade on LMDE 4 via Debian Backports to Buster.
$ sudo apt-get install linux-image-5.4.0-0.bpo.4-amd64  \
   linux-headers-5.4.0-0.bpo.4-amd64


*****************************************************
Would we like to setup br1 on native Debian Buster 10.3
then configuration should look as follows
*****************************************************
root@boris-pchsw:~# cd /etc/network
root@boris-pchsw:/etc/network# cat interfaces
    source-directory /etc/network/interfaces.d
root@boris-pchsw:/etc/network# cd interfaces.d
root@boris-pchsw:/etc/network/interfaces.d# cat br1
  #Primary network interface(enp3s0)
  auto enp3s0
  iface enp3s0 inet manual
  #Configure bridge and give it a static ip
  auto br1
  iface br1 inet static
        address 192.168.0.19
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports enp3s0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
        dns-nameservers 8.8.8.8
root@boris-pchsw:~#  systemctl restart network-manager
either reboot the box

No comments:

Post a Comment