{% load i18n %} {% load django_bootstrap5 %} {% load bootstrap_icons %} {% load operations %}
{% if instance.status != 5 %}

{% trans "While the VM runs, most settings here apply at its next start." %}

{% endif %}
{% if instance.guest_agent_ready %} {% include 'instances/info_tab.html' %} {% endif %} {% if request.user.is_superuser %}
{# the devices the VM tries in turn when it starts, and those it does not try; each moves on its own #}

{% trans "Boot order" %}

{% trans "When the VM starts it tries these devices in turn and boots from the first that works." %}

{% csrf_token %}
    {% for device in instance.config_boot_devices %}{% if device.checked %}{% include "instances/boot_device.html" %}{% endif %}{% endfor %}

{% if instance.config_boot_types %}{% blocktrans with types=instance.config_boot_types %}The VM boots by device type: {{ types }}. Add a device to choose the order yourself.{% endblocktrans %} {% else %}{% trans "No device is in the boot order. Add one." %}{% endif %}

{% trans "Not in the boot order" %}

    {% for device in instance.config_boot_devices %}{% if not device.checked %}{% include "instances/boot_device.html" %}{% endif %}{% endfor %}

{% trans "Startup settings" %}

{% csrf_token %}

{% trans "Start this VM when the host starts." %}

{% csrf_token %}

{% trans "Show a device chooser when the VM starts." %}

{# its CD-ROM drives, then its disks as list rows; the forms are those of the actions #} {% if instance.status != 5 %}

{% bs_icon 'lock' %} {% trans "The VM is running: CD-ROM drives added now use the USB or SCSI bus. Shut it down to detach a SATA or IDE CD-ROM drive, or to detach or delete disks." %}

{% endif %}

{% trans "Removable media" %}

{# the pools are read again: an ISO image copied to one by hand is listed then #}
{% csrf_token %}
{% include 'add_instance_cdrom.html' %}
{% for cd in instance.media %}
{% csrf_token %}
{% trans "CD-ROM" %} {{ forloop.counter }}
{{ cd.dev }} · {{ cd.bus }} · {% if cd.image %}{{ cd.image }}{% else %}{% trans "No media" %}{% endif %}
{% if not cd.image or cd.bus == "usb" %} {% endif %}
{% if cd.bus == "usb" %} {# libvirt has no empty USB drive: it is detached, not ejected #} {% elif cd.image %} {% else %}
{% endif %}
{% empty %}

{% trans "The VM has no CD-ROM drive." %}

{% endfor %}

{% trans "Disks" %} · {{ instance.config_disks|length }}

{% include 'add_instance_volume.html' %}
{% for disk in instance.config_disks %}

{% bs_icon 'device-hdd' %} {{ disk.dev }}

{{ disk.bus }} · {{ disk.format }}
{% if disk.storage is None %}
{% trans "Error getting disk info" %}
{% else %} {% widthratio disk.used disk.size 100 as used_percent %} {# a qcow2 file's metadata can take it past its capacity: the bar stops full #} {% if used_percent|add:0 > 100 %}{% widthratio 100 1 1 as used_percent %}{% endif %}
{% trans "Capacity" %} {{ disk.size|filesizeformat }} {% blocktrans with used=disk.used|filesizeformat %}{{ used }} used{% endblocktrans %}
{% trans "Storage pool" %} {{ disk.storage }}
{% trans "Source" %}: {{ disk.path }}
{% endif %}
{% csrf_token %} {% include 'instances/edit_instance_volume.html' with id=forloop.counter0 %}
{% if request.user.is_superuser %}{% include 'instances/move_disk.html' with id=forloop.counter0 %}{% endif %}
{% csrf_token %}
{% csrf_token %}
{% trans "Device details" %}
{% trans "Cache" %}
{{ disk.cache }}
{% trans "IO mode" %}
{{ disk.io }}
{% trans "Discard" %}
{{ disk.discard }}
{% trans "Detect zeroes" %}
{{ disk.detect_zeroes }}
{% trans "Serial" %}
{{ disk.serial|default:"—" }}
{% trans "Read-only" %}
{{ disk.readonly|yesno }}
{% trans "Shareable" %}
{{ disk.shareable|yesno }}
{% endfor %}
{% if instance.pcie_slots %} {# a PCIe machine gives each virtio disk and network device a slot; a running VM gets no new one #} {% with total=instance.pcie_slots.0 free=instance.pcie_slots.1 next=instance.config_pcie_slots %}
{% blocktrans %}PCIe slots: {{ free }} free of {{ total }}{% endblocktrans %}{% if next and next.1 != free %} · {% blocktrans with next_free=next.1 %}{{ next_free }} free from the next start{% endblocktrans %}{% endif %} {% if request.user.is_superuser %}
{% csrf_token %}
{% endif %}
{% endwith %} {% endif %}
{# a row per NIC in one list, as the disks; its QoS limits fold out like its device details #}

{% trans "Network devices" %} · {{ instance.config_networks|length }}

{% include 'add_instance_network_block.html' %}
{% for network in instance.config_networks %}

{% bs_icon 'ethernet' %} eth{{ forloop.counter0 }}

{{ network.target|default:_("no target") }}
{% trans "Source" %} {{ network.nic|default:"—" }}
{% trans "IPv4" %} {{ network.ipv4|join:", "|default:_("unknown") }}
{% csrf_token %}
{# a NIC that is a host device is changed in the XML editor #} {% if network.type != "hostdev" %} {% endif %} {% if network.type != "hostdev" %}
{% csrf_token %}
{% endif %}
{% trans "Device details" %}
{% trans "Type" %}
{{ network.type }}
{% trans "MAC" %}
{{ network.mac }}
{% trans "Model" %}
{{ network.model|default:"—" }}
{% trans "NWFilter" %}
{{ network.filterref|default:_("None") }}
{% trans "IPv6" %}
{{ network.ipv6|join:", "|default:_("unknown") }}
{% trans "QoS limits" %} · {% if network.inbound and network.outbound %}{% trans "inbound, outbound" %}{% elif network.inbound %}{% trans "inbound" %}{% elif network.outbound %}{% trans "outbound" %}{% else %}{% trans "none" %}{% endif %} {% if network.inbound %}{% include 'instances/nic_qos_form.html' with nic=forloop.counter0 direction="inbound" limit=network.inbound %}{% endif %} {% if network.outbound %}{% include 'instances/nic_qos_form.html' with nic=forloop.counter0 direction="outbound" limit=network.outbound %}{% endif %}

{% trans "Average and peak are in KiB/s, burst in KiB. A running VM gets a change after it is powered off and on." %}

{% if network.type == 'direct' %}

{% bs_icon 'info-circle' %} {% trans "In most configurations, macvtap does not work for host to guest network communication" %}

{% endif %} {# the dialogs of Edit and Add QoS #} {% if network.type != "hostdev" %}
{% csrf_token %}
{% endif %}
{% csrf_token %} {% include 'add_network_qos.html' with id=forloop.counter0 %}
{% empty %}
{% trans "The VM has no network device." %}
{% endfor %}
{% if show_hostdevs %}

{% trans "Devices of the host given to the VM. The VM starts only on a host that has them; it is not migrated while it has them, and its clones get none." %}

{% if request.user.is_superuser %} {# the add forms come when the tab opens: their choices scan every VM of the host #}
{% trans "Reading the host's devices…" %}
{% endif %} {% if usb_hostdevs %}
{% if request.user.is_superuser %}{% endif %} {% for device in usb_hostdevs %} {% if request.user.is_superuser %} {% endif %} {% endfor %}
{% trans "USB device" %} {% trans "Chosen by" %} {% trans "Running VM" %} {% trans "Next start" %}{% trans "Actions" %}
{{ device.name|default:"–" }} {{ device.vendor|slice:"2:" }}:{{ device.product|slice:"2:" }} {% if device.address %}{% blocktrans with bus=device.address.0 device=device.address.1 %}Its address {{ bus }}/{{ device }}{% endblocktrans %}{% else %}{% trans "Its model: any device of it" %}{% endif %} {% if device.now %}{% blocktrans with bus=device.now.0 device=device.now.1 %}Has {{ bus }}/{{ device }}{% endblocktrans %}{% else %}–{% endif %} {% if device.next %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}
{% csrf_token %}
{% endif %} {% if pci_hostdevs %}
{% if request.user.is_superuser %}{% endif %} {% for device in pci_hostdevs %} {% if request.user.is_superuser %} {% endif %} {% endfor %}
{% trans "PCI device" %} {% trans "Running VM" %} {% trans "Next start" %}{% trans "Actions" %}
{{ device.name|default:"–" }} {{ device.address }} {% if device.now %}{% trans "Has it" %}{% else %}–{% endif %} {% if device.next %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}
{% csrf_token %}
{% endif %} {% for device in other_hostdevs %}

{% if device.type == "nic" %}{% trans "Network interface" %}{% else %}{{ device.type|upper }}{% endif %} {{ device.address }} {% if device.now and device.next %}{% trans "running VM and next start" %}{% elif device.now %}{% trans "running VM only" %}{% else %}{% trans "next start only" %}{% endif %}; {% trans "changed in the XML editor" %}

{% endfor %} {% if not usb_hostdevs and not pci_hostdevs and not other_hostdevs %}

{% trans "The VM has no host devices." %}

{% endif %}
{% endif %}
{% csrf_token %}{% submission_key %}

{% trans "Migration route" %}

{% if instance.status == 1 %}{% trans "The VM is running: it migrates live, or paused for the transfer when Live migration is off." %} {% elif instance.status == 3 %}{% trans "The VM is paused: it stays paused on the destination." %} {% elif instance.status == 5 %}{% trans "The VM is shut off: it moves offline." %}{% endif %} {% trans "Both hosts need the same emulator; the VM's definition leaves the source host." %}

{# a VM that cannot go anywhere gets the reason, not the disks and settings #} {% if not migrate_refusal %}

{% bs_icon 'device-hdd' %} {% trans "Storage" %}

{% bs_icon 'arrow-left-right' %} {% trans "Transfer settings" %}

{% if instance.status == 1 or instance.status == 3 %}

{% trans "The VM keeps running while its memory is copied. Off, it is paused for the transfer." %}

{% endif %} {% if instance.status == 1 %}

{% trans "Slows the guest's CPUs so that a busy VM's live migration can finish. Only with Live migration." %}

{% trans "Compresses the memory sent: less network, more CPU on both hosts." %}

{% trans "Skips libvirt's safety checks, such as a disk cache mode that can corrupt data in a migration." %}

{% endif %}

{% trans "After a migration that copied disks, their files on the source host go. Disks on shared storage stay." %}

{% endif %}
{% if migrate_refusal %}

{{ migrate_refusal }}

{% endif %}

{% trans "Migration runs as a background job." %}

{% if migrate_refusal %} {% else %} {# enabled once the disks of the chosen destination are shown #} {% endif %}
{% if instance.status != 5 %}

{% trans "This is the definition for the VM's next start; a saved change applies then." %}

{% endif %}
{% csrf_token %}

{% trans "Instance owners" %}

{% include 'add_instance_owner_block.html' %}

{% trans "Every owner can power the VM and open its console. A new owner has no other right until it is given one." %}

{% if userinstances %}
    {% for userinstance in userinstances %}
  • {{ userinstance.user }}

    {% if userinstance.is_change or userinstance.is_delete %} {% if userinstance.is_change %}{% trans "Change settings" %}{% endif %}{% if userinstance.is_change and userinstance.is_delete %} · {% endif %}{% if userinstance.is_delete %}{% trans "Delete the VM" %}{% endif %}{% if userinstance.is_change and userinstance.is_vnc %} · {% trans "Change console settings" %}{% endif %} {% else %} {% trans "Power and console only" %} {% endif %}

    {% if request.user.is_superuser %} {% endif %}
  • {% endfor %}
{% else %}

{% trans "The VM has no owner: only administrators can use it." %}

{% endif %}
{% endif %} {% if can_manage_console %}
{% csrf_token %} {% if instance.status != 5 %}

{% trans "The running console keeps its current settings; changes here apply after the VM is shut down and started." %}

{% endif %}

{% trans "Console" %}

{{ console_form.console_type }} {% if console_form.keymap %}

{% trans "The settings below apply to a VNC console." %}

{% else %}

{% trans "The VNC settings appear once the console type VNC is saved." %}

{% endif %}
{% if console_form.keymap %}

{% bs_icon 'display' %} {% trans "VNC connection" %}

{{ console_form.listen_on }}

{% if not request.user.is_superuser %}{% trans "Only administrators can change this." %} {% endif %}{% trans "Beyond localhost the console is reachable from the network." %}

{{ console_form.keymap }}

{% bs_icon 'key' %} {% trans "VNC password" %}

{{ console_form.password_action.label }}

{% if instance.config_console_passwd %}{% trans "A password is set." %}{% else %}{% trans "No password is set." %}{% endif %}

{% for choice in console_form.password_action %}
{{ choice.tag }}
{% endfor %}
{{ console_form.password }}

{% trans 'Up to 8 characters (an accented letter counts as two), used with "Set a new one".' %}

{% endif %}
{% endif %} {% if can_clone %}
{% csrf_token %}{% submission_key %}

{% trans "Create a clone" %}

{% blocktrans with name=instance.name %}Source VM: {{ name }}{% endblocktrans %}

{% if instance.config_tpm == "emulator" %}

{% trans "The clone gets a new, empty TPM: keys in this VM's TPM, such as BitLocker's, do not come along." %}

{% endif %}
{% if request.user.is_superuser %}

{% elif app_settings.CLONE_INSTANCE_AUTO_NAME == 'True' %} {% else %} {% endif %}
{% if request.user.is_superuser %}
{% if instance.config_networks %}

{% bs_icon 'ethernet' %} {% trans "Network" %}

{% for network in instance.config_networks %}

eth{{ forloop.counter0 }} · {{ network.nic }}

{% if forloop.first %} {# the DHCP host entry of the clone's name holds one address: the first NIC's #} {% endif %}
{% endfor %}
{% endif %}

{% bs_icon 'device-hdd' %} {% trans "Storage" %}

{% for disk in instance.config_disks %}

{{ disk.dev }} · {% blocktrans with pool=disk.storage %}Pool: {{ pool }}{% endblocktrans %} · {{ disk.format }}

{# a running or paused VM's disks are copied by a backup job, which does not preallocate #} {% if disk.format == 'qcow2' and instance.status == 5 %}
{% endif %}
{% empty %}

{% trans "The VM has no disk to copy." %}

{% endfor %}
{% endif %}
{% trans "Size" %}

{% trans "The VM's size to start from; the quota counts the larger of the two." %}

{% trans "Optional details" %}
{% if usb_hostdevs or pci_hostdevs or other_hostdevs %}

{% trans "The clone gets none of the VM's host devices: one VM holds a device of the host." %}

{% endif %}

{% trans "Cloning runs as a background job." %}

{% if instance.status == 1 or instance.status == 3 or instance.status == 5 %} {% else %} {% endif %}
{% endif %} {% if can_change %}
{% csrf_token %}

{% bs_icon 'pencil-square' %} {% trans "VM details" %}

{% trans "A title and description to identify the VM." %}

{% csrf_token %}

{% trans "A template is a VM to clone: it is not counted in quotas and cannot be started." %}

{% if not request.user.is_superuser and not request.user.is_staff %}{% trans "Only administrators and staff can change this." %} {% elif instance.status != 5 %}{% trans "Shut the VM down to change this." %}{% endif %}

{% if request.user.is_superuser %}
{% csrf_token %}

{% trans "The graphics device the guest sees." %}

{% csrf_token %}

{% trans "A virtio device that feeds the guest's entropy from the host: a new VM does not wait for it at boot. From the next start." %}

{% if instance.config_rng == "custom" %}

{% trans "The VM has its own RNG device: change it in the XML editor." %}

{% endif %}
{% csrf_token %}

{% trans "An emulated TPM 2.0, as Windows 11 needs with UEFI Secure Boot. Its state stays on the host until the VM is destroyed: a TPM added again has it back. From the next start." %}

{% if instance.config_tpm == "custom" %}

{% trans "The VM has its own TPM: change it in the XML editor." %}

{% elif not instance.config_tpm and not tpm_support %}

{% trans "This host offers no TPM 2.0: install swtpm on it." %}

{% endif %}
{% csrf_token %}

{% trans "For a crash the guest reports, not a hang. Stop keeps a VM that crashes again and again down for a look. From the next start." %}

{% if instance.config_on_crash == "restart" or instance.config_on_crash == "destroy" %}
{% else %}

{% blocktrans with action=instance.config_on_crash %}{{ action }}: change it in the XML editor.{% endblocktrans %}

{% endif %}
{% csrf_token %}

{% trans "The channel to the agent in the guest: a running VM gets it at once." %}

{% trans "Agent" %}: {% if instance.status != 1 and instance.status != 3 %}{% trans "VM not running" %} {% elif not instance.guest_agent %}{% trans "No channel" %} {% elif instance.guest_agent_ready %}{% trans "Connected" %} {% else %}{% trans "Not connected" %}{% endif %}

{% endif %}
{% endif %}