提交 6e19cc59 编写于 作者: P Peter Krempa

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.
上级 2692304c
...@@ -4341,6 +4341,8 @@ qemuDomainCheckRemoveOptionalDisk(virQEMUDriverPtr driver, ...@@ -4341,6 +4341,8 @@ qemuDomainCheckRemoveOptionalDisk(virQEMUDriverPtr driver,
disk->info.alias, disk->info.alias,
VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START); VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START);
ignore_value(virDomainDiskSetSource(disk, NULL)); ignore_value(virDomainDiskSetSource(disk, NULL));
/* keeping the old startup policy would be invalid for new images */
disk->startupPolicy = VIR_DOMAIN_STARTUP_POLICY_DEFAULT;
} else { } else {
event = virDomainEventDiskChangeNewFromObj(vm, src, NULL, event = virDomainEventDiskChangeNewFromObj(vm, src, NULL,
disk->info.alias, disk->info.alias,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册