Azure / Azure/azure-powershell

[Feature]: Enable support for Importing TrustedLaunch/VM Guest State VHDs

Open
#25,077 3 comments 0 reactions 2 assignees Claimed by @ushnaarshadkhan View on GitHub
act-observability-squad Compute customer-reported feature-request Gap - CLI Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description of the new feature

Basically the request is to have feature parity with the AZ CLI which introduced a similar change 2 years ago (Scenario 2) https://github.com/Azure/azure-cli/issues/22275

I would like to be able to export a TrustedLaunch VM and then be able to import the VM again. Our use case is for (cheap) long term archival of decommissioned VMs (some have to be kept around for 10 or so years in case there is a legal dispute or financial auditing etc)

With the latest release of Az.Compute it looks like we can export the VM Guest State VHD so the only missing feature is now the ability to import the Guest State as part of the OS Disk creation.

I am currently having to do this through the AZ CLI as it doesn't appear that New-AzDiskConfig or New-AzDisk offer the parameters equivalent to --security-data-uri and --security-type
`$OSDiskImport = az disk create --name $OSDiskName --resource-group $ResourceGroupName --sku "StandardSSD_LRS" --location $Location --source $OSDiskUri --source-storage-account-id $StorageAccount.Id --security-data-uri $VMStateDiskUri --security-type TrustedLaunch --hyper-v-generation V2 --os-type Windows`

### Proposed implementation details (optional)

In my mind the easiest approach would be to copy the AZ CLI parameters with more PowerShell like names such as -SecurityDataUri and -SecurityType which has an enum with Trustedlaunch and Standard if Confidential computing types aren't going to be supported

I would assume that these map back to existing REST APIs/Interfaces if the AZ CLI is already using them

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.