twitter 経由でいろいろと情報を教えていただくことができたのでまとめてみたいと思います。
以前、VM Role に日本語 OS の VHD をアップロードしようとした際に以下のエラーが発生しました。
Windows(R) Azure(TM) Upload Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Using temporary directory E:… Preparing VHD E:Jabaseimage.vhd…
Windows(R) Azure(TM) VHD Verification Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Attached E:Jabaseimage.vhd. Getting volume information for E:Jabaseimage.vhd… Detached E:Jabaseimage.vhd. Cannot find the VM Role Agent. Failed the verification tests. Cannot prepare VHD E:Jabaseimage.vhd.
|
この現象の回避方法になります。
■VM Role 用のイメージとしてアップできた VHD の整理
検証の結果がかなり煩雑になってきましたので一度整理したいと思います。
csupload を使用して、VHD をアップする環境は [Windows 7 Enterprise Edition x64 日本語版] を使用しています。
実行した端末 (Windows 7 EE x64) の [表示言語] が日本語が英語かによっても結果に差が出てきましたのでこの辺もケースわけします。
[表示言語 英語] は英語の言語パックをインストールして、コントロールパネルから [表示言語だけを English に変更] したものになります。
# その他の設定 (キーボード / 地域 / システムロケール] は日本語のままにしています。
アップロードの VHD にインストールしている OS は [Windows Server 2008 R2 Datacenter Edition] になります。
すべての OS で VM Role 用の統合コンポーネントをインストール済みです。
インストールしている OS の言語 / 言語パックをインストールしているかも結果に影響が出ていましたのでケースわけしています。
言語パックのインストールは、インストールのみで UI で表示する言語に関しては、変更はせずインストール時の状態としています。
# 言語パックなしは [インストールメディアの言語以外の言語パックがインストールされていない] という状態になります。
結果ですがcsupload 時に、[Cannot find the VM Role Agent] が発生した場合は NG としています。
アップロード用の [Preped ファイル] の作成ができた場合 ([Preparing: 0% complete…] のメッセージが表示) が OK となります。
[Windows 7 EE x64 日本語版 : 表示言語 日本語]
VHD の OS |
結果 |
日本語 OS : 言語パックなし |
NG |
日本語 OS : 英語言語パック |
NG |
英語 OS : 言語パックなし |
OK |
英語 OS : 日本語言語パック |
NG |
[Windows 7 EE x64 日本語版 : 表示言語 英語]
VHD の OS |
結果 |
日本語 OS : 言語パックなし |
OK |
日本語 OS : 英語言語パック |
OK |
英語 OS : 言語パックなし |
OK |
英語 OS : 日本語言語パック |
OK |
日本語版の Windows 7 Enterprise Edition x64 を使用した結果はこのようになりました。
表示言語 日本語の設定 (OS インストール時のデフォルト設定) では、[英語 OS : 言語パックなし] の環境のみ Preped ファイルの作成まで実行することができました。
表示言語 英語 の設定では用意した全パターンについて Preped ファイルの作成まで実行することができました。
次に [Windows 7 Enterprise Edition x64 英語語版] を使用して同様の検証を実施してみます。
[Windows 7 EE x64 英語版 : 表示言語 日本語]
VHD の OS |
結果 |
日本語 OS : 言語パックなし |
OK |
日本語 OS : 英語言語パック |
OK |
英語 OS : 言語パックなし |
OK |
英語 OS : 日本語言語パック |
OK |
[Windows 7 EE x64 英語版 : 表示言語 英語]
VHD の OS |
結果 |
日本語 OS : 言語パックなし |
OK |
日本語 OS : 英語言語パック |
OK |
英語 OS : 言語
パックなし |
OK |
英語 OS : 日本語言語パック |
OK |
英語版の Windows 7 から csupload を実行した場合は NG となる組み合わせはありませんでした。
■_CSVERBOSE を設定して詳細ログを取得
Widnows 7 EE 日本語版から VHD を [csupload] コマンドを使用してアップロードしようとした場合にいくつかの組み合わせでエラーが発生していました。
なんでアップロードできないのだろうと不思議に思っていたところ twitter で [set _CSVERBOSE=1] を設定すると csupload 時に詳細なログが取得できるということを教えていただくことができました。(とても感謝です!!)
それではさっそく詳細ログを取得してみようと思います。
[set ~] のコマンドはコマンドプロンプトで実行します。
# 大文字小文字は判別していないので小文字で [_csverbose=1] としても問題ありません。
_CSVERBOSE を設定しない状態では以下の実行結果となります。
Windows(R) Azure(TM) Upload Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Using temporary directory E:… Preparing VHD E:enbaseimage.vhd…
Windows(R) Azure(TM) VHD Verification Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Attached E:enbaseimage.vhd. Getting volume information for E:enbaseimage.vhd… Detached E:enbaseimage.vhd. Cannot find the VM Role Agent. Failed the verification tests. Cannot prepare VHD E:enbaseimage.vhd.
|
_CSVERBOSE=1 を設定した状態では以下のログが取得できます。
Windows(R) Azure(TM) Upload Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Using temporary directory E:… Preparing VHD E:jabaseimage.vhd…
Windows(R) Azure(TM) VHD Verification Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Attached E:jabaseimage.vhd. Getting volume information for E:jabaseimage.vhd… Inp: select disk 2 Inp: online disk noerr Inp: detail disk Inp: exit Run: C:Windowssystem32diskpart.exe /s C:UsersAdministratorAppDataLocalTemptmp5D40.tmp Out: Out: Microsoft DiskPart バージョン 6.1.7600 Out: Copyright (C) 1999-2008 Microsoft Corporation. Out: コンピューター: WIN7-AZURESDK Out: Out: ディスク 2 が選択されました。 Out: Out: 仮想ディスク サービス エラー: Out: ディスクは既にオンラインです。 Out: Out: Out: Msft Virtual Disk SCSI Disk Device Out: ディスク ID: 6D74DAA5 Out: 種類 : Virtual Out: 状態 : オンライン Out: パス : 0 Out: ターゲット : 0 Out: LUN ID : 1 Out: 場所のパス : UNAVAILABLE Out: 現在の読み取り専用状態: はい Out: 読み取り専用 : いいえ Out: ブート ディスク : いいえ Out: ページ ファイル ディスク : いいえ Out: 休止状態ファイル ディスク : いいえ Out: クラッシュ ダンプ ディスク : いいえ Out: クラスター化ディスク : いいえ Out: Out: Volume ### Ltr Label Fs Type Size Status Info Out: ———- — ———– —- ———- ——- ——— ——– Out: Volume 4 G システムで予約済み NTFS Partition 100 MB 正常 Out: Volume 5 F NTFS Partition 14 GB 正常
Out: Out: DiskPart を終了しています… Exit: C:Windowssystem32diskpart.exe returned 0 Match: Volume 4 G システムで予約済み NTFS Partition 100 MB 正常 with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 5 F NTFS Partition 14 GB 正常 with s+Volumes+(d+)s+([a-zA-Z])s+ Inp: list volume Inp: exit Run: C:Windowssystem32diskpart.exe /s C:UsersAdministratorAppDataLocalTemptmp660B.tmp Out: Out: Microsoft DiskPart バージョン 6.1.7600 Out: Copyright (C) 1999-2008 Microsoft Corporation. Out: コンピューター: WIN7-AZURESDK Out: Out: Volume ### Ltr Label Fs Type Size Status Info Out: ———- — ———– —- ———- ——- ——— ——– Out: Volume 0 D 
0; GRMCXLP1_DV UDF DVD-ROM 2199 MB 正常
Out: Volume 1 システムで予約済み NTFS Partition 100 MB 正常 システム Out: Volume 2 C NTFS Partition 39 GB 正常 ブート
Out: Volume 3 E ボリューム NTFS Partition 49 GB 正常
Out: Volume 4 G システムで予約済み NTFS Partition 100 MB 正常
Out: Volume 5 F NTFS Partition 14 GB 正常
Out: Out: DiskPart を終了しています… Exit: C:Windowssystem32diskpart.exe returned 0 Match: Volume 0 D GRMCXLP1_DV UDF DVD-ROM 2199 MB 正常 with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 1 システムで予約済み NTFS Partition 100 MB 正常 システム with s+Volumes+(d+) Match: Volume 2 C NTFS Partition 39 GB 正常 ブート with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 3 E ボリューム NTFS Partition 49 GB 正常 with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 4 G システムで予約済み NTFS Partition 100 MB 正常 with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 5 F NTFS Partition 14 GB 正常 with s+Volumes+(d+)s+([a-zA-Z])s+ Mounted found volume(s) as G: ,F:. Run: C:Windowssystem32dism.exe /Image:G: /Get-AppInfo /ProductCode:{7fae4ea6-55ac-4c40-b948-57ab9f1523f8} Out: Out: 展開イメージのサービスと管理ツール Out: バージョン: 6.1.7600.16385 Out: Out: Out: エラー: 2 Out: Out: イメージにアクセスできません。 Out: イメージ パスと、イメージの Windows ディレクトリが存在すること、およびそのフォルダーに対する読み取りアクセス許可があることを確認してください。 Out: Out: DISM ログ ファイルは C:WindowsLogsDISMdism.log にあります Exit: C:Windowssystem32dism.exe returned 2 Run: C:Windowssystem32dism.exe /Image:F: /Get-AppInfo /ProductCode:{7fae4ea6-55ac-4c40-b948-57ab9f1523f8} Out: Out: 展開イメージのサービスと管理ツール Out: バージョン: 6.1.7600.16385 Out: Out: イメージのバージョン: 6.1.7600.16385 Out: Out: アプリケーション情報: Out: Out: 製品コード : {7FAE4EA6-55AC-4C40-B948-57AB9F1523F8} Out: 製品名 : Windows Azure VM Role Integration Components Out: 製品の状態 : 5 (インストール済み) Out: パッケージ コード : {AD76D995-5582-4B06-B382-244F4F66329A} Out: 製品バージョン : 1.3.11122.0038 Out: 割り当ての種類 : 1 (コンピューターごと) Out: 発行元 : Microsoft Corporation Out: 言語 : 1033 Out: インストール元 : D: Out: パッケージ名 : WaIntegrationComponents-x64.msi Out: ヘルプ リンク : Out: 変換 : Out: ローカル パッケージ : C:WindowsInstaller2272bc.msi Out: インストール日付 : 20110108 Out: Out: 操作は正常に完了しました。 Exit: C:Windowssystem32dism.exe returned 0 Detached E:jabaseimage.vhd. Cannot find the VM Role Agent. Failed the verification tests. Cannot prepare VHD E:jabaseimage.vhd.
|
csupload の事前検証時のどのような処理を実行しているかの詳細ログが取得できるようになります。
詳細ログを取得したところ、エラーの前には以下の処理が実行されていることが確認できました。
- VHD のマウント
- DISKPART によるディスク情報の取得
- DISM による [ProductCode:{7fae4ea6-55ac-4c40-b948-57ab9f1523f8}] (Windows Azure VM Role Integration Components) のインストール確認
[Preped] ファイルの作成ができた環境の詳細ログも見てみたいと思います。
Windows(R) Azure(TM) Upload Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Using temporary directory E:… Preparing VHD E:jabaseimage.vhd…
Windows(R) Azure(TM) VHD Verification Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Attached E:jabaseimage.vhd. Getting volume information for E:jabaseimage.vhd… Inp: select disk 2 Inp: online disk noerr Inp: detail disk Inp: exit Run: C:Windowssystem32diskpart.exe /s C:UserscsuploaduserAppDataLocalTemptmpE1E5.tmp Out: Out: Microsoft DiskPart version 6.1.7600 Out: Copyright (C) 1999-2008 Microsoft Corporation. Out: On computer: WIN7-AZURESDK Out: Out: Disk 2 is now the selected disk.
Out: Out: Virtual Disk Service error: Out: This disk is already online. Out: Out: Out: Msft Virtual Disk SCSI Disk Device Out: Disk ID: 6D74DAA5 Out: Type : Virtual Out: Status : Online Out: Path : 0 Out: Target : 0 Out: LUN ID : 2 Out: Location Path : UNAVAILABLE Out: Current Read-only State : Yes Out: Read-only : No Out: Boot Disk : No Out: Pagefile Disk : No Out: Hibernation File Disk : No Out: Crashdump Disk : No Out: Clustered Disk : No Out: Out: Volume ### Ltr Label Fs Type Size Status Info
Out: ———- — ———– —– ———- ——- ——— ——– Out: Volume 4 G システムで予約済み NTFS Partition 100 MB Healthy Out: Volume 5 F NTFS Partition 14 GB Healthy
Out: Out: Leaving DiskPart… Exit: C:Windowssystem32diskpart.exe returned 0 Match: Volume 4 G システムで予約済み NTFS Partition 100 MB Healthy with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 5 F NTFS Partition 14 GB Healthy with s+Volumes+(d+)s+([a-zA-Z])s+ Inp: list volume Inp: exit Run: C:Windowssystem32diskpart.exe /s C:UserscsuploaduserAppDataLocalTemptmpEBE8.tmp Out: Out: Microsoft DiskPart version 6.1.7600 Out: Copyright (C) 1999-2008 Microsoft Corporation. Out: On computer: WIN7-AZURESDK Out: Out: Volume ### Ltr Label Fs Type Size Status Info
Out: ———- — ———– —– ———- ——- ——— ——– Out: Volume 0 D GRMCXLP1_DV UDF DVD-ROM 2199 MB Healthy
Out: Volume 1 システムで予約済み NTFS Partition 100 MB Healthy System Out: Volume 2 C NTFS Partition 39 GB Healthy Boot
Out: Volume 3 E ボリューム NTFS Partition 49 GB Healthy
Out: Volume 4 G システムで予約済み NTFS Partition 100 MB Healthy Out: Volume 5 F NTFS Partition 14 GB Healthy
Out: Out: Leaving DiskPart… Exit: C:Windowssystem32diskpart.exe returned 0 Match: Volume 0 D GRMCXLP1_DV UDF DVD-ROM 2199 MB Healthy with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 1 システムで予約済み NTFS Partition 100 MB Healthy System with s+Volumes+(d+) Match: Volume 2 C NTFS Partition 39 GB Healthy Boot with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 3 E ボリューム NTFS Partition 49 GB Healthy with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 4 G システムで予約済み NTFS Partition 100 MB Healthy with s+Volumes+(d+)s+([a-zA-Z])s+ Match: Volume 5 F NTFS Partition 14 GB Healthy with s+Volumes+(d+)s+([a-zA-Z])s+ Mounted found volume(s) as G: ,F:. Run: C:Windowssystem32dism.exe /Image:G: /Get-AppInfo /ProductCode:{7fae4ea6-55ac-4c40-b948-57ab9f1523f8} Out: Out: Deployment Image Servicing and Management tool Out: Version: 6.1.7600.16385 Out: Out: Out: Error: 2 Out: Out: Unable to access the image. Out: Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder. Out: Out: The DISM log file can be found at C:WindowsLogsDISMdism.log Exit: C:Windowssystem32dism.exe returned 2 Run: C:Windowssystem32dism.exe /Image:F: /Get-AppInfo /ProductCode:{7fae4ea6-55ac-4c40-b948-57ab9f1523f8} Out: Out: Deployment Image Servicing and Management tool Out: Version: 6.1.7600.16385 Out: Out: Image Version: 6.1.7600.16385 Out: Out: Application information: Out: Out: Product Code : {7FAE4EA6-55AC-4C40-B948-57AB9F1523F8} Out: Product Name : Windows Az
ure VM Role Integration Components Out: Product State : 5 (Installed) Out: Package Code : {AD76D995-5582-4B06-B382-244F4F66329A} Out: Product Version : 1.3.11122.0038 Out: Assignment Type : 1 (Per-Machine) Out: Publisher : Microsoft Corporation Out: Language : 1033 Out: Install Source : D: Out: Package Name : WaIntegrationComponents-x64.msi Out: Help Link : Out: Transforms : Out: Local Package : C:WindowsInstaller2272bc.msi Out: Install Date : 20110108 Out: Out: The operation completed successfully. Exit: C:Windowssystem32dism.exe returned 0 Found Windows Azure VM Role Agent version 1.3.11122.0038 on volume 5. Make sure volume 5 is the boot volume of E:jabaseimage.vhd. Detached E:jabaseimage.vhd. Successfully passed the verification tests. The mounted size of the VM image is 15 GB. This image can be used with the following Windows Azure VM sizes: ExtraSmall, Small, Medium, Large, ExtraLarge
Windows(R) Azure(TM) VHD Preparation Tool. 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Compressing VHD from E:jabaseimage.vhd to E:20110104052820ZEE56DF9ED61444ABA4A 40903DBB597C0.preped… Preparing: 0% complete…
|
エラーが発生した場合 / 成功した場合ともに [Windows Azure VM Role Integration Components] がインストールされていることの確認は成功しているのですよね…。
Windows Azure VM Role Integration Components がインストールされていない場合は以下のようなエラーとなります。
# エラー箇所のみの抜粋です。
Exit: C:Windowssystem32dism.exe returned 2 Run: C:Windowssystem32dism.exe /Image:F: /Get-AppInfo /ProductCode:{7fae4ea6-55ac-4c40-b948-57ab9f1523f8} Out: Out: 展開イメージのサービスと管理ツール Out: バージョン: 6.1.7600.16385 Out: Out: イメージのバージョン: 6.1.7600.16385 Out: Out: アプリケーション情報: Out: Out: (このイメージ用のアプリケーションは見つかりません) Out: Out: 操作は正常に完了しました。 Exit: C:Windowssystem32dism.exe returned 0 Detached E:jabaseimage.vhd. Cannot find the VM Role Agent. Failed the verification tests. Cannot prepare VHD E:jabaseimage.vhd.
|
今回は Windows Azure VM Role Integration Components がインストールされているが、実行環境 (csupload を実行する環境) による問題で VHD がアップロードできないという現象が発生しているようですね。
# 実行環境によっては [Preparing] まで進むので VHD にも問題はなさそうですね。
■SkipVerify による検証のスキップ
twitter で [SkipVerify] をすることで、検証をスキップすることができるという情報を教えていただきました。
日本語 OS から VHD をアップする場合、表示言語を英語にすることでアップすることができますが、表示言語の変更には変更する言語の言語パックをインストールしておく必要があります。
現状の VM Role の Beta 版を使用している環境で日本語 OS からアップをする場合、必ず表示言語の変更が必要かというとそうではありません。
このような場合には Add-VMImage を実行する際に [-SkipVerify] オプションを指定します。
VHD をアップするときに使用する Add-VMImage コマンドのヘルプを見てみたいと思います。
Windows(R) Azure(TM) Upload Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
NAME Add-VMImage
SYNOPSIS Add an local VHD to the VM image repository.
SYNTAX Add-VMImage [-AffinityGroup <string>] [-Connection <string>] [-Description <string>] [-KeepTempFiles] -LiteralPath <string> [-Location <string>] [-Name <string>] [-SkipVerify] [-TempLocation <string>]
|
ヘルプを見ると [-SkipVerify] のオプションがありますね。
先ほど NG となった、[Windows 7 EE x64 日本語版 : 表示言語 日本語] で [日本語 OS : 英語言語パック] を [-SkipVerify] オプションを使ってアップロードしてみたいと思います。
csupload Add-VMImage -Connection "SubscriptionId=[サブスクリプション ID]; CertificateThumbprint=[証明書拇印]" -Description "Base image Windows Server 2008 R2 (Japanese)" -LiteralPath "E:jabaseimage.vhd" -Name "jabaseimage.vhd" -Location "East Asia" -SkipVerify |
こちらが実行時のログになります。
# _CSVERBOSE は設定しています。
Windows(R) Azure(TM) Upload Tool 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Using temporary directory E:… Preparing VHD E:jabaseimage.vhd… The mounted size of the VM image is 15 GB. This image can be used with the follo wing Windows Azure VM sizes: ExtraSmall, Small, Medium, Large, ExtraLarge
Windows(R) Azure(TM) VHD Preparation Tool. 1.3.0.0 for Microsoft(R) .NET Framework 3.5 Copyright (c) Microsoft Corporation. All rights reserved.
Compressing VHD from E:jabaseimage.vhd to E:20110104052820ZEE56DF9ED61444ABA4A40903DBB597C0.preped… Preparing: 0% complete…
|
先ほどまでは [Cannot find the VM Role Agent.] でエラーとなっていましたが、検証がスキップされることにより、[Preparing: 0% com
plete…] まで進んでいることが確認できます。
SkipVerify を設定することで検証がスキップされ、VM Role 用の統合コンポーネントをインストールしていない / 今回のように環境依存と思われる現象が発生している場合でも VHD をアップすることが可能となります。
この方法を使用すると日本語 OS から VM Role 用の VHD のイメージを簡単にアップロードすることが可能となります。
また、SkipVerify を使用することでベース VHD には VM Role 用の統合コンポーネントをインストールせずに差分 VHD にインストールして VM Role 上で実行するという運用も可能となります。
# オンプレミス用に作った VHD を変更せずそのままアップして VM Role 用に特化したコンポーネントを差分 VHD にインストールするシナリオですね。
今週 VM Role を触っていて、ベース VHD と差分 VHD を使用すると Sysprep の管理も簡単にできるな~ということに気づきました。
次の投稿では、ベース VHD と差分 VHD を使用した Sysprep 用イメージの作成をまとめてみたいと思います。
[…] This post was mentioned on Twitter by Naohiro Fujie, 小澤真之(Masayuki Ozawa). 小澤真之(Masayuki Ozawa) said: VM RoleにVHDをアップする際のSkipVerifyによる検証のスキップ を投稿しました。VM RoleAgent未インストール/日本語OSからVHDをアップするときに使用します。 http://tinyurl.com/2etlr7r #AzureJP #jazug […]
Tweets that mention VM Role に VHD をアップする際の SkipVerify による検証のスキップ ≪ SE の雑記 -- Topsy.com
8 1月 11 at 22:58
[…] This post was mentioned on Twitter by Naohiro Fujie, 小澤真之(Masayuki Ozawa). 小澤真之(Masayuki Ozawa) said: VM RoleにVHDをアップする際のSkipVerifyによる検証のスキップ を投稿しました。VM RoleAgent未インストール/日本語OSからVHDをアップするときに使用します。 http://tinyurl.com/2etlr7r #AzureJP #jazug […]
Tweets that mention VM Role に VHD をアップする際の SkipVerify による検証のスキップ « SE の雑記 -- Topsy.com
8 1月 11 at 22:58