diff options
author | Orit Wasserman <owasserm@redhat.com> | 2012-08-06 21:42:48 +0300 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2012-08-08 13:51:11 +0200 |
commit | 00458433242dbfb6348d8e0bb6d356603d3e0067 (patch) | |
tree | 445d97d2195dfa0658dd41d5e03d9bfa33ce54fb /migration.c | |
parent | bbf6da32b5bd32018069e4eaeda59a02855903f2 (diff) |
Add migrate-set-capabilities
The management can enable/disable a capability for the next migration by using
migrate-set-capabilities QMP command.
The user can use migrate_set_capability HMP command.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/migration.c b/migration.c index fb620ac0f8..ba81df7b66 100644 --- a/migration.c +++ b/migration.c @@ -190,6 +190,22 @@ MigrationInfo *qmp_query_migrate(Error **errp) return info; } +void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params, + Error **errp) +{ + MigrationState *s = migrate_get_current(); + MigrationCapabilityStatusList *cap; + + if (s->state == MIG_STATE_ACTIVE) { + error_set(errp, QERR_MIGRATION_ACTIVE); + return; + } + + for (cap = params; cap; cap = cap->next) { + s->enabled_capabilities[cap->value->capability] = cap->value->state; + } +} + /* shared migration helpers */ static int migrate_fd_cleanup(MigrationState *s) |