KVM snapshots/migration - issues with SSH


#1

Hi,

We are trying to deploy KVM snapshotting/reverting for workload checkpointing/migration in our network. We are seeing the following issue:

I am running 2 VMs - SuSe Linux and Ubuntu, on a Intel Nehalem server that is running Ubuntu 12.04. I am using the latest version of KVM that come by default with this distribution. I followed the instructions here: help.ubuntu.com/community/KVM/Installation

I am also using the default user-mode networking for both the VMs.

Scenario 1: Snapshot creation/restore:

  • Before creating a snapshot, I have a xterm window open, from which I have opened a ssh connection to a remote machine.
  • when I create the snapshot, the VM freezes/pauses. Once the snapshot is created, the ssh connection/window is active.
  • Later on, when I revert to the earlier snapshot, the xterm is restored, but the ssh connection is broken. The terminal is inactive, and I have to only kill the xterm and open a new ssh connection.
  • I tried increasing the ClientAliveInterval and ServerAliveInterval values on both the client and server’s /etc/ssh_config and /etc/sshd_config; the server thinks the client is still connected (if I monitor with “watch who” on the server), but the client ssh connection is irrecoverably lost.

Scenario 2: VM Migration:

  • Configuration is the same as above. I did a migration of one of the VMs to another server with identical configurations.
  • The ssh connection is immediately terminated when the VM is migrated to the destination host. I have to reopen the ssh connection.

Any comments/thoughts about this? I really would like to retain ssh connections across snapshot creation/restore and VM migration. This is critical to our environment.

Thanks
Rajeev