summary import { Image , ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createAVirtualMachineImageThatIncludesADataDiskFromABlob ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const imageName = "myImage" ; const parameters = { location : "West US" , storageProfile : { dataDisks : [ { blobUri : "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd" , lun : 1 } ] , osDisk : { blobUri : "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" , osState : "Generalized" , osType : "Linux" } , zoneResilient : false } } ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . images . beginCreateOrUpdateAndWait ( resourceGroupName , imageName , parameters ) ; console . log ( result ) ; } createAVirtualMachineImageThatIncludesADataDiskFromABlob ( ) . catch ( console . error ) ;