Skip to content

Commit 8becd0e

Browse files
authored
Merge pull request #108083 from TimShererWithAquent/us1669724m
Syntax block azurecli fixes.
2 parents a6caed0 + 59f09a7 commit 8becd0e

11 files changed

+43
-41
lines changed

articles/virtual-machine-scale-sets/tutorial-autoscale-cli.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ The following example output shows the instance name, public IP address of the l
113113

114114
SSH to your first VM instance. Specify your own public IP address and port number with the `-p` parameter, as shown from the preceding command:
115115

116-
```azurecli-interactive
116+
```console
117117
ssh [email protected] -p 50001
118118
```
119119

120120
Once logged in, install the **stress** utility. Start *10* **stress** workers that generate CPU load. These workers run for *420* seconds, which is enough to cause the autoscale rules to implement the desired action.
121121

122-
```azurecli-interactive
122+
```console
123123
sudo apt-get -y install stress
124124
sudo stress --cpu 10 --timeout 420 &
125125
```
@@ -128,26 +128,26 @@ When **stress** shows output similar to *stress: info: [2688] dispatching hogs:
128128

129129
To confirm that **stress** generates CPU load, examine the active system load with the **top** utility:
130130

131-
```azurecli-interactive
131+
```console
132132
top
133133
```
134134

135135
Exit **top**, then close your connection to the VM instance. **stress** continues to run on the VM instance.
136136

137-
```azurecli-interactive
137+
```console
138138
Ctrl-c
139139
exit
140140
```
141141

142142
Connect to second VM instance with the port number listed from the previous [az vmss list-instance-connection-info](/cli/azure/vmss):
143143

144-
```azurecli-interactive
144+
```console
145145
ssh [email protected] -p 50003
146146
```
147147

148148
Install and run **stress**, then start ten workers on this second VM instance.
149149

150-
```azurecli-interactive
150+
```console
151151
sudo apt-get -y install stress
152152
sudo stress --cpu 10 --timeout 420 &
153153
```
@@ -156,7 +156,7 @@ Again, when **stress** shows output similar to *stress: info: [2713] dispatching
156156

157157
Close your connection to the second VM instance. **stress** continues to run on the VM instance.
158158

159-
```azurecli-interactive
159+
```console
160160
exit
161161
```
162162

@@ -173,7 +173,7 @@ watch az vmss list-instances \
173173

174174
Once the CPU threshold has been met, the autoscale rules increase the number of VM instances in the scale set. The following output shows three VMs created as the scale set autoscales out:
175175

176-
```bash
176+
```output
177177
Every 2.0s: az vmss list-instances --resource-group myResourceGroup --name myScaleSet --output table
178178
179179
InstanceId LatestModelApplied Location Name ProvisioningState ResourceGroup VmId
@@ -187,7 +187,7 @@ Every 2.0s: az vmss list-instances --resource-group myResourceGroup --name mySca
187187

188188
Once **stress** stops on the initial VM instances, the average CPU load returns to normal. After another 5 minutes, the autoscale rules then scale in the number of VM instances. Scale in actions remove VM instances with the highest IDs first. When a scale set uses Availability Sets or Availability Zones, scale in actions are evenly distributed across those VM instances. The following example output shows one VM instance deleted as the scale set autoscales in:
189189

190-
```bash
190+
```output
191191
6 True eastus myScaleSet_6 Deleting myResourceGroup 9e4133dd-2c57-490e-ae45-90513ce3b336
192192
```
193193

articles/virtual-machine-scale-sets/tutorial-autoscale-template.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ The following example output shows the instance name, public IP address of the l
170170

171171
SSH to your first VM instance. Specify your own public IP address and port number with the `-p` parameter, as shown from the preceding command:
172172

173-
```azurecli-interactive
173+
```console
174174
ssh [email protected] -p 50001
175175
```
176176

177177
Once logged in, install the **stress** utility. Start *10* **stress** workers that generate CPU load. These workers run for *420* seconds, which is enough to cause the autoscale rules to implement the desired action.
178178

179-
```azurecli-interactive
179+
```console
180180
sudo apt-get -y install stress
181181
sudo stress --cpu 10 --timeout 420 &
182182
```
@@ -185,26 +185,26 @@ When **stress** shows output similar to *stress: info: [2688] dispatching hogs:
185185

186186
To confirm that **stress** generates CPU load, examine the active system load with the **top** utility:
187187

188-
```azurecli-interactive
188+
```console
189189
top
190190
```
191191

192192
Exit **top**, then close your connection to the VM instance. **stress** continues to run on the VM instance.
193193

194-
```azurecli-interactive
194+
```console
195195
Ctrl-c
196196
exit
197197
```
198198

199199
Connect to second VM instance with the port number listed from the previous [az vmss list-instance-connection-info](/cli/azure/vmss):
200200

201-
```azurecli-interactive
201+
```console
202202
ssh [email protected] -p 50003
203203
```
204204

205205
Install and run **stress**, then start ten workers on this second VM instance.
206206

207-
```azurecli-interactive
207+
```console
208208
sudo apt-get -y install stress
209209
sudo stress --cpu 10 --timeout 420 &
210210
```
@@ -213,7 +213,7 @@ Again, when **stress** shows output similar to *stress: info: [2713] dispatching
213213

214214
Close your connection to the second VM instance. **stress** continues to run on the VM instance.
215215

216-
```azurecli-interactive
216+
```console
217217
exit
218218
```
219219

@@ -229,7 +229,7 @@ watch az vmss list-instances \
229229

230230
Once the CPU threshold has been met, the autoscale rules increase the number of VM instances in the scale set. The following output shows three VMs created as the scale set autoscales out:
231231

232-
```bash
232+
```output
233233
Every 2.0s: az vmss list-instances --resource-group myResourceGroup --name myScaleSet --output table
234234

235235
InstanceId LatestModelApplied Location Name ProvisioningState ResourceGroup VmId
@@ -243,7 +243,7 @@ Every 2.0s: az vmss list-instances --resource-group myResourceGroup --name mySca
243243

244244
Once **stress** stops on the initial VM instances, the average CPU load returns to normal. After another 5 minutes, the autoscale rules then scale in the number of VM instances. Scale in actions remove VM instances with the highest IDs first. When a scale set uses Availability Sets or Availability Zones, scale in actions are evenly distributed across those VM instances. The following example output shows one VM instance deleted as the scale set autoscales in:
245245

246-
```bash
246+
```output
247247
6 True eastus myScaleSet_6 Deleting MYRESOURCEGROUP 9e4133dd-2c57-490e-ae45-90513ce3b336
248248
```
249249

articles/virtual-machine-scale-sets/tutorial-create-and-manage-cli.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ az vmss list-instances \
6464

6565
The following example output shows two VM instances in the scale set:
6666

67-
```bash
67+
```output
6868
InstanceId LatestModelApplied Location Name ProvisioningState ResourceGroup VmId
6969
------------ -------------------- ---------- ------------ ------------------- --------------- ------------------------------------
7070
1 True eastus myScaleSet_1 Succeeded MYRESOURCEGROUP c059be0c-37a2-497a-b111-41272641533c
@@ -95,7 +95,7 @@ az vmss list-instance-connection-info \
9595

9696
The following example output shows the instance name, public IP address of the load balancer, and port number that the NAT rules forward traffic to:
9797

98-
```bash
98+
```output
9999
{
100100
"instance 1": "13.92.224.66:50001",
101101
"instance 3": "13.92.224.66:50003"
@@ -104,13 +104,13 @@ The following example output shows the instance name, public IP address of the l
104104

105105
SSH to your first VM instance. Specify your public IP address and port number with the `-p` parameter, as shown from the preceding command:
106106

107-
```azurecli-interactive
107+
```console
108108
ssh [email protected] -p 50001
109109
```
110110

111111
Once logged in to the VM instance, you could perform some manual configuration changes as needed. For now, close the SSH session as normal:
112112

113-
```bash
113+
```console
114114
exit
115115
```
116116

@@ -124,7 +124,7 @@ az vm image list --output table
124124

125125
The following example output shows the most common VM images on Azure. The *UrnAlias* can be used to specify one of these common images when you create a scale set.
126126

127-
```bash
127+
```output
128128
Offer Publisher Sku Urn UrnAlias Version
129129
------------- ---------------------- ------------------ -------------------------------------------------------------- ------------------- ---------
130130
CentOS OpenLogic 7.3 OpenLogic:CentOS:7.3:latest CentOS latest
@@ -148,7 +148,7 @@ az vm image list --offer CentOS --all --output table
148148

149149
The following condensed output shows some of the CentOS 7.3 images available:
150150

151-
```azurecli-interactive
151+
```output
152152
Offer Publisher Sku Urn Version
153153
------- ---------- ---- ---------------------------------- -------------
154154
CentOS OpenLogic 7.3 OpenLogic:CentOS:7.3:7.3.20161221 7.3.20161221
@@ -197,7 +197,7 @@ az vm list-sizes --location eastus --output table
197197

198198
The output is similar to the following condensed example, which shows the resources assigned to each VM size:
199199

200-
```azurecli-interactive
200+
```output
201201
MaxDataDiskCount MemoryInMb Name NumberOfCores OsDiskSizeInMb ResourceDiskSizeInMb
202202
------------------ ------------ ---------------------- --------------- ---------------- ----------------------
203203
4 3584 Standard_DS1_v2 1 1047552 7168

articles/virtual-machine-scale-sets/tutorial-use-custom-image-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ az vm create \
4646

4747
The public IP address of your VM is shown in the output of the [az vm create](/cli/azure/vm) command. SSH to the public IP address of your VM as follows:
4848

49-
```azurecli-interactive
49+
```console
5050
ssh azureuser@<publicIpAddress>
5151
```
5252

articles/virtual-machine-scale-sets/tutorial-use-disks-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ az vmss list-instance-connection-info \
141141

142142
Use your own public IP address and port number to connect to the first VM instance, as shown in the following example:
143143

144-
```azurecli-interactive
144+
```console
145145
ssh [email protected] -p 50001
146146
```
147147

@@ -193,7 +193,7 @@ sudo df -h
193193

194194
The following example output shows that the three disks have their filesystems correctly mounted under */datadisks*:
195195

196-
```bash
196+
```output
197197
Filesystem Size Used Avail Use% Mounted on
198198
/dev/sda1 30G 1.3G 28G 5% /
199199
/dev/sdb1 50G 52M 47G 1% /mnt

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ You can view planned maintenance information by using [az vmss list-instances](/
142142

143143
Maintenance information is returned only if maintenance is planned. If no maintenance that affects the VM instance is scheduled, the command doesn't return any maintenance information.
144144

145-
```azure-cli
145+
```azurecli
146146
az vmss list-instances -g rgName -n vmssName --expand instanceView
147147
```
148148

@@ -162,7 +162,7 @@ The following properties are returned under **MaintenanceRedeployStatus** for ea
162162

163163
The following call initiates maintenance on a VM instance if `IsCustomerInitiatedMaintenanceAllowed` is set to **true**:
164164

165-
```azure-cli
165+
```azurecli
166166
az vmss perform-maintenance -g rgName -n vmssName --instance-ids id
167167
```
168168

articles/virtual-machines/maintenance-control-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Get-AzApplyUpdate `
247247

248248
Use [Remove-AzMaintenanceConfiguration](https://docs.microsoft.com/powershell/module/az.maintenance/remove-azmaintenanceconfiguration) to delete a maintenance configuration.
249249

250-
```azurecli-interactive
250+
```azurepowershell-interactive
251251
Remove-AzMaintenanceConfiguration `
252252
-ResourceGroupName myResourceGroup `
253253
-Name $config.Name

articles/virtual-machines/troubleshooting/repair-windows-vm-using-azure-virtual-machine-repair-commands.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,31 @@ For additional documentation and instructions, see [az vm repair](https://docs.m
5858

5959
2. If this is the first time you have used the `az vm repair` commands, add the vm-repair CLI extension.
6060

61-
```azurepowershell-interactive
61+
```azurecli-interactive
6262
az extension add -n vm-repair
6363
```
6464

6565
If you have previously used the `az vm repair` commands, apply any updates to the vm-repair extension.
6666

67-
```azurepowershell-interactive
67+
```azurecli-interactive
6868
az extension update -n vm-repair
6969
```
7070

7171
3. Run `az vm repair create`. This command will create a copy of the OS disk for the non-functional VM, create a repair VM, and attach the disk.
7272

73-
```azurepowershell-interactive
73+
```azurecli-interactive
7474
az vm repair create -g MyResourceGroup -n myVM --repair-username username --repair-password password!234 --verbose
7575
```
7676

7777
4. Run `az vm repair run`. This command will run the specified repair script on the attached disk via the repair VM.
7878

79-
```azurepowershell-interactive
79+
```azurecli-interactive
8080
az vm repair run –g MyResourceGroup –n MyVM -–run-on-repair --run-id 2 --verbose
8181
```
8282

8383
5. Run `az vm repair restore`. This command will swap the repaired OS disk with the original OS disk of the VM.
8484

85-
```azurepowershell-interactive
85+
```azurecli-interactive
8686
az vm repair restore -g MyResourceGroup -n MyVM --verbose
8787
```
8888

@@ -92,7 +92,7 @@ The following example enables the diagnostic extension on the VM named ``myVMDep
9292

9393
Azure CLI
9494

95-
```azurepowershell-interactive
95+
```azurecli-interactive
9696
az vm boot-diagnostics enable --name myVMDeployed --resource-group myResourceGroup --storage https://mystor.blob.core.windows.net/
9797
```
9898

includes/virtual-machines-common-classic-resource-manager-migration-common-errors.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ Update-AzureVM b0ad3d4c-4v68-45vb-xxc1-134fd010d0f8 Succeeded
159159
After you complete the migration process, you may want to move the VM to another subscription. However, if you have a secret/certificate on the VM that references a Key Vault resource, the move is currently not supported. The below instructions will allow you to workaround the issue.
160160

161161
#### PowerShell
162+
162163
```powershell
163164
$vm = Get-AzVM -ResourceGroupName "MyRG" -Name "MyVM"
164165
Remove-AzVMSecret -VM $vm
165166
Update-AzVM -ResourceGroupName "MyRG" -VM $vm
166167
```
168+
167169
#### Azure CLI
168170

169-
```bash
171+
```azurecli
170172
az vm update -g "myrg" -n "myvm" --set osProfile.Secrets=[]
171173
```

includes/virtual-machines-common-shared-image-galleries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ To list all the Shared Image Gallery resources across subscriptions that you hav
228228

229229
To list all the Shared Image Gallery resources across subscriptions that you have permissions to, use the following command in the Azure CLI:
230230

231-
```bash
231+
```azurecli
232232
az account list -otsv --query "[].id" | xargs -n 1 az sig list --subscription
233233
```
234234

0 commit comments

Comments
 (0)