[Question] How to encrypt vm disks
Hey, So I've been looking into encrypting the vm's without using something like os.system/subprocess. I have spotted THIS in the docs, I've very little experience in how to read those docs and I'm struggling to understand how to:
- Login using ServicePrincipalCredentials from azure.common.credentials
- Import ComputeManagementClient from azure.mgmt.compute in order to get data from the VM
- Now the question is How do i actually do the import in order to use the DiskEncryptionSettings class?
I tried:
from azure.mgmt.compute import *andfrom azure.mgmt.compute import DiskEncryptionSettingsAnd cannot get a good error other than DiskEncryptionSettings is not defined when i try to call it withDiskEncryptionSettings()to get some sort of a "useful" error.
I'd appreciate any help because I'm struggling to understand how to import based on reading the docs.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mjconnection, @Drewm3
Quick update: I have noticed that I was looking at a wrong function to do what i was intending to. After some research time I have found THIS. But the question still remains, what do i have to import and how in order to get to this exact function. Thanks
@vaibhav-agar, could you take a look at this issue?
Is there a reason why an avg response takes 2-3 weeks? This is a very straight forward question and I've been really disappointed that there is way more updates to the core while the documentation for the added functions to the SDK is next to nothing. My company is ready to move all our operations to AWS since we've been struggling with Microsoft Support and now this. Really poor outlook for the future of Azure automation.
@kaerm, is there someone from the python SDK team who could help @secstu? The question looks to be more of a how-to on importing the functions for the python SDK as compared to the functionality of the actual back-end APIs. As such someone from the python team will probably be able to help quicker than someone from the Managed Disks team.
@nickzhums @RodgeFu to take a look
@zikalino should be able to help have a look. @Drewm3 , @kaerm , the 'service attention' label is marked on this issue which means the Compute team is taking care of this issue, so do you mind we remove the label so that this issue will show up in our radar when Zim is working on it? thanks.
Glad to see some movement. Looking forward to maybe arranging to fix this in a timely manner as its crucial to get them disks encrypted for our ISO cert.
Hi secstu,
Sorry for the delay response. I saw someone has asked the same question on stackoverflow. I have tried the sample code provided and it works well on my side. I think you can give it a try and feel free to let us know if you have further questions.
Link: https://stackoverflow.com/questions/59785672/python-azure-sdk-enabling-disk-encryption Because the operation may take a while to complete, so you will need to wait for a while before the operation's status become 'succeeded'. thanks.
Rodge
No update for 2+ month with solution provided, so close this one to clean up our issues. Feel free to reopen if needed. thanks.