我按照 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 虚拟机,安装扩展后,您需要等待 1-20 小时,磁盘才会真正加密。我相信您需要重新启动才能显示其已加密。
您应该查看扩展程序状态,它会在某个时间点要求重新启动。
忘记补充了。一旦您重新启动,它将报告磁盘已加密。
对于 Windows 虚拟机,它们会“立即”加密(可能在启用 Bitlocker 并在后台进行加密之后)。
关于linux - 如何判断附加到 Azure 虚拟机的磁盘是否已加密?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52947179/