mirror of https://gitee.com/openkylin/libvirt.git
storage: fix logical volume cloning
Commit 258e06c
removed setting of the volume type to
VIR_STORAGE_VOL_BLOCK, which leads to failures in
storageVolumeCreateXMLFrom.
The type (and target.format) of the volume was set to zero. In
virStorageBackendGetBuildVolFromFunction, this gets interpreted as
VIR_STORAGE_FILE_NONE and the qemu-img tool is called with unknown
"none" format.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=879780
This commit is contained in:
parent
5efacd7813
commit
70f0bbe8e0
|
@ -708,6 +708,8 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
|
|||
return -1;
|
||||
}
|
||||
|
||||
vol->type = VIR_STORAGE_VOL_BLOCK;
|
||||
|
||||
if (vol->target.path != NULL) {
|
||||
/* A target path passed to CreateVol has no meaning */
|
||||
VIR_FREE(vol->target.path);
|
||||
|
|
Loading…
Reference in New Issue