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 bitlocker key #7815

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

vm repair bitlocker key #7815

wants to merge 4 commits into from

Conversation

corsini-msft
Copy link


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copy link

azure-client-tools-bot-prd bot commented Jul 22, 2024

⚠️Azure CLI Extensions Breaking Change Test
⚠️vm-repair
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vm repair create cmd vm repair create added parameter encrypted_vm_recovery_password

Copy link

Hi @corsini-msft,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 22, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jul 22, 2024
Copy link

⚠️ Release Suggestions

Module: vm-repair

  • ⚠️ Please log updates into to src/vm-repair/HISTORY.rst
  • Update VERSION to 1.1.0 in src/vm-repair/setup.py

Notes

  • Stable/preview tag is inherited from last release. If needed, please add stable/preview label to modify it.
  • Major/minor/patch/pre increment of version number is calculated by pull request code changes automatically. If needed, please add major/minor/patch/pre label to adjust it.
  • For more info about extension versioning, please refer to Extension version schema

# Unlocks the disk using the phasephrase and mounts it on the repair VM.
WINDOWS_RUN_SCRIPT_NAME = 'win-mount-encrypted-disk.ps1'
return _invoke_run_command(WINDOWS_RUN_SCRIPT_NAME, repair_vm_name, repair_group_name, False)
BITLOCKER_RECOVERY_PARAMS = None
if encrypted_vm_recovery_password is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps "if encrypted_vm_recovery_password is not None:"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in latest.

@@ -29,7 +32,8 @@ if ($bekFile)
$bekFilePath = $bekFile.FullName
Write-Output "Found $bekFilePath"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain me this logic bit? What if there is no bek file and there is no bit locker key. Else is removed.
Also when bitlocker key is set then this should be null $bekPartition.DriveLetter?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is largely fixed in latest push. Added elseif statements for when bitlockerkey is provided, and moved the logic to fetch the bek file into an early if block before the unlock-bitlocker cmd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants