azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

[Question] How to encrypt vm disks

Open 0xkam opened this issue 6 years ago • 10 comments

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:

  1. Login using ServicePrincipalCredentials from azure.common.credentials
  2. Import ComputeManagementClient from azure.mgmt.compute in order to get data from the VM
  3. 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 * and from azure.mgmt.compute import DiskEncryptionSettings And cannot get a good error other than DiskEncryptionSettings is not defined when i try to call it with DiskEncryptionSettings() 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.

0xkam avatar Jan 16 '20 21:01 0xkam

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mjconnection, @Drewm3

ghost avatar Jan 16 '20 21:01 ghost

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

0xkam avatar Jan 16 '20 21:01 0xkam

@vaibhav-agar, could you take a look at this issue?

Drewm3 avatar Feb 14 '20 03:02 Drewm3

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.

0xkam avatar Feb 24 '20 09:02 0xkam

@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.

Drewm3 avatar Feb 25 '20 05:02 Drewm3

@nickzhums @RodgeFu to take a look

kaerm avatar Feb 25 '20 16:02 kaerm

@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.

RodgeFu avatar Feb 26 '20 02:02 RodgeFu

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.

0xkam avatar Feb 26 '20 09:02 0xkam

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

RodgeFu avatar Mar 05 '20 14:03 RodgeFu

No update for 2+ month with solution provided, so close this one to clean up our issues. Feel free to reopen if needed. thanks.

RodgeFu avatar May 23 '20 06:05 RodgeFu