SE の雑記

SQL Server の情報をメインに Microsoft 製品の勉強内容を日々投稿

Windows Server 2022 の Azure VM で Azure Disk Encryption を有効にしようとした際にエラーが発生した場合の対応

leave a comment

Azure Disk Encrption – Key vault secret wrap with key encryption key failed に記載されている内容となります。

OS のイメージとして、Windows Server 2022 (Azure Edition 含む) を使用している環境に対して、Azure Disk Encryption を有効化すると、暗号化に使用されている拡張機能 (AzureDiskEncryption) のインストールで、次のようなエラーが発生し拡張機能のインストールが失敗することがあります。

{"customHtml":{"htmlTemplate":"<code><div><div>拡張機能 ‘AzureDiskEncryption’ (発行元 ‘Microsoft.Azure.Security’ および種類 ‘AzureDiskEncryption’) の処理中に VM から失敗が報告されました。エラー メッセージ: ‘[2.4.0.21] Failed to enable Azure Disk Encryption on the VM with the following exception details:\n Microsoft.Cis.Security.BitLocker.BitlockerIaasVMExtension.BitlockerFailedToSendEncryptionSettingsException: The fault reason was: ‘  0xc142506f  RUNTIME_E_KEYVAULT_SECRET_WRAP_WITH_KEK_FAILED  Key vault secret wrap with key encryption key failed. ‘.\r\n   at Microsoft.Cis.Security.BitLocker.BitlockerIaasVMExtension.WireProtocol.WireProtocolMessage.SendEncryptionSettingsToHost() in C:\\__w\\1\\s\\src\\BitLocker\\BitlockerIaasVMExtension\\WireProtocol\\WireProtocolMessage.cs:line 210\r\n   at Microsoft.Cis.Security.BitLocker.BitlockerIaasVMExtension.BitlockerExtension.SendEncryptionSettingsToHostV3(VmEncryptionSettings vmSettings) in C:\\__w\\1\\s\\src\\BitLocker\\BitlockerIaasVMExtension\\BitlockerExtension.cs:line 1092’。トラブルシューティングの詳細については、<a target=\"_blank\" class=\"msportalfx-ext-link\" href=\"https://aka.ms/VMExtensionADEWindowsTroubleshoot\">https://aka.ms/VMExtensionADEWindowsTroubleshoot</a> を参照してください。 </div></div></code>","viewModel":null}}

Windows Server 2022 / Windows 11 がサポートするキー暗号化キーのサイズ

サポートされるオペレーティング システム には次の記載があります。

Windows Server 2022 と Windows 11 では、RSA 2048 ビット キーをサポートしていません。 詳細情報については、「FAQ: キー暗号化キーにはどのサイズを使用すべきですか?」を参照してください。

上記の情報の参照先の情報を確認すると次の記載があります。

キー暗号化キー (KEK) にはどのサイズを使用すべきですか?

Windows Server 2022 と Windows 11 には、BitLocker の新しいバージョンが含まれており、現在、RSA 2048 ビット キー暗号化キーでは機能しません。 それが解決されるまでは、「サポートされるオペレーティング システム」で説明されているように、RSA 3072 または RSA 4096 ビット キーを使います。

以前のバージョンの Windows では、代わりに RSA 2048 キー暗号化キーを使用することができます。

この記載の通りなのですが、Windows Server 2022 / Windows 11 で Azure Disk Encryption を使用する場合には、キーの作成時にデフォルトで選択されている 2048 ではなく、3072 / 4096 を使用することでエラーを回避できます。

image

エラーが発生した場合、該当の Azure VM で AzureDiskEncryption の拡張機能がエラーの状態となっていますが、明示的に拡張機能をアンインストールしなくても再度暗号化の設定を行うことで Azure VM で Disk Encryption により、指定したディスクに対して、BitLocker が有効化された状態となりました。

image

Share

Written by Masayuki.Ozawa

2月 21st, 2024 at 5:22 pm

Posted in Azure

Tagged with

Leave a Reply