Azure / Azure/azure-libraries-for-java
Encrypting the VM fails due to invalid secret URL "Preparing machine for bitlocker".
- Ngôn ngữ chính
- Java
- Star
- 97
- Fork
- 102
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Steps to reproduce
1. Created a win10 VM with osDisk and encrypt the VM.
2. Took the snapshot of the osDisk after the encryption.
3. Deleted the original VM and original osDisk
4. Recreated the VM with the same name in the same RG from the encrypted snapshot.
5. Added a datadisk to the new VM and then tried to encrypt the data disk using the following.
```
WindowsVMDiskEncryptionConfiguration config =
new WindowsVMDiskEncryptionConfiguration(
keyVault.id(),
applicationId,
applicationSecretEncrypted)
.withVolumeType(DiskVolumeType.DATA);
DiskVolumeEncryptionMonitor monitor = vm.diskEncryption().enable(config);
```
Azure throws the following exception
> com.microsoft.azure.CloudException:
> Preparing machine for bitlocker is not a valid versioned Key Vault Secret URL. It should be in the format `https:///secrets//.:` Preparing machine for bitlocker is not a valid versioned Key Vault Secret URL. It should be in the format `https:///secrets//.`
But retrying it after few minutes once it fails works.
I guess it's trying to re-install the "AzureDiskEncryption" extension since this was deleted as part of the original VM delete. But not waiting for extension's provisioning state to succeed (which will set the status message correctly to the secret URL) and using an intermediate status message "Preparing machine for bitlocker" as the secret URL.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu tại WindowsVMDiskEncryptionConfiguration và điểm vào vm.diskEncryption().enable(config), sau đó theo dõi cách trạng thái provision của extension AzureDiskEncryption cung cấp secret URL. Tái hiện flow tạo lại VM dựa trên snapshot và xác minh rằng quá trình mã hóa không sử dụng thông báo trung gian “Preparing machine for bitlocker”; hoàn tất có nghĩa là lần thử mã hóa đầu tiên thành công mà không cần retry.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, java
- Lĩnh vực
- cloud, security
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100