![]() ![]() Otherwise, you can use az vm repair list-scripts to see available repair scripts. If the troubleshooting guide you are using specified a run-id, use it here. This command will run the specified repair script on the attached disk via the repair VM. Repair VM with Nested Hyper-V example az vm repair create -g MyResourceGroup -n myVM -repair-username username -repair-password 'password!234' -enable-nested -verbose Repair VM example az vm repair create -g MyResourceGroup -n myVM -repair-username username -repair-password 'password!234' -verbose The run and restore commands will require all inputs to be entered using the same case as used in the create command, make note or refer to the tags on the repair VM to see what was used. If you need to troubleshoot your VM in a nested Hyper-V environment, use -enable-nested and the repair VM will created with the Hyper-V role enabled along with a nested VM using the OS disk copy. For more information, see confirm that ADE is enabled on the disk. If your VM is using Azure Disk Encryption, use -unlock-encrypted-vm to unlock the encrypted disk so that it is accessible when attached to the repair VM. The Resource Group and VM name used in all steps will be for the non-functional VM. The repair VM will be the same size and region as the non-functional VM specified. This command will create a copy of the OS disk for the non-functional VM, create a repair VM in a new Resource Group, and attach the OS disk copy. If you have previously used the az vm repair commands, apply any updates to the vm-repair extension. If this is the first time you have used the az vm repair commands, add the vm-repair CLI extension. To switch between subscriptions associated with your account you can use az account set -subscription az account set reference. If you need to login to Cloud Shell with a different account than you are currently logged in to the Azure portal with you can use az login az login reference. If you need to install or upgrade your Azure CLI, see Install Azure CLI. If you prefer to install and use the CLI locally, this quickstart requires Azure CLI version 2.0.67 or later. Select Copy to copy the blocks of code, then paste the code into the Cloud Shell, and select Enter to run it. You can also open Cloud Shell in a separate browser tab by visiting. To open the Cloud Shell, select Try it from the upper-right corner of a code block. To run the commands locally, Azure CLI version 2.0.67 or later version is required. If you run a script that will take longer than 20 minutes (for example: win-sfc-sf-corruption script), you may prefer to run the commands locally. It includes common Azure tools preinstalled and configured to use with your account. The Azure Cloud Shell is a free interactive shell that you can use to run the steps in this article. To run the commands, you need a role that can create the following types of resources in the subscription: To view all available VM repair commands and parameters, see az vm repair. Run az vm repair run, or perform mitigation steps.You can now use Azure VM repair commands to change the OS disk for a VM, and you no longer need to delete and recreate the VM.įollow these steps to troubleshoot the VM issue: For VMs using Azure Disk Encryption, only managed disks encrypted with single pass encryption (with or without KEK) are supported.The tags are neccessary for the restore command to function correctly. Do not modify the tags that are created on the repair VM.The maximum time a script can run is 90 minutes, after which it will time out.Outbound connectivity from the VM (port 443) is required for the script to run.The scripts in this article only apply to the VMs that use Azure Resource Manager. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |