Skip to content

Commit 0cbf053

Browse files
Merge pull request #249031 from alfpark/alpark/batch1
Update Batch VFS for Ubuntu 22.04 support
2 parents 6e17061 + 7048a22 commit 0cbf053

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

articles/batch/virtual-file-mount.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to mount different kinds of virtual file systems on Batch
44
ms.topic: how-to
55
ms.devlang: csharp
66
ms.custom: devx-track-csharp, devx-track-azurepowershell, devx-track-linux
7-
ms.date: 04/28/2023
7+
ms.date: 08/22/2023
88
---
99

1010
# Mount a virtual file system on a Batch pool
@@ -15,7 +15,7 @@ Mounting the file system to the pool makes accessing data easier and more effici
1515

1616
Also, you can choose the underlying file system to meet performance, throughout, and input/output operations per second (IOPS) requirements. You can independently scale the file system based on the number of compute nodes that concurrently access the data.
1717

18-
For example, you could use an [Avere vFXT](/azure/avere-vfxt/avere-vfxt-overview) distributed in-memory cache to support large movie-scale renders with thousands of concurrent render nodes that access on-premises source data. Or, for data that's already in cloud-based blob storage, you can use [BlobFuse](/azure/storage/blobs/storage-how-to-mount-container-linux) to mount the data as a local file system. BlobFuse is available only on Linux nodes except Ubuntu 22.04, but [Azure Files](/azure/storage/files/storage-files-introduction) provides a similar workflow and is available on both Windows and Linux.
18+
For example, you could use an [Avere vFXT](/azure/avere-vfxt/avere-vfxt-overview) distributed in-memory cache to support large movie-scale renders with thousands of concurrent render nodes that access on-premises source data. Or, for data that's already in cloud-based blob storage, you can use [BlobFuse](/azure/storage/blobs/storage-how-to-mount-container-linux) to mount the data as a local file system. [Azure Files](/azure/storage/files/storage-files-introduction) provides a similar workflow to that of BlobFuse and is available on both Windows and Linux.
1919

2020
## Supported configurations
2121

@@ -30,11 +30,9 @@ Batch supports the following virtual file system types for node agents that are
3030

3131
| OS Type | Azure Files share | Azure Blob container | NFS mount | CIFS mount |
3232
|---|---|---|---|---|
33-
| Linux | :heavy_check_mark: | :heavy_check_mark:* | :heavy_check_mark: | :heavy_check_mark: |
33+
| Linux | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
3434
| Windows | :heavy_check_mark: | :x: | :x: | :x: |
3535

36-
\*Azure Blob container isn't supported on Ubuntu 22.04.
37-
3836
> [!NOTE]
3937
> Mounting a virtual file system isn't supported on Batch pools created before August 8, 2019.
4038
@@ -47,7 +45,7 @@ When you use virtual file mounts with Batch pools in a virtual network, keep the
4745
- **Azure Blob containers** require TCP port 443 to be open for traffic to and from the `storage` service tag. Virtual machines (VMs) must have access to `https://packages.microsoft.com` to download the `blobfuse` and `gpg` packages. Depending on your configuration, you might need access to other URLs.
4846

4947
- **Network File System (NFS)** requires access to port 2049 by default. Your configuration might have other requirements. VMs must have access to the appropriate package manager to download the `nfs-common` (for Debian or Ubuntu) or `nfs-utils` (for CentOS) packages. The URL might vary based on your OS version. Depending on your configuration, you might also need access to other URLs.
50-
48+
5149
Mounting Azure Blob or Azure Files through NFS might have more networking requirements. For example, your compute nodes might need to use the same virtual network subnet as the storage account.
5250

5351
- **Common Internet File System (CIFS)** requires access to TCP port 445. VMs must have access to the appropriate package manager to download the `cifs-utils` package. The URL might vary based on your OS version.
@@ -104,7 +102,7 @@ You can use [Azure PowerShell](/powershell/) to mount an Azure Files share on a
104102
```
105103
106104
1. Get the context for your Batch account. Replace the `<batch-account-name>` placeholder with your Batch account name.
107-
105+
108106
```powershell-interactive
109107
$context = Get-AzBatchAccount -AccountName <batch-account-name>
110108
```
@@ -115,13 +113,13 @@ You can use [Azure PowerShell](/powershell/) to mount an Azure Files share on a
115113
116114
```powershell-interactive
117115
$fileShareConfig = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSAzureFileShareConfiguration" -ArgumentList @("<storage-account-name>", "https://<storage-account-name>.file.core.windows.net/batchfileshare1", "S", "<storage-account-key>")
118-
116+
119117
$mountConfig = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSMountConfiguration" -ArgumentList @($fileShareConfig)
120-
118+
121119
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "latest")
122-
120+
123121
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
124-
122+
125123
New-AzBatchPool -Id "<pool-name>" -VirtualMachineSize "STANDARD_D2_V2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 1 -MountConfiguration @($mountConfig) -BatchContext $context
126124
```
127125
@@ -163,13 +161,13 @@ cmdkey /add:"<storage-account-name>.file.core.windows.net" /user:"Azure\<storage
163161
164162
```powershell-interactive
165163
$fileShareConfig = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSAzureFileShareConfiguration" -ArgumentList @("<storage-account-name>", https://<storage-account-name>.file.core.windows.net/<file-share-name>, "S", "<storage-account-key>", "-o vers=3.0,dir_mode=0777,file_mode=0777,sec=ntlmssp")
166-
164+
167165
$mountConfig = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSMountConfiguration" -ArgumentList @($fileShareConfig)
168-
166+
169167
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("0001-com-ubuntu-server-focal", "canonical", "20_04-lts", "latest")
170-
168+
171169
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.ubuntu 20.04")
172-
170+
173171
New-AzBatchPool -Id "<pool-name>" -VirtualMachineSize "Standard_DS1_v2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 1 -MountConfiguration @($mountConfig) -BatchContext $Context
174172
```
175173
@@ -195,15 +193,16 @@ To get log files for debugging, you can use the [OutputFiles](batch-task-output-
195193

196194
### Investigate mounting errors
197195

198-
If you get the following error when you try to mount an Azure file share to a Batch node, you can RDP or SSH to the node to check the related log files.
196+
You can RDP or SSH to the node to check the log files pertaining to filesystem mounts.
197+
The following example error message is possible when you try to mount an Azure file share to a Batch node:
199198

200199
```output
201200
Mount Configuration Error | An error was encountered while configuring specified mount(s)
202201
Message: System error (out of memory, cannot fork, no more loop devices)
203202
MountConfigurationPath: S
204203
```
205204

206-
If you receive this error, RDP or SSH to the node to check the related log files. The Batch agent implements mounting differently on Windows and Linux. On Linux, Batch installs the package `cifs-utils`. Then, Batch issues the mount command. On Windows, Batch uses `cmdkey` to add your Batch account credentials. Then, Batch issues the mount command through `net use`. For example:
205+
If you receive this error, RDP or SSH to the node to check the related log files. The Batch agent implements mounting differently on Windows and Linux for Azure file shares. On Linux, Batch installs the package `cifs-utils`. Then, Batch issues the mount command. On Windows, Batch uses `cmdkey` to add your Batch account credentials. Then, Batch issues the mount command through `net use`. For example:
207206

208207
```powershell-interactive
209208
net use S: \\<storage-account-name>.file.core.windows.net\<fileshare> /u:AZURE\<storage-account-name> <storage-account-key>
@@ -220,7 +219,7 @@ net use S: \\<storage-account-name>.file.core.windows.net\<fileshare> /u:AZURE\<
220219
```output
221220
CMDKEY: Credential added successfully.
222221
System error 86 has occurred.
223-
222+
224223
The specified network password is not correct.
225224
```
226225
@@ -262,15 +261,15 @@ If you can't use RDP or SSH to check the log files on the node, you can upload t
262261
263262
1. When the upload completes, download the files and open *agent-debug.log*.
264263
265-
1. Review the error messages, for example:
264+
1. Review the error messages, for example:
266265
267266
```output
268267
..20210322T113107.448Z.00000000-0000-0000-0000-000000000000.ERROR.agent.mount.filesystems.basefilesystem.basefilesystem.py.run_cmd_persist_output_async.59.2912.MainThread.3580.Mount command failed with exit code: 2, output:
269-
268+
270269
CMDKEY: Credential added successfully.
271-
270+
272271
System error 86 has occurred.
273-
272+
274273
The specified network password is not correct.
275274
```
276275
@@ -286,9 +285,9 @@ If you can't diagnose or fix mounting errors, you can use PowerShell to mount th
286285
287286
```powershell-interactive
288287
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "latest")
289-
288+
290289
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
291-
290+
292291
New-AzBatchPool -Id "<pool-name>" -VirtualMachineSize "STANDARD_D2_V2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 1 -BatchContext $Context
293292
```
294293
@@ -322,9 +321,9 @@ If you can't diagnose or fix mounting errors, you can use PowerShell to mount th
322321
323322
```powershell-interactive
324323
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("0001-com-ubuntu-server-focal", "canonical", "20_04-lts", "latest")
325-
324+
326325
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.ubuntu 20.04")
327-
326+
328327
New-AzBatchPool -Id "<pool-name>" -VirtualMachineSize "Standard_DS1_v2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 1 -BatchContext $Context
329328
```
330329

0 commit comments

Comments
 (0)