xenlibvirtvirsh

virsh restore with modified xml "Error: xml modification unsupported"


I'm trying to restore an a Xen VM (domain) from state file which I create previously. At the restore I need to modify the XML of this VM with the following command:

virsh restore domU.state --xml newconfig.xml

This command triggers an error with the following text:

error: Failed to restore domain from domU.state
error: argument unsupported: xml modification unsupported

What I already try:

  1. restore without XML, which works perfectly.
  2. run the command with the original xml the domain was created from
  3. run the command with a totally different file which is not even an XML

At step 2. & 3. the error output was always the same.

Used versions: xen 4.11.1 libvirt 5.1.0 os fedora 30


Solution

  • As the error message suggests, the ability to pass in custom XML when restoring a guest from a snapshot, is unfortunately not supported by the libvirt Xen (libxl) driver. This feature only works with QEMU/KVM at this time.