You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/disk-encryption-sample-scripts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,7 +279,7 @@ To configure encryption during the distribution installation, do the following s
279
279
280
280

281
281
282
-
3. Prepare the VM for uploading to Azure by following the instructions in [Prepare a SLES or openSUSE virtual machine for Azure](./suse-create-upload-vhd.md?toc=/azure/virtual-machines/linux/toc.json#prepare-opensuse-152). Don't run the last step (deprovisioning the VM) yet.
282
+
3. Prepare the VM for uploading to Azure by following the instructions in [Prepare a SLES or openSUSE virtual machine for Azure](./suse-create-upload-vhd.md?toc=/azure/virtual-machines/linux/toc.json#prepare-opensuse-154). Don't run the last step (deprovisioning the VM) yet.
283
283
284
284
To configure encryption to work with Azure, do the following steps:
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/suse-create-upload-vhd.md
+44-42Lines changed: 44 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.subservice: imaging
7
7
ms.collection: linux
8
8
ms.custom: linux-related-content
9
9
ms.topic: how-to
10
-
ms.date: 12/14/2022
10
+
ms.date: 04/28/2024
11
11
ms.author: srijangupta
12
12
ms.reviewer: mattmcinnes
13
13
---
@@ -221,33 +221,35 @@ As an alternative to building your own VHD, SUSE also publishes BYOS (bring your
221
221
sudo rm -f ~/.bash_history
222
222
```
223
223
224
-
## Prepare openSUSE 15.2+
224
+
## Prepare openSUSE 15.4+
225
225
226
226
1. On the center pane of Hyper-V Manager, select the virtual machine.
227
-
2. Select **Connect** to open the window for the virtual machine.
228
-
3. In a terminal, run the command `zypper lr`. If this command returns output similar to the following example, the repositories are configured as expected and no adjustments are necessary. (Version numbers might vary.)
If the command returns "No repositories defined," use the following commands to add these repos:
237
-
238
-
```bash
239
-
sudo zypper ar -f http://download.opensuse.org/repositories/Cloud:Tools/openSUSE_15.2 Cloud:Tools_15.2
240
-
sudo zypper ar -f https://download.opensuse.org/distribution/15.2/repo/oss openSUSE_15.2_OSS
241
-
sudo zypper ar -f http://download.opensuse.org/update/15.2 openSUSE_15.2_Updates
242
-
```
243
-
244
-
You can then verify that the repositories have been added by running the command `zypper lr` again. If one of the relevant update repositories isn't enabled, enable it by using the following command:
245
-
246
-
```bash
247
-
sudo zypper mr -e [NUMBER OF REPOSITORY]
248
-
```
249
-
250
-
4. Update the kernel to the latest available version:
227
+
1. Select **Connect** to open the window for the virtual machine.
228
+
1. In a terminal, run the command `zypper lr`. If this command returns output similar to the following example, the repositories are configured as expected and no adjustments are necessary. (Version numbers might vary.)
229
+
230
+
| # | Alias | Name | Enabled | GPG Check | Refresh
If the the message "___No repositories defined___" appears from the `zypper lr` the repositories must be added manually.
237
+
238
+
Below are examples of commands for adding these repositories (versions and links may vary):
239
+
240
+
```bash
241
+
sudo zypper ar -f https://download.opensuse.org/update/openSUSE-stable openSUSE_stable_Updates
242
+
sudo zypper ar -f https://download.opensuse.org/repositories/Cloud:/Tools/15.4 Cloud:Tools_15.4
243
+
sudo zypper ar -f https://download.opensuse.org/distribution/openSUSE-stable/repo/oss openSUSE_stable_OSS
244
+
```
245
+
246
+
You can then verify that the repositories have been added by running the command `zypper lr` again. If one of the relevant update repositories isn't enabled, enable it by using the following command:
247
+
248
+
```bash
249
+
sudo zypper mr -e [NUMBER OF REPOSITORY]
250
+
```
251
+
252
+
1. Update the kernel to the latest available version:
251
253
252
254
```bash
253
255
sudo zypper up kernel-default
@@ -259,16 +261,16 @@ As an alternative to building your own VHD, SUSE also publishes BYOS (bring your
259
261
sudo zypper update
260
262
```
261
263
262
-
5. Install the Azure Linux Agent:
264
+
1. Install the Azure Linux Agent:
263
265
264
266
```bash
265
267
sudo zypper install WALinuxAgent
266
268
```
267
269
268
-
6. Modify the kernel boot line in your GRUB configuration to include other 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:
270
+
1. Modify the kernel boot line in your GRUB configuration to include other kernel parameters forAzure. To do this, open */boot/grub/menu.lst*in a text editor and ensure that the default kernel includes the following parameters:
269
271
270
272
```config-grub
271
-
console=ttyS0 earlyprintk=ttyS0
273
+
console=ttyS0 earlyprintk=ttyS0
272
274
```
273
275
274
276
This option ensures that all console messages are sent to the first serial port, which can assist Azure support with debugging issues. In addition, remove the following parameters from the kernel boot line if they exist:
@@ -277,21 +279,21 @@ As an alternative to building your own VHD, SUSE also publishes BYOS (bring your
277
279
libata.atapi_enabled=0 reserve=0x1f0,0x8
278
280
```
279
281
280
-
7. We recommend that you edit the */etc/sysconfig/network/dhcp* file and change the `DHCLIENT_SET_HOSTNAME` parameter to the following setting:
282
+
1. We recommend that you edit the */etc/sysconfig/network/dhcp* file and change the `DHCLIENT_SET_HOSTNAME` parameter to the following setting:
281
283
282
284
```config
283
285
DHCLIENT_SET_HOSTNAME="no"
284
286
```
285
287
286
-
8. In the */etc/sudoers* file, comment out or remove the following lines if they exist. This is an important step.
288
+
1. In the */etc/sudoers* file, comment out or remove the following lines if they exist. This is an important step.
287
289
288
290
```output
289
291
Defaults targetpw # ask for the password of the target user i.e. root
290
292
ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
291
293
```
292
294
293
-
9. Ensure that the SSH server is installed and configured to start at boot time.
294
-
10. Don't create swap space on the OS disk.
295
+
1. Ensure that the SSH server is installed and configured to start at boot time.
296
+
1. Don't create swap space on the OS disk.
295
297
296
298
The Azure Linux Agent can automatically configure swap space by using the local resource disk that's attached to the VM after provisioning on Azure. The local resource disk is a *temporary* disk and will be emptied when the VM is deprovisioned.
297
299
@@ -305,26 +307,26 @@ As an alternative to building your own VHD, SUSE also publishes BYOS (bring your
305
307
ResourceDisk.SwapSizeMB=2048 ## NOTE: set the size to whatever you need it to be.
306
308
```
307
309
308
-
11. Ensure that the Azure Linux Agent runs at startup:
310
+
1. Ensure that the Azure Linux Agent runs at startup:
309
311
310
312
```bash
311
313
sudo systemctl enable waagent.service
312
314
```
313
315
314
-
12. Run the following commands to deprovision the virtual machine and prepare it for provisioning on Azure.
316
+
1. Run the following commands to deprovision the virtual machine and prepare it for provisioning on Azure.
315
317
316
318
If you're migrating a specific virtual machine and don't want to create a generalized image, skip the deprovisioning step.
317
319
318
320
```bash
319
-
sudo rm -f ~/.bash_history # Remove current user history
320
-
sudo rm -rf /var/lib/waagent/
321
-
sudo rm -f /var/log/waagent.log
322
-
sudo waagent -force -deprovision+user
323
-
sudo rm -f ~/.bash_history # Remove root user history
324
-
sudo export HISTSIZE=0
321
+
sudo rm -f ~/.bash_history # Remove current user history
322
+
sudo rm -rf /var/lib/waagent/
323
+
sudo rm -f /var/log/waagent.log
324
+
sudo waagent -force -deprovision+user
325
+
sudo rm -f ~/.bash_history # Remove root user history
326
+
sudo export HISTSIZE=0
325
327
```
326
328
327
-
13. Select **Action** > **Shut Down** in Hyper-V Manager.
0 commit comments