@@ -526,11 +526,16 @@ def _fetch_compatible_windows_os_urn_v2(source_vm):
526
526
527
527
528
528
def _select_distro_linux (distro ):
529
+ # list of images needs to be added to before the docs reflect, and the docs need to remove the keywords long before we remove the reference from the extension
530
+ # https://learn.microsoft.com/cli/azure/vm/repair?view=azure-cli-latest#az-vm-repair-create-optional-parameters
529
531
image_lookup = {
530
532
'rhel7' : 'RedHat:rhel-raw:7-raw:latest' ,
531
533
'rhel8' : 'RedHat:rhel-raw:8-raw:latest' ,
534
+ 'rhel9' : 'RedHat:rhel-raw:9-raw:latest' ,
532
535
'ubuntu18' : 'Canonical:UbuntuServer:18.04-LTS:latest' ,
533
536
'ubuntu20' : 'Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest' ,
537
+ 'ubuntu22' : 'Canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest' ,
538
+ 'ubuntu24' : 'Canonical:ubuntu-24_04-lts:server-gen1:latest' ,
534
539
'centos6' : 'OpenLogic:CentOS:6.10:latest' ,
535
540
'centos7' : 'OpenLogic:CentOS:7_9:latest' ,
536
541
'centos8' : 'OpenLogic:CentOS:8_4:latest' ,
@@ -547,16 +552,20 @@ def _select_distro_linux(distro):
547
552
os_image_urn = distro
548
553
else :
549
554
logger .info ('No specific distro was provided , using the default Ubuntu distro' )
550
- os_image_urn = "Ubuntu2204 "
555
+ os_image_urn = "Canonical:ubuntu-24_04-lts:server-gen1:latest "
551
556
return os_image_urn
552
557
553
558
554
559
def _select_distro_linux_Arm64 (distro ):
560
+ # list of images needs to be added to before the docs reflect, and the docs need to remove the keywords long before we remove the reference from the extension
561
+ # https://learn.microsoft.com/cli/azure/vm/repair?view=azure-cli-latest#az-vm-repair-create-optional-parameters
555
562
image_lookup = {
556
563
'rhel8' : 'RedHat:rhel-arm64:8_8-arm64-gen2:latest' ,
557
- 'rhel9' : 'RedHat:rhel-arm64:9_2 -arm64:latest' ,
564
+ 'rhel9' : 'RedHat:rhel-arm64:9_3 -arm64:latest' ,
558
565
'ubuntu18' : 'Canonical:UbuntuServer:18_04-lts-arm64:latest' ,
559
566
'ubuntu20' : 'Canonical:0001-com-ubuntu-server-focal:20_04-lts-arm64:latest' ,
567
+ 'ubuntu22' : 'Canonical:0001-com-ubuntu-server-jammy:22_04-lts-arm64:latest' ,
568
+ 'ubuntu24' : 'Canonical:ubuntu-24_04-lts:server-arm64:latest' ,
560
569
'centos7' : 'OpenLogic:CentOS:7_9-arm64:latest' ,
561
570
}
562
571
if distro in image_lookup :
@@ -567,23 +576,27 @@ def _select_distro_linux_Arm64(distro):
567
576
os_image_urn = distro
568
577
else :
569
578
logger .info ('No specific distro was provided , using the default ARM64 Ubuntu distro' )
570
- os_image_urn = "Canonical:UbuntuServer:18_04- lts-arm64:latest"
579
+ os_image_urn = "Canonical:ubuntu-24_04- lts:server -arm64:latest"
571
580
return os_image_urn
572
581
573
582
574
583
def _select_distro_linux_gen2 (distro ):
575
- # base on the document : https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2#generation-2-vm-images-in-azure-marketplace
584
+ # list of images needs to be added to before the docs reflect, and the docs need to remove the keywords long before we remove the reference from the extension
585
+ # https://learn.microsoft.com/cli/azure/vm/repair?view=azure-cli-latest#az-vm-repair-create-optional-parameters
576
586
image_lookup = {
577
587
'rhel7' : 'RedHat:rhel-raw:7-raw-gen2:latest' ,
578
588
'rhel8' : 'RedHat:rhel-raw:8-raw-gen2:latest' ,
589
+ 'rhel9' : 'RedHat:rhel-raw:9-raw-gen2:latest' ,
579
590
'ubuntu18' : 'Canonical:UbuntuServer:18_04-lts-gen2:latest' ,
580
591
'ubuntu20' : 'Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latest' ,
592
+ 'ubuntu22' : 'Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latest' ,
593
+ 'ubuntu24' : 'Canonical:ubuntu-24_04-lts:server:latest' ,
581
594
'centos7' : 'OpenLogic:CentOS:7_9-gen2:latest' ,
582
595
'centos8' : 'OpenLogic:CentOS:8_4-gen2:latest' ,
583
596
'oracle7' : 'Oracle:Oracle-Linux:ol79-gen2:latest' ,
584
597
'oracle8' : 'Oracle:Oracle-Linux:ol82-gen2:latest' ,
585
598
'sles12' : 'SUSE:sles-12-sp5:gen2:latest' ,
586
- 'sles15' : 'SUSE:sles-15-sp3 :gen2:latest' ,
599
+ 'sles15' : 'SUSE:sles-15-sp6 :gen2:latest' ,
587
600
}
588
601
if distro in image_lookup :
589
602
os_image_urn = image_lookup [distro ]
@@ -594,10 +607,10 @@ def _select_distro_linux_gen2(distro):
594
607
os_image_urn = distro
595
608
else :
596
609
logger .info ('The provided URN does not contain Gen2 in it and this VM is a gen2 , dropping to default image' )
597
- os_image_urn = "Canonical:UbuntuServer:18_04-lts-gen2 :latest"
610
+ os_image_urn = "Canonical:ubuntu-24_04-lts:server :latest"
598
611
else :
599
612
logger .info ('No specific distro was provided , using the default Ubuntu distro' )
600
- os_image_urn = "Canonical:UbuntuServer:18_04-lts-gen2 :latest"
613
+ os_image_urn = "Canonical:ubuntu-24_04-lts:server :latest"
601
614
return os_image_urn
602
615
603
616
@@ -809,4 +822,4 @@ def _make_public_ip_name(repair_vm_name, associate_public_ip):
809
822
public_ip_name = '""'
810
823
if associate_public_ip :
811
824
public_ip_name = repair_vm_name + "PublicIP"
812
- return public_ip_name
825
+ return public_ip_name
0 commit comments