@@ -526,11 +526,16 @@ def _fetch_compatible_windows_os_urn_v2(source_vm):
526526
527527
528528def _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
529531 image_lookup = {
530532 'rhel7' : 'RedHat:rhel-raw:7-raw:latest' ,
531533 'rhel8' : 'RedHat:rhel-raw:8-raw:latest' ,
534+ 'rhel9' : 'RedHat:rhel-raw:9-raw:latest' ,
532535 'ubuntu18' : 'Canonical:UbuntuServer:18.04-LTS:latest' ,
533536 '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' ,
534539 'centos6' : 'OpenLogic:CentOS:6.10:latest' ,
535540 'centos7' : 'OpenLogic:CentOS:7_9:latest' ,
536541 'centos8' : 'OpenLogic:CentOS:8_4:latest' ,
@@ -547,16 +552,20 @@ def _select_distro_linux(distro):
547552 os_image_urn = distro
548553 else :
549554 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 "
551556 return os_image_urn
552557
553558
554559def _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
555562 image_lookup = {
556563 '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' ,
558565 'ubuntu18' : 'Canonical:UbuntuServer:18_04-lts-arm64:latest' ,
559566 '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' ,
560569 'centos7' : 'OpenLogic:CentOS:7_9-arm64:latest' ,
561570 }
562571 if distro in image_lookup :
@@ -567,23 +576,27 @@ def _select_distro_linux_Arm64(distro):
567576 os_image_urn = distro
568577 else :
569578 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"
571580 return os_image_urn
572581
573582
574583def _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
576586 image_lookup = {
577587 'rhel7' : 'RedHat:rhel-raw:7-raw-gen2:latest' ,
578588 'rhel8' : 'RedHat:rhel-raw:8-raw-gen2:latest' ,
589+ 'rhel9' : 'RedHat:rhel-raw:9-raw-gen2:latest' ,
579590 'ubuntu18' : 'Canonical:UbuntuServer:18_04-lts-gen2:latest' ,
580591 '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' ,
581594 'centos7' : 'OpenLogic:CentOS:7_9-gen2:latest' ,
582595 'centos8' : 'OpenLogic:CentOS:8_4-gen2:latest' ,
583596 'oracle7' : 'Oracle:Oracle-Linux:ol79-gen2:latest' ,
584597 'oracle8' : 'Oracle:Oracle-Linux:ol82-gen2:latest' ,
585598 'sles12' : 'SUSE:sles-12-sp5:gen2:latest' ,
586- 'sles15' : 'SUSE:sles-15-sp3 :gen2:latest' ,
599+ 'sles15' : 'SUSE:sles-15-sp6 :gen2:latest' ,
587600 }
588601 if distro in image_lookup :
589602 os_image_urn = image_lookup [distro ]
@@ -594,10 +607,10 @@ def _select_distro_linux_gen2(distro):
594607 os_image_urn = distro
595608 else :
596609 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"
598611 else :
599612 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"
601614 return os_image_urn
602615
603616
@@ -809,4 +822,4 @@ def _make_public_ip_name(repair_vm_name, associate_public_ip):
809822 public_ip_name = '""'
810823 if associate_public_ip :
811824 public_ip_name = repair_vm_name + "PublicIP"
812- return public_ip_name
825+ return public_ip_name
0 commit comments