Is it possible to create a Batch pool with a snapshot of a non-generalized VM OSdisk ?

Nils Magne Fossåen 0 Reputation points
2023-01-19T13:20:46.1+00:00

If possible, what are the appropriate steps to do so?

It seems to me that the documentation is split in this, it recommends using Azure Compute Gallery, where it says:

"Batch only supports generalized Shared Images; a specialized Shared Image can't be used to create a pool"

([https://learn.microsoft.com/en-us/azure/batch/batch-sig-images)

But in the documentation for creating a pool with a managed image resource it says:

"To scale Batch pools reliably with a managed image, we recommend creating the managed image using only the first method: using snapshots of the VM's disks."

([https://learn.microsoft.com/en-us/azure/batch/batch-custom-images)

In our use case it would be very beneficial if we could create a VM, install necessary software and drivers, take a snapshot and create the managed disk to create a batch pool from. This way we can continue to keep the VM, and in the future when we do any updates to software or drivers we can just take a new snapshot, create a new managed disk and update the batch pool.

If we are stuck using the Azure Compute Gallery, where it requires generalization, we need to create a whole new VM, install all software and drivers from scratch, generalize it and create the managed disk in Compute Gallery and then update the batch pool. This seems cumbersome.

I guess we could create a VM, create a disk image of the OS disk, then generalize the VM, create another generalized managed disk for Compute Gallery and update the batch pool. Then when we need to update, spin up a VM from the first image, install new software, create another disk image of the OS, then generalize, and so on... still cumbersome.

So hoping taking a snapshot is possible in the situation.

Please do give me any recommendations in this matter if there is something I have misunderstood regarding creating batch pools.

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
301 questions
{count} votes