mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
QEMU sends a migrating VM's memory and copied disks in the clear. A compute gets "Encrypt migrations (TLS)" (edit page, Advanced; API field migration_tls); a migration between two hosts that both have it passes VIR_MIGRATE_TLS whenever data moves (not for a shut-off VM's definition alone), and the log says TLS. The hosts need QEMU's certificates in /etc/pki/qemu; a host without them refuses before anything moves. Tried on two AlmaLinux 10 hosts: the TLS stream starts with a TLS record, the plain one with QEMU's QEVM header.
62 lines
3.6 KiB
HTML
62 lines
3.6 KiB
HTML
{% extends "base.html" %}
|
|
{% load django_bootstrap5 %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
|
|
{% block title %}{% if form.instance.pk %}{% trans "Edit host" %}{% else %}{% trans "Add host" %}{% endif %}{% endblock %}
|
|
|
|
{% block page_heading %}
|
|
<span class="text-break">{% if form.instance.pk %}{% blocktrans with name=form.instance.name %}Edit host: {{ name }}{% endblocktrans %}{% else %}{% trans "Add host" %}{% endif %}</span>
|
|
<span class="badge text-bg-light border align-middle fs-6">{{ form.kind }}</span>
|
|
{% endblock page_heading %}
|
|
|
|
{% block style %}<link href="{% static 'css/tom-select.bootstrap5.min.css' %}" rel="stylesheet">{% endblock %}
|
|
|
|
{% block content %}
|
|
<p class="text-body-secondary">{{ form.about }}</p>
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
{% bootstrap_form_errors form type='non_fields' %}
|
|
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
|
|
<section class="card mb-3" aria-labelledby="connection-title">
|
|
<div class="card-header"><h2 class="h5 mb-0" id="connection-title">{% trans "Connection" %}</h2></div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6">{% bootstrap_field form.name %}</div>
|
|
{% if not form.hostname.is_hidden %}<div class="col-md-6">{% bootstrap_field form.hostname %}</div>{% endif %}
|
|
{% if "login" in form.fields %}<div class="col-md-6">{% bootstrap_field form.login %}</div>{% endif %}
|
|
{% if "password" in form.fields %}<div class="col-md-6">{% bootstrap_field form.password %}</div>{% endif %}
|
|
<div class="col-12">{% bootstrap_field form.details %}</div>
|
|
<div class="col-12">{% bootstrap_field form.tags %}
|
|
{# the tags shown, sent back to tell them from a change (TagsField); bootstrap_field leaves them out #}
|
|
{% for name in form.tags.initial %}<input type="hidden" name="{{ form.tags.html_initial_name }}" value="{{ name }}">{% endfor %}
|
|
</div>
|
|
</div>
|
|
{# open when one of them is set or refused #}
|
|
<details class="border-top pt-3"{% if form.migration_address.value or form.migration_address.errors or form.migration_tls.value or form.gstfsd_key.errors %} open{% endif %}>
|
|
<summary>
|
|
<span class="fw-semibold">{% trans "Advanced" %}</span>
|
|
<span class="d-block small text-body-secondary text-break ms-3">
|
|
{% trans "Migration address" %}: {{ form.migration_address.value|default:_("the host name") }}
|
|
{% if form.migration_tls.value %}· {% trans "migrations over TLS" %}{% endif %}
|
|
· {% trans "gstfsd key" %}: {% if form.instance.gstfsd_key %}{% trans "stored" %}{% else %}{% trans "none" %}{% endif %}
|
|
</span>
|
|
</summary>
|
|
<div class="mt-3">
|
|
{% bootstrap_field form.migration_address %}
|
|
{% bootstrap_field form.migration_tls %}
|
|
{% bootstrap_field form.gstfsd_key %}
|
|
</div>
|
|
</details>
|
|
</div>
|
|
</section>
|
|
<div class="d-flex justify-content-end gap-2">
|
|
<a class="btn btn-outline-secondary" href="{% url 'computes' %}">{% trans "Cancel" %}</a>
|
|
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
|
|
</div>
|
|
</form>
|
|
{% endblock content %}
|
|
{% block script %}
|
|
<script src="{% static 'js/tom-select.complete.min.js' %}"></script>
|
|
<script src="{% static 'js/searchable_select.js' %}"></script>
|
|
{% endblock script %}
|