mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-13 17:49:16 +00:00
6c6d93bc62
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> |
||
---|---|---|
.. | ||
EVENTHANDLERS.txt | ||
libvirtd_qemu.aug | ||
Makefile.inc.am | ||
MIGRATION.txt | ||
qemu_agent.c | ||
qemu_agent.h | ||
qemu_alias.c | ||
qemu_alias.h | ||
qemu_backup.c | ||
qemu_backup.h | ||
qemu_block.c | ||
qemu_block.h | ||
qemu_blockjob.c | ||
qemu_blockjob.h | ||
qemu_capabilities.c | ||
qemu_capabilities.h | ||
qemu_capspriv.h | ||
qemu_cgroup.c | ||
qemu_cgroup.h | ||
qemu_checkpoint.c | ||
qemu_checkpoint.h | ||
qemu_command.c | ||
qemu_command.h | ||
qemu_conf.c | ||
qemu_conf.h | ||
qemu_dbus.c | ||
qemu_dbus.h | ||
qemu_domain_address.c | ||
qemu_domain_address.h | ||
qemu_domain.c | ||
qemu_domain.h | ||
qemu_driver.c | ||
qemu_driver.h | ||
qemu_extdevice.c | ||
qemu_extdevice.h | ||
qemu_firmware.c | ||
qemu_firmware.h | ||
qemu_hostdev.c | ||
qemu_hostdev.h | ||
qemu_hotplug.c | ||
qemu_hotplug.h | ||
qemu_interface.c | ||
qemu_interface.h | ||
qemu_interop_config.c | ||
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 | ||
qemu_migration.h | ||
qemu_monitor_json.c | ||
qemu_monitor_json.h | ||
qemu_monitor_priv.h | ||
qemu_monitor_text.c | ||
qemu_monitor_text.h | ||
qemu_monitor.c | ||
qemu_monitor.h | ||
qemu_process.c | ||
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 | ||
test_libvirtd_qemu.aug.in | ||
THREADS.txt | ||
virtqemud.init.in | ||
virtqemud.service.in |