Thanks.
Got it - no architecture nor generation settings in snapshots, this has been helpful.
This leads me into my next challenge.
What I have done is to perform a disk dump of an ARM64 based DPDK firewall image to an unmanaged disk. I want to turn this disk into a VM.
To do this, I use the following method:
If we go back to when I did this for x64 based arch VMs, I used this method successfully to create a snapshot from the disk, and the snapshot is in the next step converted to an Image - and from the Image I can build the VM. This works well with x64 but I cannot use the same method with ARM64 because I have not found a way to insert an architecture parameter.
To do this, I use this guide + PowerShell (this section: Create a managed image from a snapshot using PowerShell) - https://learn.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource
What I have is (I modified New-AzImageConfig to add gen 2 parameter) :
$rgName = "Diskwriter_group"
$location = "NorthEurope"
$snapshotName = "vendor-ARM"
$imageName = "vendorARM"
$snapshot = Get-AzSnapshot -ResourceGroupName $rgName -SnapshotName $snapshotName
$imageConfig = New-AzImageConfig -Location $location -HypervGeneration V2
$imageConfig = Set-AzImageOsDisk -Image $imageConfig -OsState Generalized -OsType Linux -SnapshotId $snapshot.Id
New-AzImage -ImageName $imageName -ResourceGroupName $rgName -Image $imageConfig
Here I assume the I must somehow add a parameter to change architecture from x64 to ARM64 somewhere - or to do this with some other method? When I run this, I get an image that is gen2 - and this is shown upon completion.
ResourceGroupName : Diskwriter_group
SourceVirtualMachine :
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
HyperVGeneration : V2
Id : /subscriptions/x/resourceGroups/Diskwriter_group/providers/Microsoft.Compute/images/vendorARM
Name : vendorARM
Type : Microsoft.Compute/images
Location : northeurope
ExtendedLocation :
Tags : {}
Subsequently, using this image results in ARM64 being greyed out upon VM creation since ARM64 is not set on the image when I do this
Questions based on this:
Is there any way to do this image creation with PowerShell where architecture can be specified when building the image - I see no architecture option in New-AzImageConfig that I use https://learn.microsoft.com/en-us/powershell/module/az.compute/new-azimageconfig?view=azps-8.3.0?
Maybe there is a better / different way to achieve the same result (custom VM with ARM64 arch set combined with Gen2) from a Linux based image?
Thanks!