aboutsummaryrefslogtreecommitdiff
path: root/samples/client.c
diff options
context:
space:
mode:
authorWilliam Henderson <william.henderson@nutanix.com>2023-08-03 15:49:21 +0000
committerJohn Levon <john.levon@nutanix.com>2023-09-15 13:05:01 +0100
commitd6bb06b6689e280d62667d12b5a6c54cefcc3cba (patch)
treefd5d9454689fc6ce5a84c1ad612e04e54f6396cb /samples/client.c
parent71edb7b4dece0279331430998c0f5d09a3de2934 (diff)
downloadlibvfio-user-d6bb06b6689e280d62667d12b5a6c54cefcc3cba.zip
libvfio-user-d6bb06b6689e280d62667d12b5a6c54cefcc3cba.tar.gz
libvfio-user-d6bb06b6689e280d62667d12b5a6c54cefcc3cba.tar.bz2
fix: update sample to correctly start destination server
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r--samples/client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/samples/client.c b/samples/client.c
index 031201e..27382b8 100644
--- a/samples/client.c
+++ b/samples/client.c
@@ -998,7 +998,6 @@ migrate_to(char *old_sock_path, int *server_max_fds,
if (ret > 0) { /* child (destination server) */
char *_argv[] = {
path_to_server,
- (char *)"-r", // start in VFIO_USER_DEVICE_STATE_RESUMING
(char *)"-v",
sock_path,
NULL
@@ -1028,6 +1027,12 @@ migrate_to(char *old_sock_path, int *server_max_fds,
negotiate(sock, server_max_fds, server_max_data_xfer_size, pgsize);
+ device_state = VFIO_USER_DEVICE_STATE_RESUMING;
+ ret = set_migration_state(sock, device_state);
+ if (ret < 0) {
+ err(EXIT_FAILURE, "failed to set device state to resuming");
+ }
+
for (i = 0; i < nr_iters; i++) {
/* XXX write migration data */