{% load i18n %} {% load vm_states %}
{% vm_state instance.status as state %}

{% trans "Access" %} · {{ state.0 }} · {{ instance.console_type|upper }}

{% if not can_open_console %}

{% trans "Only the owners of this instance and administrators can open its console." %}

{% elif instance.status == 1 or instance.status == 3 %} {# one window per VM: opening it again reloads it; a paused VM shows its last screen #}
{% if vdi_reachable %}
{% endif %}

{% trans "Console opens a window here." %} {% if vdi_reachable %}{% trans "VDI opens your remote viewer; console.vv sets up virt-viewer." %} {% else %}{% trans "A remote viewer cannot reach this console: it listens on the host only, or it is a serial one." %}{% endif %}

{% else %}

{% trans "Start the VM to open its console." %}

{% endif %} {% if can_change and app_settings.SHOW_ACCESS_ROOT_PASSWORD == 'True' %}
{% csrf_token %}

{% if guest_access_ready %}{% trans "The guest's root user gets this password." %} {% elif instance.status == 1 %}{% trans "The guest agent is not connected: connect it, or shut the VM down." %} {% else %}{% trans "Shut the VM down, or run it with its guest agent." %}{% endif %}

{% endif %} {% if can_change and app_settings.SHOW_ACCESS_SSH_KEYS == 'True' %}
{% csrf_token %}

{% if not publickeys %}{% trans "You have no saved public key." %} {% trans "Add one in your profile." %} {% elif guest_access_ready %}{% trans "One of your public keys joins root's keys in the guest." %} {% elif instance.status == 1 %}{% trans "The guest agent is not connected: connect it, or shut the VM down." %} {% else %}{% trans "Shut the VM down, or run it with its guest agent." %}{% endif %}

{% endif %}