Volle Kontrolle der KVM aus dem Cockpit


© Mai 2021, Letzte Änd. 16.03.26

--- diese Seite ist noch unvollständig ---

Themen

Installation des KVM Unterbaus auf DEB 13

Cockpit auf Debian 10 zum Laufen zu bekommen, war noch etwas zu früh.
Debain 13 ist mittlerweile aber kein Problem mehr, daher hier die Beschreibung.

Zuächst ist ein Emulator nötig.

sudo apt install qemu-kvm
Hinweis: »qemu-system-x86« wird an Stelle von »qemu-kvm« gewählt.
Installiere:
  qemu-system-x86

Installiere Abhängigkeiten: 
  ibverbs-providers  libglusterfs0     libusbredirparser1t64
  ipxe-qemu          libibverbs1       libvdeplug2t64
  libaio1t64         libiscsi7         libvirglrenderer1
  libblkio1          libndctl6         ovmf
  libcacard0         libnfs14          qemu-block-extra
  libcapstone5       libpmem1          qemu-system-common
  libdaxctl1         librados2         qemu-system-data
  libexecs1          librbd1           qemu-system-gui
  libfdt1            librdmacm1t64     qemu-system-modules-opengl
  libgfapi0          libslirp0         qemu-system-modules-spice
  libgfrpc0          libspice-server1  qemu-utils
  libgfxdr0          liburing2         seabios

Vorgeschlagene Pakete:
  samba  vde2

Dann ist noch für die Virtualisierung ein Hintergrund Prozess nötig.

sudo apt install libvirt-daemon-system
Installiere:                                
  libvirt-daemon-system

Installiere Abhängigkeiten: 
  dmeventd                         libvirt-daemon-driver-secret
  gnutls-bin                       libvirt-daemon-driver-storage
  iptables                         libvirt-daemon-driver-storage-disk
  libdevmapper-event1.02.1         libvirt-daemon-driver-storage-iscsi
  libgnutls-dane0t64               libvirt-daemon-driver-storage-logical
  libip4tc2                        libvirt-daemon-driver-storage-mpath
  libip6tc2                        libvirt-daemon-driver-storage-scsi
  libisns0t64                      libvirt-daemon-lock
  liblvm2cmd2.03                   libvirt-daemon-log
  libnss-mymachines                libvirt-daemon-plugin-lockd
  libopeniscsiusr                  libvirt-l10n
  libtpms0                         libvirt0
  libunbound8                      libxml2-utils
  libvirt-clients                  lvm2
  libvirt-common                   mdevctl
  libvirt-daemon                   netcat-openbsd
  libvirt-daemon-common            open-iscsi
  libvirt-daemon-config-network    passt
  libvirt-daemon-config-nwfilter   swtpm
  libvirt-daemon-driver-interface  swtpm-libs
  libvirt-daemon-driver-network    swtpm-tools
  libvirt-daemon-driver-nodedev    systemd-container
  libvirt-daemon-driver-nwfilter   thin-provisioning-tools
  libvirt-daemon-driver-qemu

Vorgeschlagene Pakete:
  firewalld                                   libvirt-daemon-driver-vbox
  libvirt-clients-qemu                        libvirt-daemon-driver-xen
  libvirt-login-shell                         auditd
  libvirt-daemon-driver-lxc                   systemtap
  libvirt-daemon-driver-storage-gluster       numad
  libvirt-daemon-driver-storage-iscsi-direct  nfs-common
  libvirt-daemon-driver-storage-rbd           trousers
  libvirt-daemon-driver-storage-zfs

Der Libvirt-Klient ist dann bereits drauf.
Wofür der virt-manager benötigt wird, erschließt sich mir noch nicht.

sudo apt install libvirt-clients     ist nicht nötig, da bereits enthalten

sudo apt install virt-manager
Installiere:                                
  virt-manager

Installiere Abhängigkeiten: 
  gir1.2-ayatanaappindicator3-0.1  libgvnc-1.0-0
  gir1.2-gtk-vnc-2.0               libphodav-3.0-0
  gir1.2-gtksource-4               libphodav-3.0-common
  gir1.2-libvirt-glib-1.0          libspice-client-glib-2.0-8
  gir1.2-spiceclientglib-2.0       libspice-client-gtk-3.0-5
  gir1.2-spiceclientgtk-3.0        libusbredirhost1t64
  gir1.2-vte-2.91                  spice-client-glib-usb-acl-helper
  libgtk-vnc-2.0-0

Vorgeschlagene Pakete:
  python3-guestfs  ssh-askpass  virt-viewer

Damit das auch nach einen Neustart so bleibt, ist folgendes nötig.

sudo systemctl enable libvirtd
[sudo] Passwort für m: 
Synchronizing state of libvirtd.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable libvirtd

Ob das geklappt hat, kann man wie folgt kontrollieren.
Am Besten einmal vorher booten.

systemctl status libvirtd
○ libvirtd.service - libvirt legacy monolithic daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset:>
     Active: inactive (dead) since Fri 2026-03-13 12:03:34 CET; 2h 16min ago
   Duration: 2min 97ms
 Invocation: 4a8a1970289d4547a7e513dd003b12cd
TriggeredBy: ● libvirtd.socket
             ● libvirtd-admin.socket
             ● libvirtd-ro.socket
       Docs: man:libvirtd(8)
             https://libvirt.org/
    Process: 9533 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, sta>
   Main PID: 9533 (code=exited, status=0/SUCCESS)
   Mem peak: 7.5M
        CPU: 150ms

Cockpit Installation

Um die Cockpit Web-Oberfläche zur Verfügung zu haben, sind weitere Dinge nötig.

sudo apt install cockpit
Installiere:                                
  cockpit

Installiere Abhängigkeiten: 
  appstream               cockpit-storaged  libpwquality-tools
  cockpit-bridge          cockpit-system    packagekit
  cockpit-networkmanager  cockpit-ws        packagekit-tools
  cockpit-packagekit      libnss-systemd

Vorgeschlagene Pakete:
  apt-config-icons   python3-pcp    lastlog2
  cockpit-doc        udisks2-btrfs  sssd-dbus
  cockpit-sosreport  udisks2-lvm2   libtss2-rc0t64

Um Virtuelle Maschinen bearbeiten zu können, ist ein weiteres Modul nötig.

sudo apt install cockpit-machines
Installiere:                                
  cockpit-machines

Installiere Abhängigkeiten: 
  gir1.2-libosinfo-1.0  libvirt-glib-1.0-data       python3-libvirt
  libisoburn1t64        osinfo-db                   python3-libxml2
  libosinfo-1.0-0       python3-certifi             python3-requests
  libosinfo-l10n        python3-chardet             virt-install
  libvirt-dbus          python3-charset-normalizer  xorriso
  libvirt-glib-1.0-0    python3-idna

Vorgeschlagene Pakete:
  python-charset-normalizer-doc  python3-socks        virt-viewer    cdck
  python3-cryptography           python-requests-doc  xorriso-tcltk
  python3-openssl                python3-argcomplete  jigit

Podman ist ein Modul zum Container-Management.

sudo apt install cockpit-podman
Installiere:                                
  cockpit-podman

Installiere Abhängigkeiten: 
  aardvark-dns                     libcompel1
  buildah                          libcriu2
  catatonit                        libnet1
  conmon                           libprotobuf-c1
  containernetworking-plugins      libsubid5
  containers-storage               netavark
  criu                             podman
  crun                             python3-protobuf
  fuse-overlayfs                   python3-pycriu
  golang-github-containers-common  slirp4netns
  golang-github-containers-image   uidmap

Vorgeschlagene Pakete:
  libwasmedge0  docker-compose

Dann sind noch Befehle nötig, damit das so bleibt.

sudo systemctl enable cockpit.socket

sudo systemctl start cockpit.socket

Überprüfen lässt es sich am Besten nach einen Neustart.

sudo systemctl reboot

systemctl status cockpit.socket
● cockpit.socket - Cockpit Web Service Socket
     Loaded: loaded (/usr/lib/systemd/system/cockpit.socket; enabled; preset: e>
     Active: active (running) since Fri 2026-03-13 11:37:11 CET; 2h 56min ago
 Invocation: aeca198cd6214aedbf8db9377a6e828f
   Triggers: ● cockpit.service
       Docs: man:cockpit-ws(8)
     Listen: [::]:9090 (Stream)
      Tasks: 0 (limit: 18609)
     Memory: 88K (peak: 2.1M)
        CPU: 37ms
     CGroup: /system.slice/cockpit.socket

Nun sollte es möglich sein die Web Console Cockpit zu erreichen.
Bei mir lautet die Adresse   https://n11.fritz.box:9090/.

Zum Anfang

Quellen

answertopia.com   Creating Ubuntu 22.04 KVM Virtual Machines using Cockpit and virt-manager
    Genau genommen   Creating a Virtual Machine in Cockpit;   virt-viewer
cloudspinx.com   How to Install Linux VPS Cockpit Web Console on Debian 12   bridge network, virt-manager, Cockpit
cockpit-project.org   The easy-to-use, integrated, glanceable, and open web-based interface for your servers   für DEB veraltet
computingforgeeks.com   How To Install Cockpit on Debian 12/11/10/9
howtoforge.de   So installierst du die Cockpit Web Console unter Debian 12 netcloud24.com   How to Install Linux VPS Cockpit Web Console on Debian 12
server-world.info   Install Cockpit to manage system settings on Web browser
techotopia.com   Creating KVM Virtual Machines on RHEL 8 using Cockpit and virt-manager
techrepublic.com   How to install Cockpit on Debian Server   nur bemerkenswert wg. extra dir
vultr.com   How to Install Cockpit on Debian 12   mehr geeignet für ufw, certbot

Zum Anfang