提交 eee3b4b9 编写于 作者: P Peter Krempa

qemu: snapshot: Skip empty drives with internal snapshots

The code that validates whether an internal snapshot is possible would
reject an empty but not-readonly drive. Since floppies can have this
property, add a check for emptiness.
上级 7526a715
......@@ -13825,7 +13825,8 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
case VIR_DOMAIN_SNAPSHOT_LOCATION_NONE:
/* Remember seeing a disk that has snapshot disabled */
if (!dom_disk->src->readonly)
if (!virStorageSourceIsEmpty(dom_disk->src) &&
!dom_disk->src->readonly)
forbid_internal = true;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册