#Help understand userdata in Azure VMs.

1 messages · Page 1 of 1 (latest)

idle spindle
#

I recently came across a usecase which involves using the "userdata" capability in Azure. However reading the docs, I understood the differences between custom data and user data, such as userdata persists and is available through out the lifetime of the VM. However I have some questions that are unanswered and coulndn't figure out through Google. The questions are as follows:

  1. Is userdata only applicable to Linux VMs or can we provide userdata for Windows VMs provisioned on Azure? If so, which process takes care of executing it? (like in Linux VMs, there's cloud-init process that processes the userdata)

  2. If I specify customdata and userdata for an Azure VM, which gets executed first?

  3. Can I add the cloud-config scripts usually added in the customdata, inside the userdata data field as well? (I know userdata is not encrypted, but since I read that userdata is basically customdata with added benefits, I wanted to know if it was possible.)

  4. When to use userdata and when to use customdata?

  5. I know that its the cloud-init process that executes the customdata when the VM boots up. Similarly, which process executes the userdata?

  6. Since userdata can be added after the VM has been provisioned and existing userdata can be modified, which process takes care of executing it after adding/modifying the existing userdata. Because if it's not cloud-init(because as far as I know, cloud-init only executes once when the VM provisions), then how does userdata gets executed?

If someone who knows about Azure or the above concepts could enlighten me, it would be a huge help. Thanks.

harsh sandal
#

i'll need to do some research on some of this and get back to you (unless anyone else here knows)

idle spindle
#

That would be hugle appreciated @harsh sandal thank you.