Skip to content

Commit 381efc4

Browse files
authored
{vm-repair} Overhaul VM Repair examples (#8294)
1 parent 416af7b commit 381efc4

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

src/vm-repair/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Release History
33
===============
44

5+
2.0.2
6+
++++++
7+
Updated parameter descriptions and examples for `az vm repair create`.
8+
59
2.0.1
610
++++++
711
Fixed 2 Unbound variable bugs in `vm repair create` and improved the code documentation.

src/vm-repair/azext_vm_repair/_help.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
helps['vm repair'] = """
99
type: group
10-
short-summary: Auto repair commands to fix VMs.
10+
short-summary: Setup repair VMs with copied source OS Disk to resolve issues.
1111
long-summary: |
12-
VM repair command will enable Azure users to self-repair non-bootable VMs by copying the source VM's OS disk and attaching it to a newly created repair VM.
12+
When your VM is non-bootable, VM Repair enables users to setup new repair VMs and copy over the source VM's OS Disk and attach it as a data disk. Then the user can run their own scripts or use [pre-built](https://github.com/Azure/repair-script-library) ones to fix the disk.
1313
"""
1414

1515
helps['vm repair create'] = """
@@ -25,6 +25,18 @@
2525
- name: Create a repair VM of a specific distro or a specific URN could also be provided
2626
text: >
2727
az vm repair create -g MyResourceGroup -n myVM --distro 'rhel7|sles12|ubuntu20|centos6|oracle8|sles15'
28+
- name: Create a repair VM with a Private IP address without any pop up asking for confirmation.
29+
text: >
30+
az vm repair create -g MyResourceGroup -n myVM --yes --repair-username <username> --repair-password <password>
31+
- name: Create a repair VM with a Public IP address without any user input.
32+
text: >
33+
az vm repair create -g MyResourceGroup -n myVM --associate-public-ip --yes --repair-username <username> --repair-password <password>
34+
- name: Create a repair VM with Standard Security type.
35+
text: >
36+
az vm repair create -g MyResourceGroup -n myVM --yes --repair-username <username> --repair-password <password> --disable-trusted-launch
37+
- name: Create a repair VM from a source VM with an encrypted disk. The repair VM is created with the data disk unencrypted and accessible.
38+
text: >
39+
az vm repair create -g MyResourceGroup -n myVM --yes --repair-username <username> --repair-password <password> --unlock-encrypted-vm --encrypt-recovery-key <key>
2840
"""
2941

3042
helps['vm repair restore'] = """

src/vm-repair/azext_vm_repair/_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def load_arguments(self, _):
2929
c.argument('copy_disk_name', help='Name of OS disk copy.')
3030
c.argument('repair_group_name', help='Name for new or existing resource group that will contain repair VM.')
3131
c.argument('unlock_encrypted_vm', help='Option to auto-unlock encrypted VMs using current subscription auth.')
32-
c.argument('encrypt_recovery_key', help='Option to auto-unlock encrypted VMs using provided recovery password.')
32+
c.argument('encrypt_recovery_key', help='Option to auto-unlock encrypted VMs using provided recovery password. The \'--unlock-encrypted-vm\' parameter must be used to use this parameter.')
3333
c.argument('enable_nested', help='enable nested hyperv.')
3434
c.argument('associate_public_ip', help='Option to create a repair vm with a public ip. If this parameter is not used, a private ip will be made.')
3535
c.argument('distro', help='Option to create repair vm from a specific linux distro (rhel7|rhel8|sles12|sles15|ubuntu20|centos7|centos8|oracle7)')

src/vm-repair/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from codecs import open
99
from setuptools import setup, find_packages
1010

11-
VERSION = "2.0.1"
11+
VERSION = "2.0.2"
1212

1313
CLASSIFIERS = [
1414
'Development Status :: 4 - Beta',

0 commit comments

Comments
 (0)