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
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
qemu_agent.c use g_ascii_isprint instead of c_isprint from gnulib 2019-12-10 13:49:24 +01:00
qemu_agent.h
qemu_alias.c
qemu_alias.h
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
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_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_dbus.h
qemu_domain_address.c Introducing new address type='unassigned' for PCI hostdevs 2019-12-18 13:08:27 -05:00
qemu_domain_address.h
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
qemu_extdevice.c
qemu_extdevice.h
qemu_firmware.c
qemu_firmware.h
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_interface.c
qemu_interface.h
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_migration_cookie.c
qemu_migration_cookie.h
qemu_migration_params.c
qemu_migration_params.h
qemu_migration_paramspriv.h
qemu_migration.c conf: Format and parse NVMe type disk 2019-12-17 10:04:43 +01:00
qemu_migration.h
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
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_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_processpriv.h
qemu_qapi.c
qemu_qapi.h
qemu_security.c
qemu_security.h
qemu_slirp.c
qemu_slirp.h
qemu_tpm.c
qemu_tpm.h
qemu_vhost_user_gpu.c
qemu_vhost_user_gpu.h
qemu_vhost_user.c
qemu_vhost_user.h
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
virtqemud.init.in configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtqemud.service.in