mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: don't log error for missing optional storage sources on start
Because missing optional storage source is not error. The patch address only local files. Fixing other cases is a bit ugly. Below is example of error notice in log now: error: virStorageFileReportBrokenChain:427 : Cannot access storage file '/path/to/missing/optional/disk': No such file or directory Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
318d807a0b
commit
c541177314
@ -6119,7 +6119,15 @@ qemuProcessPrepareHostStorage(virQEMUDriverPtr driver,
|
||||
if (!blockdev)
|
||||
virStorageSourceBackingStoreClear(disk->src);
|
||||
|
||||
if (qemuDomainDetermineDiskChain(driver, vm, disk, true) >= 0)
|
||||
/*
|
||||
* Go to applying startup policy for optional disk with nonexistent
|
||||
* source file immediately as determining chain will surely fail
|
||||
* and we don't want noisy error notice in logs for this case.
|
||||
*/
|
||||
if (qemuDomainDiskIsMissingLocalOptional(disk) && cold_boot)
|
||||
VIR_INFO("optional disk '%s' source file is missing, "
|
||||
"skip checking disk chain", disk->dst);
|
||||
else if (qemuDomainDetermineDiskChain(driver, vm, disk, true) >= 0)
|
||||
continue;
|
||||
|
||||
if (qemuDomainCheckDiskStartupPolicy(driver, vm, idx, cold_boot) >= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user