【问题标题】:How to tell if a disk attached to an Azure Virtual Machine is encrypted?如何判断附加到 Azure 虚拟机的磁盘是否已加密?
【发布时间】:2018-12-15 13:25:16
【问题描述】:

我按照this instructions 在 Azure 上加密了一台 Ubuntu 16.04 机器的磁盘。显然该过程已成功完成,但是在使用命令时:

az vm encryption show --resource-group "<res-group>" --name "<vm-name>"

我得到了一些令人困惑的结果:

{
  "disks": [
    {
      "encryptionSettings": null,
      "name": "...",
      "statuses": [
        {
          "code": "EncryptionState/notEncrypted",
          "displayStatus": "Disk is not encrypted",
          ...
        }
      ]
    }
  ],
  "status": [
    {
      "code": "ProvisioningState/succeeded",
      "displayStatus": "Provisioning succeeded",
      "message": "Encryption succeeded for all volumes",
      ...
    }
  ],
  "substatus": [
    {
      "code": "ComponentStatus/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/succeeded",
      "displayStatus": "Provisioning succeeded",
      "message": "{\"os\": \"Encrypted\", \"data\": \"NotMounted\"}",
      ....
    }
  ]
}

如您所见,我收到消息所有卷加密成功,但同时磁盘未加密

我如何才能 100% 确定我的磁盘是否已加密?

【问题讨论】:

    标签: linux azure ubuntu encryption


    【解决方案1】:

    对于 linux 虚拟机,您需要等待 1-20 小时,然后才能在安装扩展后实际加密磁盘。而且我相信您需要重新启动才能说它已加密。

    您应该注意扩展程序的状态,它会在某个时间点要求重新启动。
    忘记加了。重新启动后,它会报告磁盘已加密。

    对于 Windows 虚拟机,它们是“即时”加密的(可能在启用 bitlocker 后在后台进行加密)。

    【讨论】:

    • 如果重启后仍然看到有冲突的报告,请通过门户开票。如果需要,我会尝试在此重现并打开内部票证。
    【解决方案2】:

    我刚刚对我们的几个虚拟机进行了此操作。请检查您的 Azure KeyVault 是否已启用磁盘加密。如果您查看文档,您会看到它指定您启用密钥保管库以进行磁盘加密。缺少该参数会导致您描述的行为。

    在 Azure 门户中打开 Key Vault,从左侧菜单中选择“访问策略”,然后单击“单击以显示高级访问策略”。确保选中“启用 Azure 磁盘加密访问”策略。

    如果所有设置正确,您应该会在“az vm encryption show”命令输出的“磁盘”部分或 Azure 中 VM 的磁盘刀片中看到“磁盘上启用加密”门户,“az vm 加密启用”返回的那一刻。加密过程本身可能仍需要几个小时,但 Azure 现在会将 VM 视为已加密。

    【讨论】:

      猜你喜欢
      • 2017-01-15
      • 1970-01-01
      • 2017-07-16
      • 2021-03-09
      • 2021-06-13
      • 2019-09-22
      • 2021-10-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多