diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index 4fab538fe0..481c540a6d 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1150,6 +1150,21 @@ void migrate_del_blocker(Error *reason) migration_blockers = g_slist_remove(migration_blockers, reason); } +int check_migratable(Object *obj, Error **err) +{ + DeviceClass *dc = DEVICE_GET_CLASS(obj); + if (only_migratable && dc->vmsd) { + if (dc->vmsd->unmigratable) { + error_setg(err, "Device %s is not migratable, but " + "--only-migratable was specified", + object_get_typename(obj)); + return -1; + } + } + + return 0; +} + void qmp_migrate_incoming(const char *uri, Error **errp) { Error *local_err = NULL; |