[pve-devel] qemu-server : spice seamless migration

Alexandre Derumier aderumier at odiso.com
Mon Jul 22 06:54:27 CEST 2013

This add spice seamless migration support.

How it's works:

just before begin the migration, we use qmp command :


Remote viewer will open a new standby connection to the target vm.
When the migration is complete, remote-viwer switch between the 2 connections.
(Before shutting down the source vm, we need to be sure that the client has been switched, with the query-spice command, migrated value)

- Fixme:

1)remote-viewer will resend same password to the targetvm, so we need to set the last spice password when we start the target vm.
Is it safe to store on hosts the last spice password used ?

2)with tls, ca= option seem to not be keep by the client.
workaround : cp pve-root-ca.pem to client .spicec/spice_truststore.pem.

Maybe is is possible to send to the client the ca, and a new password ticket

in spicelib, server/reds.c

/* returns FALSE if info is invalid */
static int reds_set_migration_dest_info(const char* dest,
                                        int port, int secure_port,
                                        const char* cert_subject)
    RedsMigSpice *spice_migration = NULL;

    if ((port == -1 && secure_port == -1) || !dest) {
        return FALSE;

    spice_migration = spice_new0(RedsMigSpice, 1);
    spice_migration->port = port;
    spice_migration->sport = secure_port;
    spice_migration->host = spice_strdup(dest);
    if (cert_subject) {
        spice_migration->cert_subject = spice_strdup(cert_subject);

    reds->mig_spice = spice_migration;

    return TRUE;

More information about the pve-devel mailing list