Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Virtual machine extensions

  • Windows VMs have extensions which give your VM additional capabilities through post deployment configuration and automated tasks.

  • These common tasks can be accomplished using extensions:

    • Run custom scripts: The Custom Script Extension helps you configure workloads on the VM by running your script when the VM is provisioned.

      Deploy and manage configurations: The PowerShell Desired State Configuration (DSC) Extension helps you set up DSC on a VM to manage configurations and environments.

      Collect diagnostics data: The Azure Diagnostics Extension helps you configure the VM to collect diagnostics data that can be used to monitor the health of your application.

...

  • Run scripts in your Windows VM

  • The Custom Script Extension is primarily used for post deployment configuration and software installation.

    • Download and run scripts in Azure virtual machines.

  • The Run Command feature enables virtual machine and application management and troubleshooting using scripts, and is available even when the machine is not reachable, for example if the guest firewall doesn't have the RDP or SSH port open

  • Run scripts in your Windows VM by using action Run Commands

  • Run Command can run scripts on your virtual machines remotely by using the VM agent.

  • This capability is useful in all scenarios where you want to run a script within a virtual machine.

    • It's one of the only ways to troubleshoot and remediate a virtual machine that doesn't have the RDP or SSH port open because of improper network or administrative user configuration.

    • Output is limited to the last 4,096 bytes.

    • The minimum time to run a script is about 20 seconds.

    • Scripts run as System on Windows.

    • One script at a time can run.

    • Scripts that prompt for information (interactive mode) are not supported.

    • You can't cancel a running script.

    • The maximum time a script can run is 90 minutes. After that, it will time out.

  • To function correctly, Run Command requires connectivity (port 443) to Azure public IP addresses.

  • If the extension doesn't have access to these endpoints, the scripts might run successfully but not return the results.

SetRDPPort

Sets the default or user-specified port number for Remote Desktop connections. Enables firewall rules for inbound access to the port.

...

Hybrid Runbook Worker

The Hybrid Runbook Worker provides general machine, application, and environment management with user's custom scripts stored in an Automation account.

  • Run scripts in Azure and non-Azure machines.

  • Can be run using Azure portal, Azure CLI, REST API, PowerShell, webhook.

Serial console

The Serial console provides direct access to a VM, similar to having a keyboard connected to the VM.

  • Run commands in Azure virtual machines.

  • Can be run using a text-based console to the machine in the Azure portal.

  • Login to the machine with a local user account.

  • Useful when access to the virtual machine is needed regardless of the machine's network or operating system state.