if (!(mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
cookiein, cookieinlen, cookie_flags)))
- goto endjob;
+ goto error;
if (flags & VIR_MIGRATE_OFFLINE) {
if (retcode == 0 &&
* earlier than monitor EOF handler got a chance to process the error
*/
qemuDomainCheckMonitor(driver, vm, VIR_ASYNC_JOB_MIGRATION_IN);
- goto endjob;
+ goto error;
}
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("guest unexpectedly quit"));
qemuMigrationDstErrorReport(driver, vm->def->name);
- goto endjob;
+ goto error;
}
if (qemuMigrationDstVPAssociatePortProfiles(vm->def) < 0)
- goto endjob;
+ goto error;
if (mig->network && qemuMigrationDstOPDRelocate(driver, vm, mig) < 0)
VIR_WARN("unable to provide network data for relocation");
if (qemuMigrationDstStopNBDServer(driver, vm, mig) < 0)
- goto endjob;
+ goto error;
if (qemuRefreshVirtioChannelState(driver, vm,
VIR_ASYNC_JOB_MIGRATION_IN) < 0)
- goto endjob;
+ goto error;
if (qemuConnectAgent(driver, vm) < 0)
- goto endjob;
+ goto error;
if (flags & VIR_MIGRATE_PERSIST_DEST) {
if (qemuMigrationDstPersist(driver, vm, mig, !v3proto) < 0) {
* to restart during confirm() step, so we kill it off now.
*/
if (v3proto)
- goto endjob;
+ goto error;
}
}
* original domain on the source host is already gone.
*/
if (v3proto)
- goto endjob;
+ goto error;
}
/* Now that the state data was transferred we can refresh the actual state
/* Similarly to the case above v2 protocol will not be able to recover
* from this. Let's ignore this and perhaps stuff will not break. */
if (v3proto)
- goto endjob;
+ goto error;
}
if (priv->job.current->status == VIR_DOMAIN_JOB_STATUS_POSTCOPY)
* things up.
*/
if (v3proto)
- goto endjob;
+ goto error;
}
if (inPostCopy)
if (qemuMigrationDstWaitForCompletion(driver, vm,
VIR_ASYNC_JOB_MIGRATION_IN,
false) < 0) {
- goto endjob;
+ goto error;
}
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
virDomainObjSetState(vm,
virReportError(VIR_ERR_MIGRATE_FINISH_OK, NULL);
return dom;
- endjob:
+ error:
if (virDomainObjIsActive(vm)) {
if (doKill) {
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED,