提交 5a990e0b 编写于 作者: P Peter Krempa

qemu: migration: Reject migration of an empty disk

If you specify disks to migrate it would be possible to select an empty
drive for migration. Reject such config.
上级 03766247
......@@ -515,9 +515,10 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
if (!qemuMigrateDisk(disk, nmigrate_disks, migrate_disks))
continue;
if (disk->src->readonly) {
if (disk->src->readonly || virStorageSourceIsEmpty(disk->src)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("Cannot migrate read-only disk %s"), disk->dst);
_("Cannot migrate empty or read-only disk %s"),
disk->dst);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册