From c5a4a6d123c7f7b63881522a6ecbc85e982d161f Mon Sep 17 00:00:00 2001 From: william051200 Date: Fri, 13 Feb 2026 10:42:04 +0800 Subject: [PATCH] Export vmss reimage and vmss reimageall --- Commands/vmss/_reimage.md | 9 ++ Commands/vmss/_reimageall.md | 9 ++ Commands/vmss/readme.md | 6 ++ .../2024-11-01.json | 1 + .../2024-11-01.xml | 93 +++++++++++++++++++ .../2024-11-01.json | 1 + .../2024-11-01.xml | 67 +++++++++++++ 7 files changed, 186 insertions(+) create mode 100644 Commands/vmss/_reimage.md create mode 100644 Commands/vmss/_reimageall.md create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.json create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.xml create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.json create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.xml diff --git a/Commands/vmss/_reimage.md b/Commands/vmss/_reimage.md new file mode 100644 index 000000000..50b3e960f --- /dev/null +++ b/Commands/vmss/_reimage.md @@ -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** + + diff --git a/Commands/vmss/_reimageall.md b/Commands/vmss/_reimageall.md new file mode 100644 index 000000000..ee2fb0be5 --- /dev/null +++ b/Commands/vmss/_reimageall.md @@ -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** + + diff --git a/Commands/vmss/readme.md b/Commands/vmss/readme.md index f43866164..b0dc350c7 100644 --- a/Commands/vmss/readme.md +++ b/Commands/vmss/readme.md @@ -54,6 +54,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. diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.json b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.json new file mode 100644 index 000000000..18441709c --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.json @@ -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", "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.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\\W_])

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

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)

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", "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": ""}]}]} \ No newline at end of file diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.xml b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.xml new file mode 100644 index 000000000..6f0a9fd70 --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2U=/2024-11-01.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + +
+
+
+
+
diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.json b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.json new file mode 100644 index 000000000..26c9fd958 --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.json @@ -0,0 +1 @@ +{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimageall", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3JlaW1hZ2VhbGw=/V/MjAyNC0xMS0wMQ=="}], "commandGroups": [{"name": "vmss", "commands": [{"name": "reimageall", "version": "2024-11-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/reimageall", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3JlaW1hZ2VhbGw=/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": "VmInstanceIDs", "args": [{"type": "array", "var": "$vmInstanceIDs.instanceIds", "options": ["instance-ids"], "group": "VmInstanceIDs", "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"}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "VirtualMachineScaleSets_ReimageAll", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", "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": "vmInstanceIDs", "props": [{"type": "array", "name": "instanceIds", "arg": "$vmInstanceIDs.instanceIds", "item": {"type": "string"}}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200]}, {"statusCode": [202], "header": {"items": [{"name": "Location"}, {"name": "Retry-After"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "confirmation": ""}]}]} \ No newline at end of file diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.xml b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.xml new file mode 100644 index 000000000..b3db68d22 --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3JlaW1hZ2VhbGw=/2024-11-01.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + +
+
+
+
+