ubuntu-server-container image does not support generation 2 VMs
Problem Description
Trying to create a pool using generation 2 VM and "ubuntu-server-container" image results in error "The selected VM size ... cannot boot Hypervisor Generation '1'."
Steps to Reproduce
Try to create pool using image reference ("ubuntu-server-container", "microsoft-azure-batch", "20-04-lts", "latest") and one of the generation 2 VMs, such as Standard_DC2s_v2. The pool also has non-null ContainerConfiguration.
Expected Results
Successful pool creation
Actual Results
Error: BadRequest Message: The selected VM size 'STANDARD_DC2s_V2' cannot boot Hypervisor Generation '1'. If this was a Create operation please check that the Hypervisor Generation of the Image matches the Hypervisor Generation of the selected VM Size. If this was an Update operation please select a Hypervisor Generation '1' VM Size.
Additional Logs
Additonal Comments
Are you going to refresh the ubuntu-server-container and add this support, or should we switch to different image?
This is an issue we are aware of, for now, the image is only available on gen1 machines but we are talking internally about gen2 support either through this image or the Azure HPC image.
I believe in the mean time you can use the Ubuntu HPC image provided by Azure, this image has container support, gpu drivers, infiniband drivers (where applicable), and is gen2.
$ az vm image show --urn microsoft-dsvm:ubuntu-hpc:2004:latest | grep hyperVGeneration "hyperVGeneration": "V2",
Please see the above recommendation, we do not plan on providing a gen2 image and will be migrating support to the official HPC images going forward.