Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Commands/vmss/_reimage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _vmss reimage_

Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.

## Versions

### [2024-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimage 2024-11-01 -->
9 changes: 9 additions & 0 deletions Commands/vmss/_reimageall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _vmss reimageall_

Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.

## Versions

### [2024-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimageall 2024-11-01 -->
6 changes: 6 additions & 0 deletions Commands/vmss/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS
- [perform-maintenance](/Commands/vmss/_perform-maintenance.md)
: Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications

- [reimage](/Commands/vmss/_reimage.md)
: Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.

- [reimageall](/Commands/vmss/_reimageall.md)
: Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.

- [show](/Commands/vmss/_show.md)
: Get information about a virtual machine scale set.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimage", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3JlaW1hZ2U=/V/MjAyNC0xMS0wMQ=="}], "commandGroups": [{"name": "vmss", "commands": [{"name": "reimage", "version": "2024-11-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimage", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3JlaW1hZ2U=/V/MjAyNC0xMS0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}, {"type": "string", "var": "$Path.vmScaleSetName", "options": ["vm-scale-set-name"], "required": true, "idPart": "name", "help": {"short": "The name of the VM scale set."}}]}, {"name": "VmScaleSetReimageInput", "args": [{"type": "string", "var": "$vmScaleSetReimageInput.exactVersion", "options": ["exact-version"], "group": "VmScaleSetReimageInput", "help": {"short": "Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk is reimaged to the existing version of OS Disk."}}, {"type": "boolean", "var": "$vmScaleSetReimageInput.forceUpdateOSDiskForEphemeral", "options": ["force-update-os-disk-for-ephemeral"], "group": "VmScaleSetReimageInput", "help": {"short": "Parameter to force update ephemeral OS disk for a virtual machine scale set VM"}}, {"type": "array<string>", "var": "$vmScaleSetReimageInput.instanceIds", "options": ["instance-ids"], "group": "VmScaleSetReimageInput", "help": {"short": "The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set."}, "item": {"type": "string"}}, {"type": "object", "var": "$vmScaleSetReimageInput.osProfile", "options": ["os-profile"], "group": "VmScaleSetReimageInput", "help": {"short": "Specifies information required for reimaging the non-ephemeral OS disk."}, "args": [{"type": "password", "var": "$vmScaleSetReimageInput.osProfile.adminPassword", "options": ["admin-password"], "help": {"short": "Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_]) <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)"}, "prompt": {"msg": "Password:"}}, {"type": "string", "var": "$vmScaleSetReimageInput.osProfile.customData", "options": ["custom-data"], "help": {"short": "Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)."}}]}, {"type": "boolean", "var": "$vmScaleSetReimageInput.tempDisk", "options": ["temp-disk"], "group": "VmScaleSetReimageInput", "help": {"short": "Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk."}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "VirtualMachineScaleSets_Reimage", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"maxLength": 90, "minLength": 1}}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true, "format": {"minLength": 1}}, {"type": "string", "name": "vmScaleSetName", "arg": "$Path.vmScaleSetName", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2024-11-01"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}, "body": {"json": {"schema": {"type": "object", "name": "vmScaleSetReimageInput", "props": [{"type": "string", "name": "exactVersion", "arg": "$vmScaleSetReimageInput.exactVersion"}, {"type": "boolean", "name": "forceUpdateOSDiskForEphemeral", "arg": "$vmScaleSetReimageInput.forceUpdateOSDiskForEphemeral"}, {"type": "array<string>", "name": "instanceIds", "arg": "$vmScaleSetReimageInput.instanceIds", "item": {"type": "string"}}, {"type": "object", "name": "osProfile", "arg": "$vmScaleSetReimageInput.osProfile", "props": [{"type": "password", "name": "adminPassword", "arg": "$vmScaleSetReimageInput.osProfile.adminPassword", "secret": true}, {"type": "string", "name": "customData", "arg": "$vmScaleSetReimageInput.osProfile.customData"}]}, {"type": "boolean", "name": "tempDisk", "arg": "$vmScaleSetReimageInput.tempDisk"}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200]}, {"statusCode": [202], "header": {"items": [{"name": "Location"}, {"name": "Retry-After"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "confirmation": ""}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimage" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3JlaW1hZ2U=/V/MjAyNC0xMS0wMQ=="/>
<commandGroup name="vmss">
<command name="reimage" version="2024-11-01" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimage" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3JlaW1hZ2U=/V/MjAyNC0xMS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$Path.vmScaleSetName" options="vm-scale-set-name" required="True" idPart="name">
<help short="The name of the VM scale set."/>
</arg>
</argGroup>
<argGroup name="VmScaleSetReimageInput">
<arg type="string" var="$vmScaleSetReimageInput.exactVersion" options="exact-version" group="VmScaleSetReimageInput">
<help short="Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk is reimaged to the existing version of OS Disk."/>
</arg>
<arg type="boolean" var="$vmScaleSetReimageInput.forceUpdateOSDiskForEphemeral" options="force-update-os-disk-for-ephemeral" group="VmScaleSetReimageInput">
<help short="Parameter to force update ephemeral OS disk for a virtual machine scale set VM"/>
</arg>
<arg type="array<string>" var="$vmScaleSetReimageInput.instanceIds" options="instance-ids" group="VmScaleSetReimageInput">
<help short="The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set."/>
<item type="string"/>
</arg>
<arg type="object" var="$vmScaleSetReimageInput.osProfile" options="os-profile" group="VmScaleSetReimageInput">
<help short="Specifies information required for reimaging the non-ephemeral OS disk."/>
<arg type="password" var="$vmScaleSetReimageInput.osProfile.adminPassword" options="admin-password">
<help short="Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** &quot;abc@123&quot;, &quot;P@$$w0rd&quot;, &quot;P@ssw0rd&quot;, &quot;P@ssword123&quot;, &quot;Pa$$word&quot;, &quot;pass@word1&quot;, &quot;Password!&quot;, &quot;Password1&quot;, &quot;Password22&quot;, &quot;iloveyou!&quot; <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)"/>
<prompt msg="Password:"/>
</arg>
<arg type="string" var="$vmScaleSetReimageInput.osProfile.customData" options="custom-data">
<help short="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)."/>
</arg>
</arg>
<arg type="boolean" var="$vmScaleSetReimageInput.tempDisk" options="temp-disk" group="VmScaleSetReimageInput">
<help short="Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk."/>
</arg>
</argGroup>
<operation operationId="VirtualMachineScaleSets_Reimage">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage">
<request method="post">
<path>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True">
<format maxLength="90" minLength="1"/>
</param>
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True">
<format minLength="1"/>
</param>
<param type="string" name="vmScaleSetName" arg="$Path.vmScaleSetName" required="True"/>
</path>
<query>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2024-11-01&quot;"/>
<format minLength="1"/>
</const>
</query>
<body>
<json>
<schema type="object" name="vmScaleSetReimageInput" clientFlatten="True">
<prop type="string" name="exactVersion" arg="$vmScaleSetReimageInput.exactVersion"/>
<prop type="boolean" name="forceUpdateOSDiskForEphemeral" arg="$vmScaleSetReimageInput.forceUpdateOSDiskForEphemeral"/>
<prop type="array<string>" name="instanceIds" arg="$vmScaleSetReimageInput.instanceIds">
<item type="string"/>
</prop>
<prop type="object" name="osProfile" arg="$vmScaleSetReimageInput.osProfile">
<prop type="password" name="adminPassword" arg="$vmScaleSetReimageInput.osProfile.adminPassword" secret="True"/>
<prop type="string" name="customData" arg="$vmScaleSetReimageInput.osProfile.customData"/>
</prop>
<prop type="boolean" name="tempDisk" arg="$vmScaleSetReimageInput.tempDisk"/>
</schema>
</json>
</body>
</request>
<response statusCode="200"/>
<response statusCode="202">
<header>
<item name="Location"/>
<item name="Retry-After"/>
</header>
</response>
<response isError="True">
<body>
<json>
<schema type="@ODataV4Format"/>
</json>
</body>
</response>
</http>
</operation>
</command>
</commandGroup>
</CodeGen>
Loading