I am using V2V converter to convert a local VMDK image to Azure, and the Generation is not set, which defaults to Gen 1. The source VMDK is UEFI, so the resulting Azure VM doesn't boot.
I have read in other posts that the Generation of the VM is supposed to be detected automatically, but that doesn't seem to be working in this case. Maybe it is because I am using a local VDMK image as the source (I'm not using an ESXi Server as the source)? Maybe it is because V2V Converter doesn't know how to set the Generation on the Azure side?
There needs to be a configuration option in V2V Converter to set the Generation of the Azure destination Disk
While I'm at it, the name of the managed disk in Azure is terrible. I have the opportunity to set the name of the VDH file that goes in the Blob, but no control of the managed disk that is attached to the VM, that uses the underlying VHD file.
--- A little more information on my process ---
My VMware Datastores are replicated to Azure via software from the Storage Provider.
I'm trying to do a Proof of Concept for DR, where I access the replicated VM in Azure and convert it to run in native Azure format.
I won't have access to an ESXi server in DR in Azure. Technically I could run VMware in Azure, but that is expensive.
I have created a native Azure VM to use for conversion/jumpbox.
I am able to retrieve a VMDK image from the Azure copy of the Datastore, and save it locally on the jumpbox.
I am able to use V2V Converter to convert the local VMDK to Azure, but it won't boot (because it is Gen 1 in Azure).
--- Additional testing information ---
I have also done some testing on a PC in the office.
In the office, I am able to convert a local VMDK to a local VHD.
With a little magic, I am able to upload the VHD to Azure (as Gen 2), create an Azure VM, and get it to boot in Azure.
Unfortunately, my magic doesn't work on the Azure jumpbox because the converted VHD needs to be resized and I can't install HyperV tools in an Azure VM.
--- A little more information about the magic of uploading to Azure ---
https://docs.microsoft.com/en-us/azure/ ... powershell
# Install Azure Powershell
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
# Install only the PowerShell module
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell
Connect-AzAccount
$pathToConvertedVM = "C:\scripts\HyperV\Azure.v2\convertedVM1_2.vhd"
$rgName = 'resourceGroupName'
$managedDiskName = 'convertedVM1v2'
#$vhdSizeBytes = (Get-Item $pathToConvertedVM).length - 512
$vhdSizeBytes = (Get-Item $pathToConvertedVM).length
$vhdSizeBytes / 1MB
# The answer to vhdsize / 1 MB needs to be a whole number.
# if is it not a whole number, it needs to be resized to a whole number (Hyper-V tools need to be installed to resize).
# Example, vhd size is 102400.000488281 MB - it needs to be resized to 102410 MB (went a little bigger just to make sure)
Resize-VHD -Path C:\scripts\HyperV\adfscli.Azure.v2\adfscli1_2.vhd -SizeBytes 102410MB
$diskconfig = New-AzDiskConfig -SkuName 'Standard_LRS' -OsType 'Windows' -UploadSizeInBytes $vhdSizeBytes -Location 'canadacentral' -CreateOption 'Upload' -HyperVGeneration V2
New-AzDisk -ResourceGroupName $rgName -DiskName $managedDiskName -Disk $diskconfig
$diskSas = Grant-AzDiskAccess -ResourceGroupName $rgName -DiskName $managedDiskName -DurationInSecond 86400 -Access 'Write'
$disk = Get-AzDisk -ResourceGroupName $rgName -DiskName $managedDiskName
C:\scripts\HyperV\AzCopy.exe copy $pathToConvertedVM $diskSas.AccessSAS --blob-type PageBlob
Revoke-AzDiskAccess -ResourceGroupName $rgName -DiskName $managedDiskName
--- Properties of the AzDisk on Azure, created by V2V Converter ---
--- Note that the HyperVGeneration property is not set (null), which defaults to Gen 1 ---
PS C:\WINDOWS\system32> Get-AzDisk -ResourceGroupName resourceGroupName -DiskName OS_Disk_5908594670418047227
ResourceGroupName : resourceGroupName
ManagedBy :
ManagedByExtended : {}
Sku : Microsoft.Azure.Management.Compute.Models.DiskSku
Zones :
TimeCreated : 2021-10-02 2:15:07 PM
OsType : Windows
HyperVGeneration :
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 100
DiskSizeBytes : 107374182400
UniqueId : d03b6d33-unique-id-5555-2cd1b5dce7f7
EncryptionSettingsCollection :
ProvisioningState : Succeeded
DiskIOPSReadWrite : 500
DiskMBpsReadWrite : 60
DiskIOPSReadOnly :
DiskMBpsReadOnly :
DiskState : Unattached
Encryption : Microsoft.Azure.Management.Compute.Models.Encryption
MaxShares :
ShareInfo : {}
Id : /subscriptions/210fa214-subscription-id-5555-d7ffb6e0af13/resourceGroups/resourceGroupName/providers/Micr
osoft.Compute/disks/OS_Disk_5908594670418047227
Name : OS_Disk_5908594670418047227
Type : Microsoft.Compute/disks
Location : canadacentral
ExtendedLocation :
Tags : {}
NetworkAccessPolicy : AllowAll
DiskAccessId :
Tier :
BurstingEnabled :
PurchasePlan :
SupportsHibernation :
SecurityProfile :
The Latest Gartner® Magic Quadrant™Hyperconverged Infrastructure Software