Skip to content

Commit 5dcab7c

Browse files
Merge pull request #232519 from msaenzbosupport/patch-6
[Doc-A-THon]
2 parents e8a5ada + dea9b6b commit 5dcab7c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/virtual-machines/linux/create-upload-centos.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ This article assumes that you've already installed a CentOS (or similar derivati
5555

5656
4. Create or edit the file `/etc/sysconfig/network` and add the following text:
5757

58-
```output
58+
```config
5959
NETWORKING=yes
6060
HOSTNAME=localhost.localdomain
6161
```
6262

6363
5. Create or edit the file `/etc/sysconfig/network-scripts/ifcfg-eth0` and add the following text:
6464

65-
```output
65+
```config
6666
DEVICE=eth0
6767
ONBOOT=yes
6868
BOOTPROTO=dhcp
@@ -87,7 +87,7 @@ This article assumes that you've already installed a CentOS (or similar derivati
8787

8888
8. If you would like to use the OpenLogic mirrors that are hosted within the Azure datacenters, then replace the `/etc/yum.repos.d/CentOS-Base.repo` file with the following repositories. This will also add the **[openlogic]** repository that includes extra packages such as the Azure Linux agent:
8989

90-
```output
90+
```config
9191
[openlogic]
9292
name=CentOS-$releasever - openlogic packages for $basearch
9393
baseurl=http://olcentgbl.trafficmanager.net/openlogic/$releasever/openlogic/$basearch/
@@ -141,7 +141,7 @@ This article assumes that you've already installed a CentOS (or similar derivati
141141
142142
9. Add the following line to /etc/yum.conf:
143143
144-
```output
144+
```config
145145
http_caching=packages
146146
```
147147
@@ -184,15 +184,15 @@ This article assumes that you've already installed a CentOS (or similar derivati
184184
185185
13. Modify the kernel boot line in your grub configuration to include additional kernel parameters for Azure. To do this, open `/boot/grub/menu.lst` in a text editor and ensure that the default kernel includes the following parameters:
186186
187-
```output
187+
```config
188188
console=ttyS0 earlyprintk=ttyS0 rootdelay=300
189189
```
190190
191191
This will also ensure all console messages are sent to the first serial port, which can assist Azure support with debugging issues.
192192
193193
In addition to the above, it's recommended to *remove* the following parameters:
194194
195-
```output
195+
```config
196196
rhgb quiet crashkernel=auto
197197
```
198198
@@ -207,7 +207,7 @@ This article assumes that you've already installed a CentOS (or similar derivati
207207
208208
The Azure Linux Agent can automatically configure swap space using the local resource disk that is attached to the VM after provisioning on Azure. The local resource disk is a *temporary* disk, and might be emptied when the VM is deprovisioned. After installing the Azure Linux Agent (see previous step), modify the following parameters in `/etc/waagent.conf` appropriately:
209209
210-
```output
210+
```config
211211
ResourceDisk.Format=y
212212
ResourceDisk.Filesystem=ext4
213213
ResourceDisk.MountPoint=/mnt/resource
@@ -252,14 +252,14 @@ Preparing a CentOS 7 virtual machine for Azure is similar to CentOS 6, however t
252252
253253
3. Create or edit the file `/etc/sysconfig/network` and add the following text:
254254
255-
```output
255+
```config
256256
NETWORKING=yes
257257
HOSTNAME=localhost.localdomain
258258
```
259259
260260
4. Create or edit the file `/etc/sysconfig/network-scripts/ifcfg-eth0` and add the following text:
261261
262-
```output
262+
```config
263263
DEVICE=eth0
264264
ONBOOT=yes
265265
BOOTPROTO=dhcp
@@ -278,7 +278,7 @@ Preparing a CentOS 7 virtual machine for Azure is similar to CentOS 6, however t
278278
279279
6. If you would like to use the OpenLogic mirrors that are hosted within the Azure datacenters, then replace the `/etc/yum.repos.d/CentOS-Base.repo` file with the following repositories. This will also add the **[openlogic]** repository that includes packages for the Azure Linux agent:
280280
281-
```output
281+
```confg
282282
[openlogic]
283283
name=CentOS-$releasever - openlogic packages for $basearch
284284
baseurl=http://olcentgbl.trafficmanager.net/openlogic/$releasever/openlogic/$basearch/
@@ -337,13 +337,13 @@ Preparing a CentOS 7 virtual machine for Azure is similar to CentOS 6, however t
337337
338338
8. Modify the kernel boot line in your grub configuration to include additional kernel parameters for Azure. To do this, open `/etc/default/grub` in a text editor and edit the `GRUB_CMDLINE_LINUX` parameter, for example:
339339
340-
```output
340+
```config
341341
GRUB_CMDLINE_LINUX="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 net.ifnames=0"
342342
```
343343
344344
This will also ensure all console messages are sent to the first serial port, which can assist Azure support with debugging issues. It also turns off the new CentOS 7 naming conventions for NICs. In addition to the above, it's recommended to *remove* the following parameters:
345345
346-
```output
346+
```config
347347
rhgb quiet crashkernel=auto
348348
```
349349
@@ -365,7 +365,7 @@ Preparing a CentOS 7 virtual machine for Azure is similar to CentOS 6, however t
365365
366366
Edit `/etc/dracut.conf`, add content:
367367
368-
```output
368+
```config
369369
add_drivers+=" hv_vmbus hv_netvsc hv_storvsc "
370370
```
371371

0 commit comments

Comments
 (0)