How to restart a VM in Automation State Configuration with latest configuration?

Mahdi 125 Reputation points
2024-07-08T07:45:18.6966667+00:00

Hi. Let's say I've connected to a VM and enabled Azure Automation State Configuration. Then the VM stopped (for whatever reason). What should I do to restart the VM from the latest configurations? Can I just start it again or do I need to restore its latest configuration from somewhere?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,256 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,509 questions
0 comments No comments
{count} votes

Accepted answer
  1. Deepanshukatara-6769 9,195 Reputation points
    2024-07-08T09:16:38.5+00:00

    Hi,

    When a VM that has Azure Automation State Configuration enabled stops, you can simply start it again. The Azure Automation State Configuration will ensure that the VM is configured according to the desired state as defined in your configuration. Here are the steps to follow:

    1. Start the VM: You can start the VM from the Azure portal, Azure CLI, or PowerShell.
    2. Verify Configuration Compliance: Once the VM is running, Azure Automation State Configuration will automatically apply the latest configuration to the VM. You can verify the compliance status in the Azure portal under the Automation Account -> State Configuration (DSC) -> Nodes.

    Please check below docs for more ref

    https://video2.skills-academy.com/en-us/azure/automation/quickstarts/dsc-configuration?source=recommendations

    https://video2.skills-academy.com/en-us/azure/automation/tutorial-configure-servers-desired-state

    Kindly let us know if any further questions

    Thanks

    Deepanshu

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.