mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Reverse condition in qemuDomainCheckDiskPresence
With current code, we pass true iff domain is cold booting. However, if disk is inaccessible and startupPolicy for that disk is set to 'requisite' we have to fail iff cold booting.
This commit is contained in:
parent
cad8054ece
commit
823a27c628
@ -1703,7 +1703,7 @@ qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
||||
int
|
||||
qemuDomainCheckDiskPresence(struct qemud_driver *driver,
|
||||
virDomainObjPtr vm,
|
||||
bool start_with_state)
|
||||
bool cold_boot)
|
||||
{
|
||||
int ret = -1;
|
||||
int i;
|
||||
@ -1738,7 +1738,7 @@ qemuDomainCheckDiskPresence(struct qemud_driver *driver,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_STARTUP_POLICY_REQUISITE:
|
||||
if (!start_with_state) {
|
||||
if (cold_boot) {
|
||||
virReportSystemError(errno,
|
||||
_("cannot access file '%s'"),
|
||||
disk->src);
|
||||
|
Loading…
x
Reference in New Issue
Block a user