Hyper-V Live Migration

こんにちはAaron です。

最近サーバーの友人たちから「Hyper-VのLive Migrationを試したいけど、どうすればいいのかな?」とよく聞かれています。そこで、このブログでその方法をみなさんにもお知らせしたいと思います。

必要なもの:

  • Windows 7 とHyper-V 対応マシン2台(ノートでもデスクトップでも可能です)
  • iSCSI Storageデバイスまたはマシンもう1台*

*正式に対応しているものは以下のリスト:

https://www.windowsservercatalog.com/results.aspx?&bCatID=1511&cpID=0&avc=10&ava=0&avq=0&OR=1&PGS=25&ready=0

https://www.windowsservercatalog.com/results.aspx?&bCatID=1354&cpID=0&avc=10&ava=0&avq=0&OR=1&PGS=25&ready=0

これはiSCSIまたはFibre Channel arrayとなります。

「アーロン、そんなハードウェア持ってないよ!」という方もいらっしゃると思います。以下のものを試してみる価値があるかもしれません。

私はこれらを試したわけではないので、動作は保証できません。おそらく「動くだろう」、というリストです。ソフトのiSCSI Targetを使うとパフォーマンスなどには影響あるかもしれませんが、実際のところはよくわかりません。

作成手順ですが、Server 2008 R2はServer 2008 に似ていますので、このブログをご覧ください。

https://blogs.technet.com/ryukiy/archive/2009/01/20/step-by-step-hyper-v-part-1.aspx

環境ができましたらR2の新機能をいくつか追加します。フェールオーバークラスタ管理ツールにて「Enable Cluster Shared Volumes」(CSV)を実行し、開いている共有ストレージを追加することが必要です。

Live Migrationにクラスター用の共有ディスク(LUN)が1つとCSVが1つあれば試すことができます。

フェールオーバークラスター管理ツールに「Live migrate this virtual machine to another node」というメニューがあります。マシンから仮想マシンに”ping -t”をかけながら、マイグレーションすると、タイムアウトが起こらないはずです。

クライアントノードを使っているお客様には裏でLive Migrationが起こっていても全く気づかないようにマイグレーションできることを目指しています。

英語:

I have been receiving questions from friends around Japan regarding Live Migration in Windows 7 and Hyper-V.  I just wanted to give you some pointers to help get you started on your way.

 

What you will need:

  • 2 Windows 7 Hyper-V capable machines
  • 1 iSCSI storage device

Here is a list of the officially supported devices

https://www.windowsservercatalog.com/results.aspx?&bCatID=1511&cpID=0&avc=10&ava=0&avq=0&OR=1&PGS=25&ready=0

https://www.windowsservercatalog.com/results.aspx?&bCatID=1354&cpID=0&avc=10&ava=0&avq=0&OR=1&PGS=25&ready=0

These are iSCSI Harware devices as well as Fibre Channel arrays.  “But Aaron! I don’t have that kind of hardware to do testing with!”  In that case you can try one of the software solutions listed below.

I have no stake in any of these products.  Your mileage may vary as network speed, and such will have a factor, but they all “should” work.

As setting up this environment in Server 2008 is very similar to Server 2008 R2, check out this set of blog posts for more information on how to get to the next step:

https://blogs.technet.com/ryukiy/archive/2009/01/20/step-by-step-hyper-v-part-1.aspx (Japanese)

To make the transition from Quick Migration to Live Migration you will need to enable Cluster Shared Volumes (CSV) in the Cluster Manager. 

To perform a live migration, you need to have a shared disk (LUN) and CSV enabled.  In the Failover Cluster manager you can select “Live migrate this virtual machine to another node”.  If you, for example, “ping –t” the virtual machine while migration is in progress you should not see any ping timeouts.

Live Migration was developed so that an end user will not know that in the background migration is happening.  They can and will continue to use the machine or application that is running on the server uninterrupted.