virt-manager is a Free Software virtualization solution for Linux. virt-manager has a more complex interface than VirtualBox or GNOME Boxes but it also has a more complete set of features.

Die Benutzung von Tails in einer virtuellen Maschine hat verschiedene Konsequenzen für die Sicherheit. Abhängig von Ihrem Hostbetriebssystem und Ihren Sicherheitsanforderungen könnte die Benutzung von Tails in einer virtuellen Maschine gefährlich sein.

virt-manager is the only virtualization solution that allows to use a Persistent Storage. See running Tails from a USB image.

The following instructions have been tested on Debian 12 (Bookworm).

Begrifflichkeiten

virt-manager basiert auf einem Satz von Virtualisierungswerkzeugen, die sich auf einer niedrigeren Ebene befinden und die von der Benutzungsoberfläche bis hin zu Hardwareinteraktionen mit dem Prozessor reichen. Diese Begriffe sind ein wenig verwirrend und andere Dokumentationen könnten die folgenden Werkzeuge erwähnen:

  • KVM ist das Modul des Linux-Kernels, welches mit den Virtualisierungsfunktionen des Prozessors interagiert.

  • QEMU ist die Virtualisierungssoftware, die virtuelle Prozessoren und Systemperipherie basierend auf KVM bereitstellt und virtuelle Maschinen startet und anhält.

  • libvirt ist eine Bibliothek, die es virt-manager erlaubt, mit den von QEMU bereitgestellten Virtualisierungsmöglichkeiten zu interagieren.

  • SPICE ist ein Protokoll, welches das Visualisieren der Arbeitsumgebung von virtuellen Maschinen erlaubt.

  • virt-manager ist die grafische Oberfläche, die es Ihnen erlaubt, virtuelle Maschinen zu erstellen, zu konfigurieren und zu benutzen.

Installation

Um virt-manager in Debian zu installieren, führen Sie folgenden Befehl aus:

sudo apt install virt-manager libvirt-daemon-system

Um virt-manager in Ubuntu zu installieren, führen Sie folgenden Befehl aus:

sudo apt install virt-manager libvirt-bin qemu-kvm

Tails von einem ISO-Image aus benutzen

  1. Download Tails as an ISO image, instead of a USB image.

  2. Starten Sie virt-manager.

  3. Double-click on QEMU/KVM - Not Connected to connect to the QEMU system of your host.

  4. To create a new virtual machine, choose File ▸ New Virtual Machine.

  5. In step 1, choose Local install media (ISO image or CDROM).

  6. In step 2:

    1. Choose ISO image, then Browse..., and Browse Local to browse for the ISO image that you want to start from.

    2. Unselect Automatically detected from the installation media / source.

    3. Specify Debian 11 in the field Choose the operating system you are installing.

  7. In step 3, allocate at least 2048 MB of RAM.

  8. In step 4, unselect Enable storage for this virtual machine.

  9. In step 5:

    • Type a name of your choice for the new virtual machine.

    • Click Finish to start the virtual machine.

Falls Sie die Fehlermeldung "Fehler beim Starten der Domain: Virtuelles Netzwerk ist inaktiv. Virtuelles Netzwerk 'default' ist nicht aktiv" erhalten, versuchen Sie das virtuelle Netzwerk zu starten:
  1. Click on QEMU/KVM - Not Connected.
  2. Choose Edit ▸ Connection details to administer the connection to your local QEMU system.
  3. Click on Virtual Networks tab, then select the default virtual network in the left pane.
  4. Click on the Start Network icon on the bottom of the left pane to start the default virtual network.

Tails von einem USB-Image aus benutzen

Running Tails from a USB image is the only virtualization software that allows you to use a Persistent Storage in a virtual machine.

  1. Download Tails as a USB image, instead of an ISO image.

  2. Increase the size of the USB image to be at least 8 GB. This creates space for automatic upgrades and the Persistent Storage.

    truncate -s size tails.img

    • size has to be at least 7200M.

    • tails.img is the file name of the USB image that you want to resize.

  3. Starten Sie virt-manager.

  4. Double-click on QEMU/KVM - Not Connected to connect to the QEMU system of your host.

  5. To create a new virtual machine, choose File ▸ New Virtual Machine.

  6. In step 1, choose Import existing disk image.

  7. In step 2:

    1. Choose Browse..., and Browse Local to browse for the USB image that you want to start from.

    2. Specify Debian 11 in the field Choose the operating system you are installing.

  8. In step 3, allocate at least 2048 MB of RAM.

  9. In step 4:

    1. Type a name of your choice for the new virtual machine.

    2. Choose Customize configuration before install.

    3. Click Finish to open the configuration view.

  10. In the configuration view, choose VirtIO Disk 1 or IDE Disk 1

    1. Set Disk bus to USB.

    2. Click Apply.

    3. Expand the Advanced options.

    4. Enable Removable.

    5. Click Apply again.

    6. Click Begin Installation in the top left corner to start the virtual machine.

After you start on the USB image, you can create a Persistent Storage on it.

Tails von einem USB-Stick aus benutzen

To run Tails from a USB stick using virt-manager, first create a virtual machine running from an ISO image as described above.

Tun Sie anschließend folgendes:

  1. From the virtual machine window, choose Virtual Machine ▸ Shut Down ▸ Force Off to shut down the virtual machine.

  2. Plug in the USB stick from which you want to run Tails.

  3. Choose View ▸ Details to edit the configuration of the virtual machine.

  4. Klicken Sie auf die Schaltfläche Hardware hinzufügen im unteren Teil des linken Fensterbereichs.

  5. Wählen Sie USB Host Device im linken Fensterbereich aus.

  6. Wählen Sie im rechten Fensterbereich das Gerät aus, von dem Sie Tails starten möchten und klicken Sie auf Abschliessen.

You can keep the original ISO image connected as a virtual DVD to install Tails onto the USB stick if needed.

Sie können das ursprüngliche ISO-Image auch trennen und direkt vom USB-Stick starten, sobald Tails darauf installiert wurde. Um dies zu tun:

  1. Fahren Sie die virtuelle Maschine herunter.

  2. In the configuration of the virtual machine, click on SATA CDROM 1 in the left pane.

  3. Click on the Disconnect button in the right pane.

  4. To enable the USB stick as a boot option:

    1. Click on Boot Options in the left pane.

    2. Select the USB boot option corresponding to your USB device.

    3. Click Apply.

  5. To start the virtual machine choose View ▸ Console and then Virtual Machine ▸ Run.

After you start on the USB device, you can create a Persistent Storage on it.

Fehlerbehebung

Graphics issues

Issues with graphics support in Tails running inside a virtual machine with virt-manager are common. The best solution can vary depending on the version of the virtualization software and on the virtual machine configuration. For example:

  • The Auto resize VM with window feature does not work in all configurations.

  • The video device that provides optimal graphics performance can be different depending on the version of the host operating system.

To troubleshoot such issues:

  1. Ensure the virtual machine has a Spice display and a Spice channel configured, as opposed to VNC ones.

  2. Try various virtual video device models.

    Start with Virtio and QXL video devices: they generally give the best results. If they don't perform well for you, try every other video device model.

  3. Try enabling or disabling the OpenGL and 3D acceleration options of the display and video device.