From: Peter Krempa Date: Mon, 5 Sep 2016 13:50:18 +0000 (+0200) Subject: qemu: domain: Clear startup policy for dropped removable media X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6e19cc59a6a7dd1a31e1b8d8e645163ff8fb6827;p=libvirt.git 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. --- 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,