mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: don't check for backing chains for formats w/o snapshot support
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1019926 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868673 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
1445f34b62
commit
9556681388
@ -2268,8 +2268,18 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||
VIR_DEBUG("Checking for disk presence");
|
||||
for (i = vm->def->ndisks; i > 0; i--) {
|
||||
disk = vm->def->disks[i - 1];
|
||||
const char *path = virDomainDiskGetSource(disk);
|
||||
enum virStorageFileFormat format = virDomainDiskGetFormat(disk);
|
||||
|
||||
if (!virDomainDiskGetSource(disk))
|
||||
if (!path)
|
||||
continue;
|
||||
|
||||
/* There is no need to check the backing chain for disks
|
||||
* without backing support, the fact that the file exists is
|
||||
* more than enough */
|
||||
if (format >= VIR_STORAGE_FILE_NONE &&
|
||||
format < VIR_STORAGE_FILE_BACKING &&
|
||||
virFileExists(path))
|
||||
continue;
|
||||
|
||||
if (qemuDomainDetermineDiskChain(driver, vm, disk, false) >= 0 &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user