This is an old revision of the document!


Back  
 Next

KVM versus Proxmox

I originally started using Linux KVM based VM, with QEMU and Libvirt on Ubuntu bare metal, circa 2014, this before was I was aware that Proxmox existed. Around 2020 I moved to Debian as my preferred bare metal distribution for server and desktop, I stopped using Windows as my main home desktop around this time. When I started playing around with Docker to create my own container images I preferred use of the Alpine distribution and where necessary using the S6-rc init system. I avoid the use of Ubuntu now as I just find some of their practices unpalatable, e.g. forced use of Snaps, requiring registration for latest package updates. Also their base server and desktop distributions came across as bloated around the time I stopped using them as my main distribution. I see no point reengaging with Ubuntu at this time, as many of the dissatisfaction that made me move are still in place, perhaps even worse now.

Interestingly as I understand it Proxmox uses Debian and Linux KVM VM, however they also provide a lot of additional functionally, such as nice web interface, nice VM backup, etc.

I use nftables as my main edge router / firewall on bare metal, I could probably run this on a VM within Proxmox. My current router is an Intel N3700, which in 2023 is becoming slow and resource limited. I also run a VM with Docker containers for a backup Bind9 DNS and backup Kea DHCP. As my upstream internet speed is about 65Mb/s down and 17Mb/s up this router is still suitable for purpose. I expect when internet connectivity speed goes above 250Mb/s the router capacity may become limiting. (I am currently eyeing an Intel i5-1335U as a possible replacement, this is much fast overall and should easily handle multi Gb/s internet traffic, as well as more complex resource intensive Docker instances.)

My main home server is based upon an Intel Atom C3750 server, this is still currently adequately meeting my needs. I have upgraded with a 2.5Gb/s PCIe card. I have not been able to find a good replacement for this machine at this time. It was designed as a server, again an i5-1335U is in many ways superior, CPU cores and threads, CPU and memory speed and bandwidth, however memory is not ECC and memory is limited to 64GB, neither of which is probably a problem for me, as I am currently only using 32GB. Power consumption is similar. The biggest problem is that I have not been able to date find an i5-1335U motherboard with 4+ SATA ports and PCIE expansion slot, most are laptop boards, router boards or industrial embedded type boards that do not have the functionality that I am after.

I may try Proxmox in the future, there is currently no compelling reason for me to do so at this time.

Setup VM

I use Linux KVM with libvirt, virsh and qemu.

  • Install standard Debian files. See kvm setup
  • Add user to libvirt and libvirt-qemu, e.g. sudo usermod -a -G libvirt-qemu baumkp
  • If you are ssh'ing into the host machine remember to add the ssh key to allow password-less login. e.g. ssh-copy-id 192.168.1.21 from the host machined where 192.168.1.21 is the remote machine. If you do not do this the VM installer can ask for password continuously to the point of making use non-functional.
    • The user ssh keys are stored here ~/.ssh/known_hosts. If there is a problem with ssh key have a look here.
      • Check file permission is local user
      • Delete old key in file if necessary
      • Delete whole file if necessary
  • sudo apt install vim to install vim
  • Set static ip address and a bridge network (this varies on the install type)
    • For networkd:
      • sudo apt install bridge-utils Docker will need a bridge network connection
      • /etc/network/interfaces
        source /etc/network/interfaces.d/*
         
        # The loopback network interface
        auto lo
        iface lo inet loopback
         
        # The primary network interface
        #allow-hotplug enp1s0
        #iface enp1s0 inet dhcp
         
        auto br0
        iface br0 inet static
          bridge_ports enp1s0
          address 192.168.1.2/24
          gateway 192.168.1.1         #Do not use on router
        #  dns-nameservers 192.168.1.1
          bridge_stp off  # disable Spanning Tree Protocol 
  • /app/www/public/data/attic/docker_notes/vm-container.1705200417.txt.gz
  • Last modified: 2024-01-14 Sun wk02 10:46
  • by baumkp