Skip to content

Commit f1fc969

Browse files
committed
edit pass: linux-article-batch1
1 parent 18a6890 commit f1fc969

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ This article assumes that you already installed a CentOS (or similar derivative)
140140
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
141141
```
142142

143-
> [!Note]
143+
> [!NOTE]
144144
> The rest of this article assumes that you're using at least the `[openlogic]` repo, which is used to install the Azure Linux agent.
145145
146146
1. Add the following line to `/etc/yum.conf`:
@@ -163,7 +163,7 @@ This article assumes that you already installed a CentOS (or similar derivative)
163163

164164
A reboot might be required after running this command.
165165

166-
1. (Optional) Install the drivers for the Linux Integration Services (LIS).
166+
1. Optional: Install the drivers for the Linux Integration Services (LIS).
167167

168168
> [!IMPORTANT]
169169
> The step is *required* for CentOS 6.3 and earlier and is optional for later releases.
@@ -201,7 +201,7 @@ This article assumes that you already installed a CentOS (or similar derivative)
201201
202202
Graphical and `quiet boot` isn't useful in a cloud environment where you want all the logs to be sent to the serial port. The `crashkernel` option can be left configured if you want. But this parameter reduces the amount of available memory in the VM by 128 MB or more, which might be a problem for smaller VM sizes.
203203

204-
> [!Important]
204+
> [!IMPORTANT]
205205
> CentOS 6.5 and earlier must also set the kernel parameter `numa=off`. For more information, see Red Hat [KB 436883](https://access.redhat.com/solutions/436883).
206206

207207
1. Ensure that the Secure Shell server is installed and configured to start at boot time. This setting is usually the default.
@@ -232,7 +232,7 @@ This article assumes that you already installed a CentOS (or similar derivative)
232232

233233
## CentOS 7.0+
234234

235-
Follow the steps in the following sections if you're using CentOS 7.0+.
235+
Follow the steps in the next sections if you're using CentOS 7.0+.
236236
237237
### Changes in CentOS 7 (and similar derivatives)
238238

articles/virtual-machines/linux/debian-create-upload-vhd.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Prepare an Debian Linux VHD
3-
description: Learn how to create Debian VHD images for VM deployments in Azure.
2+
title: Prepare a Debian Linux VHD
3+
description: Learn how to create Debian VHD images for virtual machine deployments in Azure.
44
author: srijang
55
ms.service: virtual-machines
66
ms.custom: linux-related-content
@@ -10,25 +10,28 @@ ms.date: 05/01/2024
1010
ms.author: maries
1111
ms.reviewer: mattmcinnes
1212
---
13+
1314
# Prepare a Debian VHD for Azure
1415

15-
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Flexible scale sets
16+
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Flexible scale sets
1617

1718
## Prerequisites
18-
This section assumes that you have already installed a Debian Linux operating system from an .iso file downloaded from the [Debian website](https://www.debian.org/distrib/) to a virtual hard disk. Multiple tools exist to create .vhd files; Hyper-V is only one example. For instructions using Hyper-V, see [Install the Hyper-V Role and Configure a Virtual Machine](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh846766(v=ws.11)).
19+
20+
This section assumes that you already installed a Debian Linux operating system from an .iso file downloaded from the [Debian website](https://www.debian.org/distrib/) to a virtual hard disk (VHD). Multiple tools exist to create .vhd files. Hyper-V is only one example. For instructions on using Hyper-V, see [Install the Hyper-V role and configure a virtual machine (VM)](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh846766(v=ws.11)).
1921

2022
## Installation notes
21-
* See also [General Linux Installation Notes](create-upload-generic.md#general-linux-installation-notes) for more tips on preparing Linux for Azure.
22-
* The newer VHDX format is not supported in Azure. You can convert the disk to VHD format using Hyper-V Manager or the **convert-vhd** cmdlet.
23-
* When installing the Linux system, it is recommended that you use standard partitions rather than LVM (often the default for many installations). This will avoid LVM name conflicts with cloned VMs, particularly if an OS disk ever needs to be attached to another VM for troubleshooting. [LVM](/previous-versions/azure/virtual-machines/linux/configure-lvm) or [RAID](/previous-versions/azure/virtual-machines/linux/configure-raid) may be used on data disks if preferred.
24-
* Do not configure a swap partition on the OS disk. The Azure Linux agent can be configured to create a swap file on the temporary resource disk. More information can be found in the steps below.
25-
* All VHDs on Azure must have a virtual size aligned to 1MB. When converting from a raw disk to VHD, you must ensure that the raw disk size is a multiple of 1MB before conversion. For more information, see [Linux Installation Notes](create-upload-generic.md#general-linux-installation-notes).
23+
24+
* For more tips on preparing Linux for Azure, see [General Linux installation notes](create-upload-generic.md#general-linux-installation-notes).
25+
* The newer VHDX format isn't supported in Azure. You can convert the disk to VHD format by using Hyper-V Manager or the `convert-vhd` cmdlet.
26+
* When you install the Linux system, we recommend that you use standard partitions rather than Logical Volume Manager (LVM), which is often the default for many installations. Using partitions avoids LVM name conflicts with cloned VMs, particularly if an OS disk ever needs to be attached to another VM for troubleshooting. [LVM](/previous-versions/azure/virtual-machines/linux/configure-lvm) or [RAID](/previous-versions/azure/virtual-machines/linux/configure-raid) may also be used on data disks.
27+
* Don't configure a swap partition on the OS disk. The Azure Linux agent can be configured to create a swap file on the temporary resource disk. More information can be found in the following steps.
28+
* All VHDs on Azure must have a virtual size aligned to 1 MB. When you convert from a raw disk to VHD, you must ensure that the raw disk size is a multiple of 1 MB before conversion. For more information, see [Linux installation notes](create-upload-generic.md#general-linux-installation-notes).
2629

2730
## Prepare a Debian image for Azure
2831

29-
You can create the base Azure Debian Cloud image with the [FAI cloud image builder](https://salsa.debian.org/cloud-team/debian-cloud-images).
32+
You can create the base Azure Debian cloud image with the [fully automatic installation (FAI) cloud image builder](https://salsa.debian.org/cloud-team/debian-cloud-images).
3033

31-
(The following git clone and apt install commands were pulled from the Debian Cloud Images repo) Start by cloning the repo and installing dependencies:
34+
The following git clone and apt installation commands were pulled from the Debian cloud images repo. Start by cloning the repo and installing dependencies:
3235

3336
```
3437
$ git clone https://salsa.debian.org/cloud-team/debian-cloud-images.git
@@ -38,11 +41,9 @@ $ sudo apt install --no-install-recommends ca-certificates debsums dosfstools \
3841
$ cd ./debian-cloud-images
3942
```
4043

41-
(Optional) Customize the build by adding scripts (e.g. shell scripts) to `./config_space/scripts/AZURE`.
44+
Optional: Customize the build by adding scripts (for example, shell scripts) to `./config_space/scripts/AZURE`.
4245

43-
44-
45-
## An example of a script to customize the image is:
46+
## Script example to customize the image
4647

4748
```
4849
$ mkdir -p ./config_space/scripts/AZURE
@@ -54,19 +55,17 @@ EOF
5455
$ sudo chmod 755 ./config_space/scripts/AZURE/10-custom
5556
```
5657

57-
Note that it is important to prefix any commands you want to have customizing the image with `$ROOTCMD` as this is aliased as `chroot $target`.
58-
58+
Prefix any commands you want to have customizing the image with `$ROOTCMD`. It's aliased as `chroot $target`.
5959

60-
## Build the Azure Debian image:
60+
## Build the Azure Debian image
6161

6262
```
6363
$ make image_[release]_azure_amd64
6464
```
6565

66+
This command outputs a handful of files in the current directory, most notably the `image_[release]_azure_amd64.raw` image file.
6667

67-
This will output a handful of files in the current directory, most notably the `image_[release]_azure_amd64.raw` image file.
68-
69-
To convert the raw image to VHD for Azure, you can do the following:
68+
To convert the raw image to VHD for Azure, use the following commands:
7069

7170
```
7271
rawdisk="image_[release]_azure_amd64.raw"
@@ -85,21 +84,23 @@ sudo qemu-img resize "$rawdisk" $rounded_size
8584
qemu-img convert -f raw -o subformat=fixed,force_size -O vpc "$rawdisk" "$vhddisk"
8685
```
8786

87+
This process creates a VHD `image_[release]_azure_amd64.vhd` with a rounded size so that it can be copied successfully to an Azure Disk.
8888

89-
This creates a VHD `image_[release]_azure_amd64.vhd` with a rounded size to be able to copy it successfully to an Azure Disk.
90-
91-
>[!Note]
89+
>[!NOTE]
9290
> Rather than cloning the salsa repository and building images locally, current stable images can be built and downloaded from [FAI](https://fai-project.org/FAIme/cloud/).
9391
94-
After creating a stable Debian vhd image, before uploading verify the following packages are installed:
92+
After you create a stable Debian VHD image and before you upload, verify that the following packages are installed:
93+
9594
* apt-get install hyperv-daemons
96-
* apt-get install waagent # *optional but recommended for password resets and the use of extensions*
95+
* apt-get install waagent # *(Optional but recommended for password resets and the use of extensions)*
9796
* apt-get install cloud-init
9897

9998
Then perform a full upgrade:
99+
100100
* apt-get full-upgrade
101101

102-
Now the Azure resources must be created for this image (this uses the `$rounded_size_adjusted` variable, so it should be from within the same shell process from above).
102+
Now the Azure resources must be created for this image. This example uses the `$rounded_size_adjusted` variable, so it should be from within the same shell process from the preceding step.
103+
103104
```
104105
az group create -l $LOCATION -n $RG
105106
@@ -138,16 +139,15 @@ az vm create \
138139
--query id -o tsv)
139140
```
140141

142+
If the bandwidth from your local machine to the Azure Disk is causing a long time to process the upload with `azcopy`, you can use an Azure VM jumpbox to speed up the process. Here's how this process can be done:
141143

142-
>[!Note]
143-
> If the bandwidth from your local machine to the Azure Disk is causing a long time to process the upload with azcopy, you can use an Azure VM jumpbox to speed up the process. Here's how this can be done:
144-
>
145-
>1. Create a tarball of the VHD on your local machine: `tar -czvf ./image_buster_azure_amd64.vhd.tar.gz ./image_[release]_azure_amd64.vhd`.
146-
>2. Create an Azure Linux VM (distro of your choice). Make sure that you create it with a large enough disk to hold the extracted VHD!
147-
>3. Download the azcopy utility to the Azure Linux VM. It can be retrieved from [here](../../storage/common/storage-use-azcopy-v10.md#download-azcopy).
148-
>4. Copy the tarball to the VM: `scp ./image_buster_azure_amd64.vhd.tar.gz <vm>:~`.
149-
>5. On the VM, extract the VHD: `tar -xf ./image_buster_azure_amd64.vhd.tar.gz` (this will take a bit of time given the size of the file).
150-
>6. Finally on the VM, copy the VHD to the Azure Disk with `azcopy` (the command from above).
144+
1. Create a tarball of the VHD on your local machine: `tar -czvf ./image_buster_azure_amd64.vhd.tar.gz ./image_[release]_azure_amd64.vhd`.
145+
1. Create an Azure Linux VM (distro of your choice). Make sure that you create it with a large-enough disk to hold the extracted VHD.
146+
1. Download the `azcopy` utility to the Azure Linux VM. You can retrieve it from [Get started with AzCopy](../../storage/common/storage-use-azcopy-v10.md#download-azcopy).
147+
1. Copy the tarball to the VM: `scp ./image_buster_azure_amd64.vhd.tar.gz <vm>:~`.
148+
1. On the VM, extract the VHD: `tar -xf ./image_buster_azure_amd64.vhd.tar.gz`. This step takes a bit of time based on the size of the file.
149+
1. Finally, on the VM, copy the VHD to the Azure Disk with `azcopy` (the preceding command).
151150

151+
## Related content
152152

153-
**Next steps:** You're now ready to use your Debian Linux virtual hard disk to create new virtual machines in Azure. If this is the first time that you're uploading the .vhd file to Azure, see [Create a Linux VM from a custom disk](./upload-vhd.md#option-1-upload-a-vhd).
153+
You're now ready to use your Debian Linux VHD to create new VMs in Azure. If this is the first time that you're uploading the .vhd file to Azure, see [Create a Linux VM from a custom disk](./upload-vhd.md#option-1-upload-a-vhd).

0 commit comments

Comments
 (0)