qemu: add migration incoming defer support

qemu commandline supports -incoming defer
and qmp supports migrate-incoming uri.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao
2019-06-14 00:24:26 -07:00
parent 27363b1aca
commit f695ddf8f3
4 changed files with 39 additions and 0 deletions

View File

@@ -1397,6 +1397,8 @@ const (
MigrationFD = 1
// MigrationExec is the migration incoming type based on commands.
MigrationExec = 2
// MigrationDefer is the defer incoming type
MigrationDefer = 3
)
// Incoming controls migration source preparation
@@ -1779,6 +1781,8 @@ func (config *Config) appendIncoming() {
case MigrationFD:
chFDs := config.appendFDs([]*os.File{config.Incoming.FD})
uri = fmt.Sprintf("fd:%d", chFDs[0])
case MigrationDefer:
uri = "defer"
default:
return
}