<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>12.12. Hyper-V 仮想マシンのテンプレートへの変換</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Admin_Guide-4.1.0-ja-JP-1-" /><script type="text/javascript" src="../../../../../toc.js"></script><script type="text/javascript">
              addID('Apache_CloudStack');
              
	      addID('Apache_CloudStack.4.1.0');
              
              addID('Apache_CloudStack.4.1.0.books');
	      addID('Apache_CloudStack.4.1.0.Admin_Guide');
              </script><link rel="home" href="index.html" title="CloudStack 管理者ガイド" /><link rel="up" href="working-with-templates.html" title="第12章 テンプレートと動作" /><link rel="prev" href="import-ami.html" title="12.11. AMI のインポート" /><link rel="next" href="add-password-management-to-templates.html" title="12.13. テンプレートへのパスワード管理機能の追加" /></head><body class="toc_embeded "><div id="tocdiv" class="toc"><iframe id="tocframe" class="toc" src="../../../../toc.html">This is an iframe, to view it upgrade your browser or enable iframe display.</iframe></div><p id="title"><a class="left" href="http://cloudstack.apache.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://cloudstack.apache.org/docs"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="import-ami.html"><strong>戻る</strong></a></li><li class="next"><a accesskey="n" href="add-password-management-to-templates.html"><strong>次へ</strong></a></li></ul><div xml:lang="ja-JP" class="section" id="convert-hyperv-vm-to-template" lang="ja-JP"><div class="titlepage"><div><div><h2 class="title" id="convert-hyperv-vm-to-template">12.12. Hyper-V 仮想マシンのテンプレートへの変換</h2></div></div></div><div class="para">
		Hyper-V 仮想マシンを XenServer 互換の CloudStack テンプレートに変換するには、NFS VHD ストレージリポジトリがアタッチされたスタンドアロンの XenServer ホストが必要です。CloudStack と組み合わせて使用しているバージョンであれば XenServer のバージョンはどれでもかまいませんが、XenCenter 5.6 FP1 または SP2(5.6 と後方互換性があります)を使用してください。また、NFS ISO ストレージリポジトリがアタッチされていると役に立つ場合があります。
	</div><div class="para">
		Linux 仮想マシンでは、仮想マシンを XenServer で使用する前に、Hyper-V で準備する必要がある場合があります。 Hyper-V で引き続き仮想マシンを使用する場合は、仮想マシンを複製して、その複製で作業します。Hyper-V 統合コンポーネントをアンインストールして、/etc/fstab でデバイス名を参照していないか確認します。
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				linux_ic/drivers/dist ディレクトリから、make uninstall を実行します(ここで、linux_ic は、コピーされた Hyper-V 統合コンポーネントファイルのパスです)。
			</div></li><li class="listitem"><div class="para">
				元の initrd を/boot/のバックアップから復元します(バックアップの名前は*.backup0 です)。
			</div></li><li class="listitem"><div class="para">
				「hdX=noprobe」のエントリを/boot/grub/menu.lst から削除します。
			</div></li><li class="listitem"><div class="para">
				Check /etc/fstab for any partitions mounted by device name. Change those entries (if any) to mount by LABEL or UUID. You can get that information with the blkid command.
			</div></li></ol></div><div class="para">
		次に、仮想マシンが Hyper-V で動作していないことを確認してから、VHD を XenServer に取り込みます。これを行うには、 2 つの方法があります。
	</div><div class="para">
		オプション 1
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				XenCenter を使用して VHD をインポートします。XenCenter で、[ツール]&gt;[仮想アプライアンスツール]&gt;[ディスクイメージインポート]の順に選択します。
			</div></li><li class="listitem"><div class="para">
				[VHD]を選択し、[次へ]をクリックします。
			</div></li><li class="listitem"><div class="para">
				仮想マシンに名前を付け、[ストレージ]ページで NFS VHD ストレージリポジトリを選択し、オペレーティングシステム\nの修復機能を有効にして、NFS ISO ストレージリポジトリを選択します。
			</div></li><li class="listitem"><div class="para">
				[次へ]をクリックし、[完了]をクリックします。これで、仮想マシンが作成されます。
			</div></li></ol></div><div class="para">
		Option two:
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				XenConvert を実行して、[変換元]ボックスの一覧で[VHD]を選択し、[変換先]ボックスの一覧で[XenServer]を選択します。[次へ]をクリックします。
			</div></li><li class="listitem"><div class="para">
				[VHD]を選択し、[次へ]をクリックします。
			</div></li><li class="listitem"><div class="para">
				XenServer ホストの情報を入力し、[次へ]をクリックします。
			</div></li><li class="listitem"><div class="para">
				Name the VM, then click Next, then Convert. A VM should be created.
			</div></li></ol></div><div class="para">
		Hyper-V VHD から仮想マシンを作成したら、次の手順に従って、その仮想マシンを準備します。
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				仮想マシンを起動して、Hyper-V 統合サービスをアンインストールし、再起動します。
			</div></li><li class="listitem"><div class="para">
				XenServer Tools をインストールし、再起動します。
			</div></li><li class="listitem"><div class="para">
				Prepare the VM as desired. For example, run sysprep on Windows VMs. See <a class="xref" href="create-windows-template.html">「Windows テンプレートの作成」</a>.
			</div></li></ol></div><div class="para">
		上のオプションのどちらでも、HVM モードの仮想マシンが作成されます。Windows 仮想マシンの場合は問題はありません が、Linux 仮想マシンは適切に動作しない場合があります。Linux 仮想マシンを PV モードに変換するには、追加の手順を 実行する必要があり、その手順はディストリビューションごとに異なります。
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				仮想マシンをシャットダウンして、VHD を NFS ストレージから Web サーバーにコピーします。たとえば、NFS 共有を Web サーバーにマウントしてコピーするか、XenServer ホストから sftp または scp を使用して、Web サーバーにアップロードします。
			</div></li><li class="listitem"><div class="para">
				CloudStack で次の値を使用して、新しいテンプレートを作成します。
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<span class="bold bold"><strong>URL :</strong></span> VHD の URL を指定します。
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>OS Type :</strong></span> 適切なオペレーティングシステムを使用します。PV モードの CentOS の場合は、[Other PV(32-bit)] または[Other PV(64-bit)]を選択します。この選択肢は、XenServer でのみ使用できます。
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Hypervisor :</strong></span> [XenServer]を選択します。
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Format :</strong></span> [VHD]を選択します。
					</div></li></ul></div></li></ol></div><div class="para">
		テンプレートが作成され、そのテンプレートからインスタンスを作成できます。
	</div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="import-ami.html"><strong>戻る</strong>12.11. AMI のインポート</a></li><li class="up"><a accesskey="u" href="#"><strong>上に戻る</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>ホーム</strong></a></li><li class="next"><a accesskey="n" href="add-password-management-to-templates.html"><strong>次へ</strong>12.13. テンプレートへのパスワード管理機能の追加</a></li></ul></body></html>
