You need to sign in or sign up before continuing.
提交 8f2a6bac 编写于 作者: M Marc-André Lureau 提交者: Michal Privoznik

qemu-migration: prevent migration if slirp cannot be migrated

Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 8f8bba11
......@@ -39,6 +39,7 @@
#include "qemu_hotplug.h"
#include "qemu_blockjob.h"
#include "qemu_security.h"
#include "qemu_slirp.h"
#include "qemu_block.h"
#include "domain_audit.h"
......@@ -1141,6 +1142,17 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
return false;
}
for (i = 0; i < vm->def->nnets; i++) {
virDomainNetDefPtr net = vm->def->nets[i];
qemuSlirpPtr slirp = QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp;
if (slirp && !qemuSlirpHasFeature(slirp, QEMU_SLIRP_FEATURE_MIGRATE)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("a slirp-helper cannot be migrated"));
return false;
}
}
/* following checks don't make sense for offline migration */
if (!(flags & VIR_MIGRATE_OFFLINE)) {
if (qemuProcessAutoDestroyActive(driver, vm)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册