libvirt/src/qemu
Nikolay Shirokovskiy 6c6d93bc62 qemu: hide details of fake reboot
If we use fake reboot then domain goes thru running->shutdown->running
state changes with shutdown state only for short period of time.  At
least this is implementation details leaking into API. And also there is
one real case when this is not convinient. I'm doing a backup with the
help of temporary block snapshot (with the help of qemu's API which is
used in the newly created libvirt's backup API). If guest is shutdowned
I want to continue to backup so I don't kill the process and domain is
in shutdown state. Later when backup is finished I want to destroy qemu
process. So I check if it is in shutdowned state and destroy it if it
is. Now if instead of shutdown domain got fake reboot then I can destroy
process in the middle of fake reboot process.

After shutdown event we also get stop event and now as domain state is
running it will be transitioned to paused state and back to running
later. Though this is not critical for the described case I guess it is
better not to leak these details to user too. So let's leave domain in
running state on stop event if fake reboot is in process.

Reconnection code handles this patch without modification. It detects
that qemu is not running due to shutdown and then calls qemuProcessShutdownOrReboot
which reboots as fake reboot flag is set.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-12-24 09:22:40 +03:00
..
EVENTHANDLERS.txt qemu/doc: Fix function name for handling events 2017-06-13 09:43:42 +02:00
libvirtd_qemu.aug qemu: keep capabilities when running QEMU as root 2019-12-11 16:01:20 +00:00
Makefile.inc.am configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
MIGRATION.txt doc: fix writing of QEMU 2017-03-08 17:33:07 +01:00
qemu_agent.c use g_ascii_isprint instead of c_isprint from gnulib 2019-12-10 13:49:24 +01:00
qemu_agent.h Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
qemu_alias.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_alias.h qemu: add dbus-vmstate 2019-09-06 12:47:47 +02:00
qemu_backup.c qemu: backup: Merge bitmaps accross the backing chain 2019-12-13 13:22:55 +01:00
qemu_backup.h qemu: backup: Export qemuBackupDiskPrepareOneBitmapsChain for tests 2019-12-13 13:22:55 +01:00
qemu_block.c qemu: Generate command line of NVMe disks 2019-12-17 10:04:44 +01:00
qemu_block.h qemu: block: Introduce qemuBlockNamedNodeDataGetBitmapByName 2019-12-13 13:22:55 +01:00
qemu_blockjob.c qemu: block: use the delete flag to delete snapshot images if requested 2019-12-11 08:40:18 +01:00
qemu_blockjob.h qemu: block: propagate the delete flag to where it can actually be used 2019-12-11 08:40:18 +01:00
qemu_capabilities.c qemu: store the emulator name in the capabilities XML 2019-12-23 16:39:38 +00:00
qemu_capabilities.h qemu: add qemu caps constructor which takes binary name 2019-12-23 16:39:36 +00:00
qemu_capspriv.h qemu: add explicit flag to skip qemu caps invalidation 2019-12-23 16:39:20 +00:00
qemu_cgroup.c qemu: Allow NVMe disk in CGroups 2019-12-17 10:04:44 +01:00
qemu_cgroup.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
qemu_checkpoint.c qemu: monitor: Add 'granularity' parameter for block-dirty-bitmap-add 2019-12-13 13:22:55 +01:00
qemu_checkpoint.h qemu: drop virCapsPtr param & vars from many APIs 2019-12-09 10:17:27 +00:00
qemu_command.c qemu: handle unassigned PCI hostdevs in command line 2019-12-18 13:08:28 -05:00
qemu_command.h qemu: command: move sound codec validation to qemu_domain.c 2019-12-16 18:12:40 -05:00
qemu_conf.c qemu: Don't check the output of virGetUserRuntimeDirectory() 2019-12-20 09:38:43 +01:00
qemu_conf.h qemu: keep capabilities when running QEMU as root 2019-12-11 16:01:20 +00:00
qemu_dbus.c qemu: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:57 +02:00
qemu_dbus.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC instead of VIR_DEFINE_AUTOPTR_FUNC 2019-10-16 12:06:43 +02:00
qemu_domain_address.c Introducing new address type='unassigned' for PCI hostdevs 2019-12-18 13:08:27 -05:00
qemu_domain_address.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_domain.c Introducing new address type='unassigned' for PCI hostdevs 2019-12-18 13:08:27 -05:00
qemu_domain.h qemu: hide details of fake reboot 2019-12-24 09:22:40 +03:00
qemu_driver.c qemu: Don't leak hostcpu or hostnuma on driver cleanup 2019-12-18 14:28:48 +01:00
qemu_driver.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_extdevice.c Use g_autofree instead of VIR_AUTOFREE 2019-10-16 12:06:43 +02:00
qemu_extdevice.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
qemu_firmware.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_firmware.h Remove virautoclean.h 2019-10-16 12:06:44 +02:00
qemu_hostdev.c qemu_hotplug: Prepare NVMe disks on hotplug 2019-12-17 10:04:44 +01:00
qemu_hostdev.h qemu_hotplug: Prepare NVMe disks on hotplug 2019-12-17 10:04:44 +01:00
qemu_hotplug.c qemu: Allow forcing VFIO when computing memlock limit 2019-12-17 10:04:44 +01:00
qemu_hotplug.h qemu_hotplug.c: adding qemuDomainGetUnplugTimeout 2019-11-13 15:03:40 -05:00
qemu_interface.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_interface.h qemu-process: prepare slirp-helper 2019-09-06 12:47:47 +02:00
qemu_interop_config.c qemu: Don't check the output of virGetUserDirectory() 2019-12-20 09:38:43 +01:00
qemu_interop_config.h qemu: generalize qemuFetchConfigs 2019-09-24 12:17:10 -04:00
qemu_migration_cookie.c conf: drop virCapsPtr param from domain parse APIs 2019-12-09 10:17:27 +00:00
qemu_migration_cookie.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_migration_params.c qemu: Implement VIR_MIGRATE_PARAM_TLS_DESTINATION 2019-12-09 10:11:58 +01:00
qemu_migration_params.h Remove virautoclean.h 2019-10-16 12:06:44 +02:00
qemu_migration_paramspriv.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_migration.c conf: Format and parse NVMe type disk 2019-12-17 10:04:43 +01:00
qemu_migration.h qemu: Implement VIR_MIGRATE_PARAM_TLS_DESTINATION 2019-12-09 10:11:58 +01:00
qemu_monitor_json.c qemu: monitor: Add 'granularity' parameter for block-dirty-bitmap-add 2019-12-13 13:22:55 +01:00
qemu_monitor_json.h qemu: monitor: Add 'granularity' parameter for block-dirty-bitmap-add 2019-12-13 13:22:55 +01:00
qemu_monitor_priv.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_monitor_text.c qemu: use g_autofree instead of VIR_FREE in qemuMonitorTextCreateSnapshot() 2019-12-17 10:49:30 -05:00
qemu_monitor_text.h qemu: Remove qemuMonitorTextSetCPU 2019-06-20 15:59:19 +02:00
qemu_monitor.c qemu: monitor: Add 'granularity' parameter for block-dirty-bitmap-add 2019-12-13 13:22:55 +01:00
qemu_monitor.h qemu: monitor: Add 'granularity' parameter for block-dirty-bitmap-add 2019-12-13 13:22:55 +01:00
qemu_process.c qemu: hide details of fake reboot 2019-12-24 09:22:40 +03:00
qemu_process.h qemu: fix build with musl libc 2019-10-17 10:54:32 +02:00
qemu_processpriv.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_qapi.c use g_ascii_isalpha instead of c_isalpha from gnulib 2019-12-10 13:49:24 +01:00
qemu_qapi.h src/qemu: use #pragma once in headers 2019-06-19 17:12:30 +02:00
qemu_security.c security: Pass @migrated to virSecurityManagerSetAllLabel 2019-10-14 17:14:13 +02:00
qemu_security.h security: Pass @migrated to virSecurityManagerSetAllLabel 2019-10-14 17:14:13 +02:00
qemu_slirp.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_slirp.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC instead of VIR_DEFINE_AUTOPTR_FUNC 2019-10-16 12:06:43 +02:00
qemu_tpm.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_tpm.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
qemu_vhost_user_gpu.c qemu: gpu: Sanitize error values in qemuVhostUserGPUGetPid 2019-11-14 12:42:09 +01:00
qemu_vhost_user_gpu.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
qemu_vhost_user.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
qemu_vhost_user.h Remove virautoclean.h 2019-10-16 12:06:44 +02:00
qemu.conf qemu: keep capabilities when running QEMU as root 2019-12-11 16:01:20 +00:00
test_libvirtd_qemu.aug.in qemu: keep capabilities when running QEMU as root 2019-12-11 16:01:20 +00:00
THREADS.txt qemu: update threading info about domain object refs 2019-09-09 13:01:09 +02:00
virtqemud.init.in configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtqemud.service.in qemu: introduce virtqemud daemon 2019-08-09 14:06:31 +01:00