[libvirt] [PATCH v3 0/7] Add new APIs to edit xml configuration of managed save state of a domain

Kothapally Madhu Pavan posted 7 patches 115 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1499245116-133305-1-git-send-email-kmp@linux.vnet.ibm.com
include/libvirt/libvirt-domain.h |   6 ++
src/driver-hypervisor.h          |  11 +++
src/libvirt-domain.c             | 107 ++++++++++++++++++++
src/libvirt_public.syms          |   6 ++
src/qemu/qemu_driver.c           |  87 ++++++++++++++++
src/remote/remote_driver.c       |   2 +
src/remote/remote_protocol.x     |  31 +++++-
src/remote_protocol-structs      |  14 +++
tools/virsh-domain.c             | 207 +++++++++++++++++++++++++++++++++++++++
tools/virsh.pod                  |  41 ++++++++
10 files changed, 511 insertions(+), 1 deletion(-)

[libvirt] [PATCH v3 0/7] Add new APIs to edit xml configuration of managed save state of a domain

Posted by Kothapally Madhu Pavan 115 weeks ago
managedsave command offloads the user from managing the save state file.
It does not need the user to specify saved state file location, all it takes
is domain name to identify. This makes it much more comfortable to use in
emergency where immediate shutdowm is needed. But it doesn't provide a way
to edit XML description of the save state file without user going through an
extra effort to search manually where the file actually exists.

The series aims to overcome the above constraints by adding new APIs and
commands to seemlessly edit the managed save state XML description using
just the domain name. The Patches mainly make use of the save-image-edit
code flow only to simplify the above use case.

This patch set provides capability to Dump and Edit the XML configuration
associated with a saved state file of a domain which was created by the
managedsave command.

The new command carry the similar options as the save-image-<XXX> commands
to change the running state as to paused state or running on start.

This is equivalent to:

 virsh managedsave-dumpxml domain-name > state-file.xml
 vi state-file.xml (or make changes with your other text editor)
 virsh managedsave-define domain-name state-file-xml

or you can simply use:

 virsh managedsave-edit domain-name

It's always better when we get more.

Changes since v2:
- refracted version references from 3.5.0 to 3.6.0

Changes since v1:
- qemu implementation called directly rather than going through
  driver pointer in qemuDomainManagedSaveDefineXML.
- check whether the managed save state file exists and report a
  error if it doesn't.

Kothapally Madhu Pavan (7):
  lib: Add API to dump xml configuration of managed save state domain
  lib: Add API to edit domain's managed save state xml configuration
  qemu: Implement qemuDomainManagedSaveGetXMLDesc
  qemu: Implement qemuDomainManagedSaveDefineXML
  virsh: Implement managedsave-define command
  virsh: Implement managedsave-dumpxml command
  virsh: Implement managedsave-edit command

 include/libvirt/libvirt-domain.h |   6 ++
 src/driver-hypervisor.h          |  11 +++
 src/libvirt-domain.c             | 107 ++++++++++++++++++++
 src/libvirt_public.syms          |   6 ++
 src/qemu/qemu_driver.c           |  87 ++++++++++++++++
 src/remote/remote_driver.c       |   2 +
 src/remote/remote_protocol.x     |  31 +++++-
 src/remote_protocol-structs      |  14 +++
 tools/virsh-domain.c             | 207 +++++++++++++++++++++++++++++++++++++++
 tools/virsh.pod                  |  41 ++++++++
 10 files changed, 511 insertions(+), 1 deletion(-)

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list