mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu-migration: prevent migration if slirp cannot be migrated
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8f8bba115d
commit
8f2a6bac55
@ -39,6 +39,7 @@
|
|||||||
#include "qemu_hotplug.h"
|
#include "qemu_hotplug.h"
|
||||||
#include "qemu_blockjob.h"
|
#include "qemu_blockjob.h"
|
||||||
#include "qemu_security.h"
|
#include "qemu_security.h"
|
||||||
|
#include "qemu_slirp.h"
|
||||||
#include "qemu_block.h"
|
#include "qemu_block.h"
|
||||||
|
|
||||||
#include "domain_audit.h"
|
#include "domain_audit.h"
|
||||||
@ -1141,6 +1142,17 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
|
|||||||
return false;
|
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 */
|
/* following checks don't make sense for offline migration */
|
||||||
if (!(flags & VIR_MIGRATE_OFFLINE)) {
|
if (!(flags & VIR_MIGRATE_OFFLINE)) {
|
||||||
if (qemuProcessAutoDestroyActive(driver, vm)) {
|
if (qemuProcessAutoDestroyActive(driver, vm)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user