From 6e19cc59a6a7dd1a31e1b8d8e645163ff8fb6827 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 5 Sep 2016 15:50:18 +0200 Subject: [PATCH] qemu: domain: Clear startup policy for dropped removable media When a source image is dropped when missing due to startup policy the policy needs to be cleared since it was relevant only for the given storage source. New sources need to update it if needed. --- src/qemu/qemu_domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6c57ed2c62..fd79390a7a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4341,6 +4341,8 @@ qemuDomainCheckRemoveOptionalDisk(virQEMUDriverPtr driver, disk->info.alias, VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START); ignore_value(virDomainDiskSetSource(disk, NULL)); + /* keeping the old startup policy would be invalid for new images */ + disk->startupPolicy = VIR_DOMAIN_STARTUP_POLICY_DEFAULT; } else { event = virDomainEventDiskChangeNewFromObj(vm, src, NULL, disk->info.alias, -- GitLab