You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Create the VirtualMachineConfiguration, specifying
38
41
# the VM image reference and the Batch node agent to
39
42
# be installed on the node.
40
-
vmc = batchmodels.VirtualMachineConfiguration(
41
-
image_reference= ir,
42
-
node_agent_sku_id="batch.node.ubuntu 14.04")
43
+
vmc = models.VirtualMachineConfiguration(
44
+
image_reference= models.ImageReference(
45
+
publisher='Canonical',
46
+
offer='UbuntuServer',
47
+
sku='18.04-LTS'
48
+
),
49
+
node_agent_sku_id="batch.node.ubuntu 18.04")
43
50
44
51
# Assign the virtual machine configuration to the pool
45
-
new_pool.virtual_machine_configuration = vmc
52
+
new_pool = models.PoolAddParameter(
53
+
id='new_pool',
54
+
vm_size='standard_d2_v2',
55
+
virtual_machine_configuration= vmc
56
+
)
46
57
47
58
# Create pool in the Batch service
48
59
client.pool.add(new_pool)
49
60
```
50
61
51
62
> [!div class="nextstepaction"]
52
-
> [Explore the Client APIs](/python/api/overview/azure/batch/client)
63
+
> [Explore the Client APIs](/python/api/azure-batch)
53
64
54
65
## Management API
55
66
Use the Azure Batch management libraries to create and delete batch accounts, read and regenerate batch account keys, and manage batch account storage.
0 commit comments