O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

To perform an offline migration using the virsh command, run the following:

  1. Make sure that we have a running KVM instance:
root@kvm1:~# virsh list --all Id  Name              State---------------------------------------------------- 26  kvm_no_sharedfs   runningroot@kvm1:~#
  1. Migrate the instance using the offline mode. If this operation errors out, please consult the There's more... section of the Online migration using the virsh command recipe for troubleshooting tips:
root@kvm1:~# virsh migrate --offline --persistent kvm_no_sharedfs qemu+ssh://kvm2/systemroot@kvm1:~#
  1. Unlike the live migration, the source instance is still running, and the destination instance is stopped:
root@kvm1:~# virsh list --all Id    Name              State---------------------------------------------------- ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required