Skip to content

[Backup] az backup restore restore-disks: Add new parameter --cvm-os-des-id to specify the Disk Encryption Set ID to use for OS disk encryption#31853

Merged
zhoxing-ms merged 6 commits intoAzure:devfrom
SourabhSomnathGholap:users/sgholap/SecuredVMOsDiskEncryptionSetId
Jul 24, 2025
Merged

[Backup] az backup restore restore-disks: Add new parameter --cvm-os-des-id to specify the Disk Encryption Set ID to use for OS disk encryption#31853
zhoxing-ms merged 6 commits intoAzure:devfrom
SourabhSomnathGholap:users/sgholap/SecuredVMOsDiskEncryptionSetId

Conversation

@SourabhSomnathGholap
Copy link
Contributor

@SourabhSomnathGholap SourabhSomnathGholap commented Jul 21, 2025

Related command

az backup restore restore-disks

Description

In this PR new optional parameter --cvm-os-des-id is added. This parameter will take DES id as input and use that for encrypting OS disk restored confidential VM.

Testing Guide

History Notes

[Backup] az backup restore restore-disks: Add new parameter --cvm-os-des-id to specify the Disk Encryption Set ID to use for OS disk encryption


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

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 21, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

@azure-client-tools-bot-prd
Copy link

Hi @SourabhSomnathGholap,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 21, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️backup
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd backup restore restore-disks cmd backup restore restore-disks added parameter cvm_os_des_id

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 21, 2025

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

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@microsoft-github-policy-service microsoft-github-policy-service bot added the Auto-Assign Auto assign by bot label Jul 21, 2025
@SourabhSomnathGholap SourabhSomnathGholap changed the title [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-disk-encryption-set-id [Backup] 'az backup restore restore-disks': Add new optional parameter '--cvm-os-disk-encryption-set-id' Jul 21, 2025
@SourabhSomnathGholap SourabhSomnathGholap changed the title [Backup] 'az backup restore restore-disks': Add new optional parameter '--cvm-os-disk-encryption-set-id' [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-disk-encryption-set-id Jul 21, 2025
@SourabhSomnathGholap SourabhSomnathGholap changed the title [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-disk-encryption-set-id [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-des-id Jul 22, 2025
Copy link
Contributor

@zubairabid zubairabid left a comment

Choose a reason for hiding this comment

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

Some code cleanup suggestions for maintaining whatever consistency we can with this codebase. Add some sort of test as well.

@SourabhSomnathGholap SourabhSomnathGholap marked this pull request as ready for review July 22, 2025 09:57
Copilot AI review requested due to automatic review settings July 22, 2025 09:57
Copy link
Contributor

Copilot AI left a 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 a new optional parameter --cvm-os-des-id to the az backup restore restore-disks command to enable disk encryption set specification for OS disk encryption of Confidential VMs during restore operations.

  • Adds new parameter cvm_os_des_id to restore_disks function signatures
  • Implements logic to set SecuredVMDetails when the parameter is provided
  • Configures command line argument with appropriate help text and aliases

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
custom_base.py Adds cvm_os_des_id parameter to restore_disks function signature
custom.py Implements the core logic for handling CVM OS disk encryption and adds SecuredVMDetails import
_params.py Defines the command line argument with help text and aliases

@SourabhSomnathGholap SourabhSomnathGholap changed the title [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-des-id [Backup] 'az backup restore restore-disks: Add new optional parameter --cvm-os-des-id ` Jul 23, 2025
@SourabhSomnathGholap SourabhSomnathGholap changed the title [Backup] 'az backup restore restore-disks: Add new optional parameter --cvm-os-des-id ` [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-des-id Jul 23, 2025
@zhoxing-ms zhoxing-ms changed the title [Backup] az backup restore restore-disks: Add new optional parameter --cvm-os-des-id [Backup] az backup restore restore-disks: Add new parameter --cvm-os-des-id to specify the Disk Encryption Set ID to use for OS disk encryption Jul 24, 2025
@zhoxing-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@zhoxing-ms zhoxing-ms merged commit 581cb90 into Azure:dev Jul 24, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Backup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments