Help Needed to Automate VM Enrollment into Machine Groups During VMSS Creation

razec18 195 Reputation points
2024-08-12T14:03:30.9766667+00:00

Hey everyone!

I'm dealing with a pretty important challenge in our work environment at Rede D'Or. Right now, we have a script that automatically enrolls VMs (both regular and VMSS) into our domain as soon as they're created, and that’s working great. But now I’m trying to take it a step further to make things even more efficient.

What I want to do is automate the process of enrolling these VMs into a specific Machine Group in Power Automate at the time of their creation. This is crucial for us, especially during peak times when we need to spin up multiple VMs quickly.

I’ve already tried a few things, like creating an Azure Compute Gallery with the machine already in the desired Machine Group, running SYSPREP, and then creating the VMSS from that. Unfortunately, the new machines didn’t automatically join the Machine Group as I had hoped.

Even after looking into "silent register" and other possible solutions, I haven't been able to get this to work as needed. I’ve opened other tickets with Microsoft, but we still haven’t been able to resolve this issue.

In three days, we’ll need to create a large volume of VMSS to meet a business need, and this automation would be key to handling that efficiently. That’s why I’m reaching out here to see if anyone has suggestions.

Thanks so much for your help!

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
408 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 25,321 Reputation points
    2024-08-22T21:00:14.3266667+00:00

    Hello @João Vitor do Prado Maia

    Did you explore Power Automate Desktop Flows? If feasible, use Power Automate Desktop to create a flow that handles the enrollment process. This can be triggered by the creation of a new VM and can include steps to add the newly created VM/VMSS VM under your subscription to the Machine Group on Power Automate?

    Based on the urgency, it might be beneficial to test these solutions in a controlled environment before your peak period. If you need more detailed guidance on any of these steps, feel free to ask!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.