About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
windows_first
⚠️
missing_linux_example
⚠️
windows_tools
Summary:
The documentation demonstrates a clear Windows bias. It exclusively uses Windows Server for compute nodes, configures the pool with a Windows image, and provides only Windows command-line examples (e.g., 'cmd /c type'). There are no Linux VM or command-line examples, and the workflow assumes Windows environments for both pool configuration and task execution. Linux equivalents are not mentioned or demonstrated.
Recommendations:
- Add parallel Linux examples throughout the documentation, including pool creation with a Linux Marketplace image and corresponding VirtualMachineConfiguration/ImageReference code.
- Show how to specify a Linux command line for tasks (e.g., using '/bin/bash -c cat ...' instead of 'cmd /c type ...').
- Explicitly mention that Azure Batch supports both Windows and Linux pools, and provide guidance on choosing and configuring each.
- Include sample code snippets and configuration for both Windows and Linux scenarios side by side.
- Clarify in the prerequisites and instructions that the quickstart can be completed on both Windows and Linux development environments, and provide any OS-specific notes as needed.
Create pull request
Flagged Code Snippets
for (int i = 0; i < inputFiles.Count; i++)
{
string taskId = String.Format("Task{0}", i);
string inputFilename = inputFiles[i].FilePath;
string taskCommandLine = String.Format("cmd /c type {0}", inputFilename);
var task = new CloudTask(taskId, taskCommandLine)
{
ResourceFiles = new List<ResourceFile> { inputFiles[i] }
};
tasks.Add(task);
}
batchClient.JobOperations.AddTask(JobId, tasks);
private static VirtualMachineConfiguration CreateVirtualMachineConfiguration(ImageReference imageReference)
{
return new VirtualMachineConfiguration(
imageReference: imageReference,
nodeAgentSkuId: "batch.node.windows amd64");
}
private static ImageReference CreateImageReference()
{
return new ImageReference(
publisher: "MicrosoftWindowsServer",
offer: "WindowsServer",
sku: "2016-datacenter-smalldisk",
version: "latest");
}
private static void CreateBatchPool(BatchClient batchClient, VirtualMachineConfiguration vmConfiguration)
{
try
{
CloudPool pool = batchClient.PoolOperations.CreatePool(
poolId: PoolId,
targetDedicatedComputeNodes: PoolNodeCount,
virtualMachineSize: PoolVMSize,
virtualMachineConfiguration: vmConfiguration);
pool.Commit();
}
...