question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confidential Compute CLI Change Request - VM / VMSS Create

See original GitHub issue

Is your feature request related to a problem? Please describe

No, feature request to add new parameters and add values into existing parameters for following commands to support Confidential VM - Planned GA by end of June CY22:

Feature request is to support customer with:

  • creation of Confidential VM as single instance and VMSS.
  • flexibility to define encryption type for managed OS disk and choose between Platform-managed keys or customer-managed keys.

Describe the solution you’d like

Customer to use az vm create command with parameter –security-type to set VM security type. For confidential VM, accepted security type should be ConfidentialVM

Customer to use az vmss create command with parameter –security-type to set VMSS security type. For confidential VM, additional accepted security type should be ConfidentialVM

Existing Parameters

–security-type

Currently –security-type supports value of TrustedLaunch. Post change, following values will be accepted:

Security-Type
TrustedLaunch
ConfidentialVM

New Parameters

Request to include below new parameters into commands az vm create and az vmss create

–os-disk-security-encryption-type

New Parameter –os-disk-security-encryption-type:

  • Allows customer to provide encryption type details for Confidential VM:
    • Platform Managed Key (PMK)
    • Customer Managed Key (CMK)
    • VM Guest State Only with PMK (VMGS Only PMK)
  • This parameter will be mandatory if –security-type is set to ConfidentialVM.
  • List of Allowed values with description below
os-disk-security-encryption-type Description
VMGuestStateOnly Encryption Type VM Guest State Only with PMK (VMGS Only PMK)
DiskwithVMGuestState Encryption Type Platform Managed Key (PMK)

–os-disk-secure-vm-disk-encryption-set

New Parameter –os-disk-secure-vm-disk-encryption-set:

  • Allows customer to provide ARM ID for Disk Encryption Set created with ConfidentialVmEncryptedWithCustomerKey encryption type. This will allow customer to use Customer Managed Key (CMK) encryption.
  • New parameter –os-disk-security-encryption-type value should be DiskwithVMGuestState.

End to End Usage

Scenario 1 - Create New VM

  1. Store Subnet ID in variable:

    subnetId=$(az network vnet subnet show -g $rgName -n MySubnet --vnet-name $vNetName --query [id] -o tsv)

  2. Store Disk Encryption Set ID in variable:

    diskEncryptionSetId=$(az disk-encryption-set show -n $diskEncryptionSetName -g $rgName --query [id] -o tsv)

  3. Create Virtual Machine with ConfidentialVM Security Type

    az vm create -n $vmName -g $rgName -l $location \
        --size "Standard_DC2as_v5" --admin-username MyUserName --admin-password MyPassword \
        --subnet $subnetId --security-type ConfidentialVM \
        --os-disk-security-encryption-type DiskwithVMGuestState \
        --os-disk-secure-vm-disk-encryption-set $diskEncryptionSetId \
        --image "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest" \
        --enable-vtpm true --enable-secure-boot true
    

Scenario 2 - Create new VMSS

  1. Store Subnet ID in variable:

    subnetId=$(az network vnet subnet show -g $rgName -n MySubnet --vnet-name $vNetName --query [id] -o tsv)

  2. Store Disk Encryption Set ID in variable:

    diskEncryptionSetId=$(az disk-encryption-set show -n $diskEncryptionSetName -g $rgName --query [id] -o tsv)

  3. Create Virtual Machine Scale Set with ConfidentialVM Security Type

    az vmss create -n $vmssName -g $rgName -l $location \
        --vm-sku "Standard_DC2as_v5" --admin-username MyUserName --admin-password MyPassword \
        --subnet $subnetId --security-type ConfidentialVM \
        --os-disk-security-encryption-type DiskwithVMGuestState \
        --os-disk-secure-vm-disk-encryption-set $diskEncryptionSetId \
        --image "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest" \
        --enable-vtpm true --enable-secure-boot true
    

Describe alternatives you’ve considered

Not Applicable, new product feature request.

Additional context

Request for Confidential VM - Planned GA by end of June CY22

Additional Checks

When –security-type is set to ConfidentialVM:

Contacts

Role Contact
Main developer contacts (emails + github aliases) Abhishek Verma (AZURE) Abhishek.Verma@microsoft.com, Anshul Solanki Anshul.Solanki@microsoft.com
PM contact (email + github alias) Ajay Kundnani ajay.kundnani@microsoft.com
Other people who should attend a design review (email) Run Cai run.cai@microsoft.com, Deepak J V J.Deepak@microsoft.com

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
AjKundnanicommented, Jun 22, 2022

But the CMK for DiskWithVMGuestState for VMSS is blocked in the current CRP changes present in Canary and Prod, and should be enabled in next rollout, as the changes are checked-

@zhoxing-ms - It is in line with expectations, yes. As these capabilities will be enabled in near future. We will have to document in such way that end user knows for VMSS what the available deployment options are.

1reaction
zhoxing-mscommented, Jun 16, 2022

@AjKundnani In this case, the user can only pass in the ID, and we cannot support the name from different resource group

The resource group used by DES is from --resource-group parameter

--os-disk-encryption-set parameter is this logic, the new parameter can be consistent with it

Read more comments on GitHub >

github_iconTop Results From Across the Web

az vmss | Microsoft Learn
Run 'az vmss update-instances' command to roll out the changes to VMs if you have not configured upgrade policy. az vmss update-instances.
Read more >
Set custom metadata - Compute Engine - Google Cloud
In the Google Cloud console, go to the Create an instance page. ... Under Custom metadata, click Add item or edit the existing...
Read more >
Command-line interface | Citrix Hypervisor 8.2
The xe CLI enables you to script and automate system administration tasks. Use the CLI to integrate Citrix Hypervisor into an existing IT...
Read more >
azure-cli-vm 2.2.23 - PyPI
vmss create : warn on upcoming breaking changes on default balancer for scaleset with 100+ instances · vm snapshot/image: support zone resilient ·...
Read more >
azure.azcollection.azure_rm_virtualmachinescaleset module
Create and update a virtual machine scale set. ... The usage did not change. ... When set to cli , the credentials will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found