libvirt/src
Maxiwell S. Garcia dfd70ca1eb qemu: Do not override config XML in case of snapshot revert
Snapshot create operation saves the live XML and uses it to replace the
domain definition in case of revert. But the VM config XML is not saved
and the revert operation does not address this issue. This commit
prevents the config XML from being overridden by snapshot definition.

An active domain stores both current and new definitions. The current
definition (vm->def) stores the live XML and the new definition
(vm->newDef) stores the config XML. In an inactive domain, only the
config XML is persistent, and it's saved in vm->def.

The revert operation uses the virDomainObjAssignDef() to set the
snapshot definition in vm->newDef, if domain is active, or in vm->def
otherwise. But before that, it saves the old value to return to
caller. This return is used here to restore the config XML after
all snapshot startup process finish.

Signed-off-by: Maxiwell S. Garcia <maxiwell@linux.ibm.com>
2019-05-20 09:08:54 +02:00
..
access maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
admin maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
bhyve bhyve: convert to net model enum 2019-04-16 13:11:08 -04:00
conf virstorageobj: Don't clear vols if they weren't initialized 2019-05-14 15:56:06 +02:00
cpu cpu_x86: Fix placement of *CheckFeature functions 2019-04-15 09:48:05 +02:00
cpu_map cpu_map: Define md-clear CPUID bit 2019-05-14 19:33:37 +02:00
esx snapshot: Make virDomainSnapshotDef a virObject 2019-05-09 10:02:53 -05:00
hyperv maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
interface maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
keycodemapdb@6280c94f30 keycodemapdb: Update submodule 2019-04-15 16:18:00 +02:00
libxl lib: Preserve error around virDomainNetReleaseActualDevice() 2019-04-30 17:00:46 +02:00
locking src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
logging src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
lxc lib: Preserve error around virDomainNetReleaseActualDevice() 2019-04-30 17:00:46 +02:00
network src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
node_device build: drop check for udev_monitor_set_receive_buffer_size 2019-05-16 16:39:46 +02:00
nwfilter maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
openvz maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
phyp maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
qemu qemu: Do not override config XML in case of snapshot revert 2019-05-20 09:08:54 +02:00
remote maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
rpc virNetServerPreExecRestart: Check for retval of virJSONValueNewArray() 2019-05-14 15:56:45 +02:00
secret maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
security src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
storage src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
test test_driver: implement virDomainGetDiskErrors 2019-05-13 14:34:11 +02:00
util lib: Avoid double close when passing FDs with virCommandPassFD() 2019-05-17 16:01:11 +02:00
vbox snapshot: Make virDomainSnapshotDef a virObject 2019-05-09 10:02:53 -05:00
vmware maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
vmx vmx: Free @firmware in virVMXParseConfig 2019-04-23 10:59:01 +02:00
vz snapshot: Make virDomainSnapshotDef a virObject 2019-05-09 10:02:53 -05:00
xenapi maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
xenconfig conf: net: Add model enum, and netfront value 2019-04-16 13:11:08 -04:00
admin_protocol-structs
check-aclperms.pl
check-aclrules.pl
check-driverimpls.pl
check-drivername.pl
check-symfile.pl
check-symsorting.pl
datatypes.c backup: Introduce virDomainCheckpointPtr 2019-03-26 15:40:57 -05:00
datatypes.h backup: Introduce virDomainCheckpointPtr 2019-03-26 15:40:57 -05:00
driver-hypervisor.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver-interface.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver-network.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver-nodedev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver-nwfilter.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver-secret.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver-state.h Revert "Separate out StateAutoStart from StateInitialize" 2019-03-06 10:20:31 +01:00
driver-storage.h libvirt: Introduce virConnectGetStoragePoolCapabilities 2019-03-06 11:12:48 -05:00
driver-stream.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
driver.c Fix names for abs_top_{src,build}dir variables 2019-03-14 10:05:28 +01:00
driver.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
dtrace2systemtap.pl Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
internal.h internal: Introduce VIR_RETURN_PTR 2019-04-10 16:34:57 +02:00
libvirt_admin_private.syms
libvirt_admin_public.syms
libvirt_atomic.syms
libvirt_driver_modules.syms
libvirt_esx.syms
libvirt_internal.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
libvirt_libssh2.syms
libvirt_libssh.syms
libvirt_linux.syms Expose Linux symbols only on Linux 2017-03-27 17:36:13 +02:00
libvirt_lxc.syms
libvirt_openvz.syms
libvirt_private.syms snapshot: Make virDomainSnapshotDef a virObject 2019-05-09 10:02:53 -05:00
libvirt_probes.d
libvirt_public.syms libvirt: Introduce virConnectGetStoragePoolCapabilities 2019-03-06 11:12:48 -05:00
libvirt_qemu_probes.d
libvirt_qemu.syms
libvirt_remote.syms src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
libvirt_sasl.syms
libvirt_vmware.syms
libvirt_vmx.syms
libvirt_xenconfig.syms
libvirt-admin.c Use NULLSTR_EMPTY 2019-02-14 14:09:38 +01:00
libvirt-admin.conf
libvirt-domain-snapshot.c snapshot: Various doc tweaks 2019-03-26 15:33:07 -05:00
libvirt-domain.c lib: domain: Convert to virErrorRestore/virErrorPreserveLast 2019-04-17 10:19:49 -04:00
libvirt-host.c
libvirt-interface.c docs: Consistent spacing in *GetXMLDesc functions 2019-03-13 20:28:52 -05:00
libvirt-lxc.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
libvirt-lxc.pc.in
libvirt-network.c docs: Consistent spacing in *GetXMLDesc functions 2019-03-13 20:28:52 -05:00
libvirt-nodedev.c
libvirt-nwfilter.c docs: Consistent spacing in *GetXMLDesc functions 2019-03-13 20:28:52 -05:00
libvirt-qemu.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
libvirt-qemu.pc.in
libvirt-secret.c
libvirt-storage.c libvirt: Introduce virConnectGetStoragePoolCapabilities 2019-03-06 11:12:48 -05:00
libvirt-stream.c
libvirt.c Revert "Separate out StateAutoStart from StateInitialize" 2019-03-06 10:20:31 +01:00
libvirt.conf
libvirt.pc.in
lock_protocol-structs
lxc_monitor_protocol-structs
lxc_protocol-structs
Makefile.am src: don't statically link code that's already in libvirt.so 2019-05-17 14:34:45 +01:00
qemu_protocol-structs
README Drop UML driver 2018-12-17 17:52:46 +01:00
remote_protocol-structs libvirt: Introduce virConnectGetStoragePoolCapabilities 2019-03-06 11:12:48 -05:00
virkeepaliveprotocol-structs
virnetprotocol-structs

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules

 * vmx/   - VMware VMX config handling (used by esx/ and vmware/)


Then there are the hypervisor implementations:

 * bhyve         - bhyve - The BSD Hypervisor
 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * hyperv/       - Microsoft Hyper-V support using WinRM
 * lxc/          - Linux Native Containers
 * openvz/       - OpenVZ containers using cli tools
 * phyp/         - IBM Power Hypervisor using CLI tools over SSH
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * vbox/         - Virtual Box using native API
 * vmware/       - VMware Workstation and Player using the vmrun tool
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore
 * xenapi/       - Xen using libxenserver


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU and Xen drivers.
The ESX, Hyper-V, Power Hypervisor, Remote, Test & VirtualBox drivers all
implement the secondary drivers directly

 * cpu/          - CPU feature management
 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * nwfilter/     - Network traffic filtering rules
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories