-
Notifications
You must be signed in to change notification settings - Fork 4k
[Az.Migrate] To Azure Local - additional validations #28183
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
base: main
Are you sure you want to change the base?
[Az.Migrate] To Azure Local - additional validations #28183
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving with suggestion, we should try to accommodate other guest os type to provided as param from user if he knows the flavor is linux, if tools are not installed we should throw warning not failure, as its not blocker for migration business.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds additional validations and parameter enhancements for the Azure Migrate "To Azure Local" functionality. The changes focus on improving error handling, validation logic, and adding OS type specification capabilities.
Key changes include:
- Added
-OsType
parameter toSet-AzMigrateLocalServerReplication
for user-specified OS type - Enhanced Arc Resource Bridge validation with clearer error messages
- Improved RunAsAccount retrieval logic for both Hyper-V and VMware scenarios
- Updated validation messages to be more informative and actionable
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
Set-AzMigrateLocalServerReplication.ps1 | Added OsType parameter with validation and integration into update logic |
Start-AzMigrateLocalServerMigration.ps1 | Enhanced Arc Resource Bridge validation and refactored parameter handling |
New-AzMigrateLocalServerReplication.ps1 | Improved RunAsAccount retrieval and replaced cluster validation with Arc Resource Bridge checks |
CommonHelper.ps1 | Updated validation logic and renamed function for better clarity |
AzLocalCommonSettings.ps1 | Enhanced error messages and added Arc Resource Bridge validation messages |
*.md files | Updated documentation to reflect new OsType parameter |
README.md | Modified directive configuration for HyperV operations |
Start-AzMigrateLocalServerMigration.Tests.ps1 | Added LiveOnly tag to test |
Comments suppressed due to low confidence (1)
src/Migrate/Migrate.Autorest/custom/Helper/CommonHelper.ps1:40
- The function name 'GetARGQueryForArcResourceBridge' uses inconsistent casing. PowerShell convention uses PascalCase with hyphens, so it should be 'Get-ARGQueryForArcResourceBridge' or follow the established pattern in the codebase.
function GetARGQueryForArcResourceBridge {
src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1
Outdated
Show resolved
Hide resolved
src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1
Outdated
Show resolved
Hide resolved
src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1
Outdated
Show resolved
Hide resolved
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
6b54909
to
be29aca
Compare
/azp run azure-powershell - security-tools |
Commenter does not have sufficient privileges for PR 28183 in repo Azure/azure-powershell |
@YanaXu After building the module locally I see that Migrate.sln was automatically updated with some new GUID for Az.Migrate entry. Should I push that change too? ![]() |
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
src/Migrate/Migrate.Autorest/test/Start-AzMigrateLocalServerMigration.Tests.ps1
Show resolved
Hide resolved
Yes, just submit it. |
Hi @minhsuanlee, I see you add a label "Do not merge". I'll keep this PR unmerged till your remove this label. |
Ok. I have also pushed other auto-updated files. Please let me know if any of them should not be included. |
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @minhsuanlee, I've approved this PR. Please feel free to merge it if there are no other changes. |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.