diff --git a/instances/models.py b/instances/models.py index 9248037a..3295bd59 100644 --- a/instances/models.py +++ b/instances/models.py @@ -6,12 +6,11 @@ from django.utils.translation import gettext_lazy as _ from libvirt import ( VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL, VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL, - VIR_DOMAIN_XML_SECURE, libvirtError, ) from operations import claims from operations.models import Claim -from vrtManager.instance import wvmInstance +from vrtManager.instance import PERSISTENT_XML, wvmInstance from webvirtcloud.settings import QEMU_CONSOLE_LISTENER_ADDRESSES @@ -291,7 +290,8 @@ class Instance(models.Model): @cached_property def inst_xml(self): - return self.proxy._XMLDesc(VIR_DOMAIN_XML_SECURE) + # the definition for the next start, which is the current one while the VM is off + return self.proxy._XMLDesc(PERSISTENT_XML) @cached_property def has_managed_save_image(self): diff --git a/instances/templates/instances/settings_tab.html b/instances/templates/instances/settings_tab.html index 2ab07c9f..1b2ec0e4 100644 --- a/instances/templates/instances/settings_tab.html +++ b/instances/templates/instances/settings_tab.html @@ -656,46 +656,38 @@
{% if instance.status != 5 %} -

{% trans "If you need to edit XML please Power Off the instance" %}

+

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

{% endif %}
{% csrf_token %}
- {% if instance.status == 5 %} - - {% else %} - - {% endif %} +
- {% if instance.status == 5 %} -