# Changes in Libvirt XML File of VM are Lost After a Hard Reboot.

## Problem

* The changes made to the **libvirt.xml** file of a VM using were lost post a hard reboot.

## Environment

* Platform9 Managed OpenStack - v4.0 and Higher
* Libvirt
* Nova

## Cause

Starting with Juno( or Kilo ) release **libvirt.xml** cannot be modified manually. A hard reboot will recreate **libvirt.xml,** dropping all the updates and restoring the XML file to the original state.

## Resolution

1. Currently, there is no way to make the changes persist after a hard reboot but we can make the changes and perform a soft reboot for the changes to take effect.
2. Edit the XML file using **the virsh edit** command

{% tabs %}
{% tab title="None" %}

```none
# sudo virsh edit [VM uuid]
```

{% endtab %}
{% endtabs %}

3. Perform a soft reboot of the VM either from the Platform9 Management Plane UI or use the following command

{% tabs %}
{% tab title="None" %}

```none
# opensgtack server reboot [VM uuid]
```

{% endtab %}
{% endtabs %}

4. Avoid a Hard reboot of a VM to ensure the changes made above persist.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmo/how-to/changes-in-libvirt-xml-file-of-vm-are-lost-after-a-hard-reboot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
