Skip to content

Commit d13de1b

Browse files
authored
Merge pull request #189133 from cynthn/patch-588
Update cloudinit-update-vm.md - Fixes https://github.com/MicrosoftDocs/azure-docs/issues/88002
2 parents 9f64bed + d612fdb commit d13de1b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

articles/virtual-machines/linux/cloudinit-update-vm.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: cynthn
55
ms.service: virtual-machines
66
ms.collection: linux
77
ms.topic: how-to
8-
ms.date: 06/01/2021
8+
ms.date: 02/18/2022
99
ms.author: cynthn
1010
ms.subservice: cloud-init
1111
---
@@ -38,24 +38,25 @@ packages:
3838
Before deploying, you need to create a resource group with the [az group create](/cli/azure/group) command. An Azure resource group is a logical container into which Azure resources are deployed and managed. The following example creates a resource group named *myResourceGroup* in the *eastus* location.
3939
4040
```azurecli-interactive
41-
az group create --name myResourceGroup --location eastus
41+
az group create --name myCentOSGroup --location eastus
4242
```
4343

4444
Now, create a VM with [az vm create](/cli/azure/vm) and specify the cloud-init file with the `--custom-data` parameter as follows:
4545

4646
```azurecli-interactive
4747
az vm create \
48-
--resource-group myResourceGroup \
49-
--name centos74 \
50-
--image OpenLogic:CentOS:7.5:latest \
48+
--resource-group myCentOSGroup \
49+
--name centos83 \
50+
--image OpenLogic:CentOS:8_3:latest \
5151
--custom-data cloud_init_upgrade.txt \
52+
--admin-username azureuser \
5253
--generate-ssh-keys
5354
```
5455

5556
SSH to the public IP address of your VM shown in the output from the preceding command. Enter your own **publicIpAddress** as follows:
5657

5758
```bash
58-
ssh <publicIpAddress>
59+
ssh azureuser@<publicIpAddress>
5960
```
6061

6162
Run the package management tool and check for updates.
@@ -67,12 +68,11 @@ sudo yum update
6768
As cloud-init checked for and installed updates on boot, there should be no additional updates to apply. You see the update process, number of altered packages as well as the installation of `httpd` by running `yum history` and review the output similar to the one below.
6869

6970
```bash
70-
Loaded plugins: fastestmirror, langpacks
71-
ID | Command line | Date and time | Action(s) | Altered
72-
-------------------------------------------------------------------------------
73-
3 | -t -y install httpd | 2018-04-20 22:42 | Install | 5
74-
2 | -t -y upgrade | 2018-04-20 22:38 | I, U | 65
75-
1 | | 2017-12-12 20:32 | Install | 522
71+
ID | Command line | Date and time | Action(s) | Altered
72+
--------------------------------------------------------------------------------------------------
73+
3 | -y install httpd | 2022-02-18 18:30 | Install | 7
74+
2 | -y upgrade | 2022-02-18 18:23 | I, O, U | 321 EE
75+
1 | | 2021-02-04 19:20 | Install | 496 EE
7676
```
7777

7878
## Next steps

0 commit comments

Comments
 (0)