Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{vm-repair} Overhaul VM Repair examples #8294

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions src/vm-repair/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============

2.0.1
++++++
Updated parameter descriptions and examples for `az vm repair create`.

2.0.0
++++++
Changed default VM image to 2022-datacenter-smalldisk for better default security.
Expand Down
16 changes: 14 additions & 2 deletions src/vm-repair/azext_vm_repair/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

helps['vm repair'] = """
type: group
short-summary: Auto repair commands to fix VMs.
short-summary: Setup repair VMs with copied source OS Disk to resolve issues.
long-summary: |
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.
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.
"""

helps['vm repair create'] = """
Expand All @@ -25,6 +25,18 @@
- name: Create a repair VM of a specific distro or a specific URN could also be provided
text: >
az vm repair create -g MyResourceGroup -n myVM --distro 'rhel7|sles12|ubuntu20|centos6|oracle8|sles15'
- name: Create a repair VM with a Private IP address without any pop up asking for confirmation.
text: >
az vm repair create -g MyResourceGroup -n myVM --yes --repair-username <username> --repair-password <password>
- name: Create a repair VM with a Public IP address without any user input.
text: >
az vm repair create -g MyResourceGroup -n myVM --associate-public-ip --yes --repair-username <username> --repair-password <password>
- name: Create a repair VM with Standard Security type.
text: >
az vm repair create -g MyResourceGroup -n myVM --yes --repair-username <username> --repair-password <password> --disable-trusted-launch
- 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.
text: >
az vm repair create -g MyResourceGroup -n myVM --yes --repair-username <username> --repair-password <password> --unlock-encrypted-vm --encrypt-recovery-key <key>
"""

helps['vm repair restore'] = """
Expand Down
2 changes: 1 addition & 1 deletion src/vm-repair/azext_vm_repair/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def load_arguments(self, _):
c.argument('copy_disk_name', help='Name of OS disk copy.')
c.argument('repair_group_name', help='Name for new or existing resource group that will contain repair VM.')
c.argument('unlock_encrypted_vm', help='Option to auto-unlock encrypted VMs using current subscription auth.')
c.argument('encrypt_recovery_key', help='Option to auto-unlock encrypted VMs using provided recovery password.')
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.')
c.argument('enable_nested', help='enable nested hyperv.')
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.')
c.argument('distro', help='Option to create repair vm from a specific linux distro (rhel7|rhel8|sles12|sles15|ubuntu20|centos7|centos8|oracle7)')
Expand Down
2 changes: 1 addition & 1 deletion src/vm-repair/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "2.0.0"
VERSION = "2.0.1"

CLASSIFIERS = [
'Development Status :: 4 - Beta',
Expand Down
Loading