提交 70f0bbe8 编写于 作者: J Ján Tomko 提交者: Michal Privoznik

storage: fix logical volume cloning

Commit 258e06c8 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
上级 5efacd78
...@@ -708,6 +708,8 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, ...@@ -708,6 +708,8 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
return -1; return -1;
} }
vol->type = VIR_STORAGE_VOL_BLOCK;
if (vol->target.path != NULL) { if (vol->target.path != NULL) {
/* A target path passed to CreateVol has no meaning */ /* A target path passed to CreateVol has no meaning */
VIR_FREE(vol->target.path); VIR_FREE(vol->target.path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册