CmdID

CmdID / az / az vm / az vm repair

az vm repair run

Run verified scripts from GitHub on a VM. Azure CLI extensions reference

11 examples 6 options Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Run the script with <run-id> directly on the VM.

az vm repair run -g MyResourceGroup -n MySourceWinVM --run-id win-hello-world --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--verboseIncrease logging verbosity.

Run the script with <run-id> on the linked repair VM.

az vm repair run -g MyResourceGroup -n MySourceWinVM --run-id win-hello-world --run-on-repair --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.
--verboseIncrease logging verbosity.

Run a script with parameters on the VM.

az vm repair run -g MyResourceGroup -n MySourceWinVM --run-id win-hello-world --parameters hello=hi world=earth --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--parametersSpace-separated parameters in the format of '[name=]value'.
--verboseIncrease logging verbosity.

Run a verified script with some parameters. In the first parameter named 'key', only the value 'test' is sent to the script. The second parameter named 'initiator', uses the prefix '++' to send the entire following string 'initiator=selfhelp' to the script.

az vm repair run -g MyResourceGroup -n MySourceWinVM --run-id linux-alar2 --parameters key=test ++initiator=selfhelp --verbose --debugIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--parametersSpace-separated parameters in the format of '[name=]value'.
--verboseIncrease logging verbosity.
--debugIncrease logging verbosity to show all debug logs.

Check whether a Windows guest is ready to boot from an NVMe controller (read-only)

az vm repair run -g MyResourceGroup -n MyBrokenVM --run-id win-detect-nvme-readiness --run-on-repair --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.
--verboseIncrease logging verbosity.

Check whether a Linux guest is ready to boot from an NVMe controller (read-only)

az vm repair run -g MyResourceGroup -n MyBrokenVM --run-id linux-detect-nvme-readiness --run-on-repair --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.
--verboseIncrease logging verbosity.

Report the Windows NVMe boot-driver recovery changes without writing.

az vm repair run -g MyResourceGroup -n MyBrokenVM --run-id win-enable-nvme-boot-driver --run-on-repair --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.
--verboseIncrease logging verbosity.

Repair the Windows NVMe boot-driver configuration after the detector returns NVME_REPAIR_APPLICABLE.

az vm repair run -g MyResourceGroup -n MyBrokenVM --run-id win-enable-nvme-boot-driver --run-on-repair --parameters Mode=Repair --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.
--parametersSpace-separated parameters in the format of '[name=]value'.
--verboseIncrease logging verbosity.

Roll back a Windows NVMe boot-driver repair using the full backup path emitted by Repair.

az vm repair run -g MyResourceGroup -n MyBrokenVM --run-id win-enable-nvme-boot-driver --run-on-repair --parameters Mode=Rollback "BackupFile=<full-path-emitted-by-Repair>" --verboseIdentify
-gName of resource group.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.
--parametersSpace-separated parameters in the format of '[name=]value'.
--verboseIncrease logging verbosity.

Run a local custom script on the VM.

az vm repair run -g MyResourceGroup -n MySourceWinVM --custom-script-file ./file.ps1 --verboseIdentify
-gName of resource group.
--custom-script-fileCustom script file to run on VM.
--verboseIncrease logging verbosity.

Run unverified script from your fork of https://github.com/Azure/repair-script-library

az vm repair run -g MyResourceGroup -n MySourceWinVM --preview "https://github.com/User/repair-script-library/blob/main/map.json" --run-id testIdentify
-gName of resource group.
--previewURL of forked repair script library map.json https://github.com/{user}/repair-script-library/blob/main/map.json.
--run-idUnique run id for run scripts.

Options

6 in the Azure CLI extensions reference
--custom-script-fileCustom script file to run on VM.
--parametersSpace-separated parameters in the format of '[name=]value'.
--previewURL of forked repair script library map.json https://github.com/{user}/repair-script-library/blob/main/map.json.
--repair-vm-idRepair VM resource id.
--run-idUnique run id for run scripts.
--run-on-repairScript will be run on the linked repair VM.