You are on page 1of 6

Creating a Virtual Network (VNet) with two Windows Server Failover Cluster (WSFC) instances in Azure

involves several steps. Below is an example Azure Resource Manager (ARM) template that you can use
as a starting point. This example assumes the use of Azure Virtual Machines (VMs) for the WSFC nodes.

json

Copy code

"$schema":
"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",

"contentVersion": "1.0.0.0",

"resources": [

"apiVersion": "2020-05-01",

"type": "Microsoft.Network/virtualNetworks",

"name": "YourVNetName",

"location": "YourRegion",

"properties": {

"addressSpace": {

"addressPrefixes": ["10.0.0.0/16"]

},

"subnets": [

"name": "Node1Subnet",

"properties": {

"addressPrefix": "10.0.1.0/24"

},

"name": "Node2Subnet",

"properties": {
"addressPrefix": "10.0.2.0/24"

},

"apiVersion": "2022-04-01",

"type": "Microsoft.Compute/virtualMachines",

"name": "WSFCNode1",

"location": "YourRegion",

"dependsOn": [

"[resourceId('Microsoft.Network/virtualNetworks', 'YourVNetName')]"

],

"properties": {

"hardwareProfile": {

"vmSize": "Standard_DS2_v2"

},

"osProfile": {

"computerName": "WSFCNode1",

"adminUsername": "YourAdminUsername",

"adminPassword": "YourAdminPassword"

},

"storageProfile": {

"imageReference": {

"publisher": "MicrosoftWindowsServer",

"offer": "WindowsServer",

"sku": "2019-Datacenter",

"version": "latest"
},

"osDisk": {

"createOption": "FromImage"

},

"networkProfile": {

"networkInterfaces": [

"id": "[resourceId('Microsoft.Network/networkInterfaces', 'WSFCNode1Nic')]"

},

"apiVersion": "2022-04-01",

"type": "Microsoft.Network/networkInterfaces",

"name": "WSFCNode1Nic",

"location": "YourRegion",

"dependsOn": [

"[resourceId('Microsoft.Network/virtualNetworks', 'YourVNetName')]"

],

"properties": {

"ipConfigurations": [

"name": "ipconfig1",

"properties": {

"privateIPAllocationMethod": "Dynamic",

"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'YourVNetName',
'Node1Subnet')]"

},

"apiVersion": "2022-04-01",

"type": "Microsoft.Compute/virtualMachines",

"name": "WSFCNode2",

"location": "YourRegion",

"dependsOn": [

"[resourceId('Microsoft.Network/virtualNetworks', 'YourVNetName')]",

"[resourceId('Microsoft.Compute/virtualMachines', 'WSFCNode1')]"

],

"properties": {

"hardwareProfile": {

"vmSize": "Standard_DS2_v2"

},

"osProfile": {

"computerName": "WSFCNode2",

"adminUsername": "YourAdminUsername",

"adminPassword": "YourAdminPassword"

},

"storageProfile": {

"imageReference": {

"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",

"sku": "2019-Datacenter",

"version": "latest"

},

"osDisk": {

"createOption": "FromImage"

},

"networkProfile": {

"networkInterfaces": [

"id": "[resourceId('Microsoft.Network/networkInterfaces', 'WSFCNode2Nic')]"

},

"apiVersion": "2022-04-01",

"type": "Microsoft.Network/networkInterfaces",

"name": "WSFCNode2Nic",

"location": "YourRegion",

"dependsOn": [

"[resourceId('Microsoft.Network/virtualNetworks', 'YourVNetName')]"

],

"properties": {

"ipConfigurations": [

"name": "ipconfig1",
"properties": {

"privateIPAllocationMethod": "Dynamic",

"subnet": {

"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'YourVNetName',


'Node2Subnet')]"

Please replace placeholders like YourVNetName, YourRegion, YourAdminUsername, and


YourAdminPassword with your specific values. This template creates a virtual network with two subnets
and provisions two virtual machines (WSFCNode1 and WSFCNode2) with associated network interfaces.

Make sure to adapt the template based on your specific requirements, such as VM sizes, OS versions,
and any additional configurations needed for your Windows Server Failover Cluster setup. Additionally,
you might want to include additional resources like storage accounts or availability sets depending on
your design.

You might also like