Based on suggestion from Eric [1], because it might not get cleaned up
before the release, so to avoid potential errors.
[1] https://www.redhat.com/archives/libvir-list/2014-April/msg00929.html
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
disk = vm->def->disks[i - 1];
const char *path = virDomainDiskGetSource(disk);
enum virStorageFileFormat format = virDomainDiskGetFormat(disk);
+ enum virStorageType type = virStorageSourceGetActualType(&disk->src);
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 &&
+ if (type != VIR_STORAGE_TYPE_NETWORK &&
+ format >= VIR_STORAGE_FILE_NONE &&
format < VIR_STORAGE_FILE_BACKING &&
virFileExists(path))
continue;
if (qemuAssignDeviceAliases(vm->def, priv->qemuCaps) < 0)
goto cleanup;
- if (qemuDomainCheckDiskPresence(driver, vm,
- flags & VIR_QEMU_PROCESS_START_COLD) < 0)
- goto cleanup;
-
-
/* Get the advisory nodeset from numad if 'placement' of
* either <vcpu> or <numatune> is 'auto'.
*/
goto cleanup;
}
+ if (qemuDomainCheckDiskPresence(driver, vm,
+ flags & VIR_QEMU_PROCESS_START_COLD) < 0)
+ goto cleanup;
+
if (VIR_ALLOC(priv->monConfig) < 0)
goto cleanup;