Coder Perfect

When I try to use bicep to deploy a batch service pool, I receive a vmSize problem.

Problem

The following is my Bicep code:

resource pool 'Microsoft.Batch/batchAccounts/pools@2021-06-01' = {
  name: '${bs.name}/run-python'
  properties: {
    scaleSettings: {
      fixedScale: {
        nodeDeallocationOption: 'TaskCompletion'
        targetDedicatedNodes: 1
      }
    }
    deploymentConfiguration: {
      cloudServiceConfiguration: {
        osFamily: '6'
      }
    }
    vmSize: 'standard_A1_v2'
    startTask: {
      commandLine: 'cmd /c "pip install azure-storage-blob pandas"'
      userIdentity: {
        autoUser: {
          elevationLevel: 'NonAdmin'
          scope: 'Pool'
        }
      }
      waitForSuccess: true
    }
  }
  dependsOn: [
    bs
  ]
}

I attempted to establish a pool for my batch service, but when I attempted to deploy it, I received the following error:

,,,,,,,,,, “At least one resource deployment operation failed.” code”:”DeploymentFailed”,”message”:”At least one resource deployment operation failed.” Please provide a detailed list of deployment operations. Details on how to use this feature may be found at https://aka.ms/DeployOperations.”,”details” “:: [{“code”:”PropertyName”,”message”:”vmSize”}] }

So I believe the issue is with the vmSize variable, but I can’t locate a specific example of what the number should be.

Asked by Chris Jeppesen

Solution #1

Pools of CloudServiceConfiguration are no longer supported. Please use VirtualMachineConfiguration again.

Answered by fpark

Post is based on https://stackoverflow.com/questions/70258477/i-am-getting-a-vmsize-error-when-trying-to-deploy-a-batch-service-pool-using-bic