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

Running Tails inside a virtual machine has various security implications. Depending on the host operating system and your security needs, running Tails in a virtual machine might be dangerous.

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).

Terminology

virt-manager é baseado em ferramentas de virtualização de baixo nível, indo da interface do usuário até as interações do hardware com o processador. Esta terminologia é um tanto confusa e outras documentações podem mencionar as seguintes ferramentas:

  • KVM é o módulo do núcleo do Linux que interage com os recursos de virtualização do processador.

  • QEMU é o software de virtualização que emula processadores e periféricos virtuais baseado no * KVM * e que inicia e para máquinas virtuais.

  • libvirt é a biblioteca que permite o virt-manager interagir com as capacidades de virtualização fornecidas pelo QEMU.

  • SPICE é o protocolo que permite visualizar a área de trabalho das máquinas virtuais.

  • virt-manager é a interface gráfica que permite criar, configurar e executar máquinas virtuais.

Installation

Para instalar o virt-manager no Debian, execute o seguinte comando:

sudo apt install virt-manager libvirt-daemon-system

Para instalar o virt-manager no Ubuntu, execute o seguinte comando:

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

Running Tails from an ISO image

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

  2. Iniciar o 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. No passo 1, escolha Mídia de instalação local (imagem ISO ou 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. No passo 3, alocar pelo menos 2048 MB de RAM.

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

  9. No passo 5:

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

    • Clique em Concluir para iniciar a máquina virtual.

Se você receber a mensagem de erro "Error starting domain: Requested operation is not valid: network 'default' is not active", então tente iniciar a rede virtual padrão:
  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.

Running Tails from a USB image

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 é o nome do arquivo da imagem USB que você deseja redimensionar.

  3. Iniciar o 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. No passo 1, escolha Importar imagem de disco existente.

  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. No passo 3, alocar pelo menos 2048 MB de RAM.

  9. No passo 4:

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

    2. Escolha Personalizar a configuração antes da instalação.

    3. Clique em Concluir para abrir a vista de configuração.

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

    1. Set Disk bus to USB.

    2. Clique em Aplicar.

    3. Expand the Advanced options.

    4. Enable Removable.

    5. Clique novamente em Aplicar.

    6. Clique em Iniciar Instalação no canto esquerdo superior para iniciar a máquina virtual.

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

Running Tails from a USB stick

Para iniciar o Tails a partir de um dispositivo USB usando o virt-manager, primeiro crie uma máquina virtual a partir de uma imagem ISO conforme descrito acima.

Então faça o seguinte:

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

  2. Insira o dispositivo USB a partir do qual você deseja iniciar o Tails.

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

  4. Clique no botão Adicionar Hardware na parte inferior do painel à esquerda.

  5. Selecione Dispositivo USB Host no painel à esquerda.

  6. No painel à direita, clique no dispositivo a partir do qual você quer iniciar o Tails, e clique em Concluir.

Você pode manter a imagem ISO original conectada como um DVD virtual para instalar o Tails no dispositivo USB, caso seja necessário.

Você também pode desconectar a imagem ISO original e iniciar diretamente do dispositivo USB quando o Tails já estiver instalado nele. Para isso:

  1. Desligue a máquina virtual.

  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. Clique em Aplicar.

  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.

Solução de problemas

Problemas gráficos

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:

  • A funcionalidade Redimensionar automaticamente a MV com janela não funciona em todas as configurações.

  • O dispositivo de vídeo que fornece desempenho gráfico ideal pode ser diferente dependendo da versão do sistema operacional hospedeiro.

Para resolver esses problemas:

  1. Garanta que a máquina virtual possua uma tela Spice e um canal Spice configurados, e não o VNC.

  2. Experimente vários modelos de dispositivos de vídeo virtual.

    Comece com os dispositivos de vídeo Virtio e QXL: geralmente estes fornecem os melhores resultados. Se não funcionarem bem para você, tente todos os outros modelos de dispositivo de vídeo.

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