Skip to content

Commit 65163f5

Browse files
author
Stephen A. Zarkos
committed
Update repo information and add info for the Debian Cloud kernel
1 parent 0954ebe commit 65163f5

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

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

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Prepare an Debian Linux VHD in Azure | Microsoft Docs
3-
description: Learn how to create Debian 7 & 8 VHD files for deployment in Azure.
3+
description: Learn how to create Debian VHD images for deployment in Azure.
44
services: virtual-machines-linux
55
documentationcenter: ''
66
author: szarkos
@@ -14,7 +14,7 @@ ms.workload: infrastructure-services
1414
ms.tgt_pltfrm: vm-linux
1515
ms.devlang: na
1616
ms.topic: article
17-
ms.date: 03/12/2018
17+
ms.date: 11/13/2018
1818
ms.author: szark
1919

2020
---
@@ -50,44 +50,54 @@ There are tools available for generating Debian VHDs for Azure, such as the [azu
5050
3. Comment out the line for **deb cdrom** in `/etc/apt/source.list` if you set up the VM against an ISO file.
5151
4. Edit the `/etc/default/grub` file and modify the **GRUB_CMDLINE_LINUX** parameter as follows to include additional kernel parameters for Azure.
5252

53-
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 rootdelay=30"
53+
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 earlyprintk=ttyS0,115200"
54+
5455
5. Rebuild the grub and run:
5556

5657
# sudo update-grub
57-
6. Add Debian's Azure repositories to /etc/apt/sources.list for either Debian 7 or 8:
58-
59-
**Debian 7.x "Wheezy"**
60-
61-
deb http://debian-archive.trafficmanager.net/debian wheezy-backports main
62-
deb-src http://debian-archive.trafficmanager.net/debian wheezy-backports main
63-
deb http://debian-archive.trafficmanager.net/debian-azure wheezy main
64-
deb-src http://debian-archive.trafficmanager.net/debian-azure wheezy main
6558

59+
6. Add Debian's Azure repositories to /etc/apt/sources.list for either Debian 8 or 9:
60+
6661
**Debian 8.x "Jessie"**
67-
62+
deb http://debian-archive.trafficmanager.net/debian jessie main
63+
deb-src http://debian-archive.trafficmanager.net/debian jessie main
64+
deb http://debian-archive.trafficmanager.net/debian-security jessie/updates main
65+
deb-src http://debian-archive.trafficmanager.net/debian-security jessie/updates
66+
deb http://debian-archive.trafficmanager.net/debian jessie-updates main
67+
deb-src http://debian-archive.trafficmanager.net/debian jessie-updates main
6868
deb http://debian-archive.trafficmanager.net/debian jessie-backports main
6969
deb-src http://debian-archive.trafficmanager.net/debian jessie-backports main
70-
deb http://debian-archive.trafficmanager.net/debian-azure jessie main
71-
deb-src http://debian-archive.trafficmanager.net/debian-azure jessie main
7270

71+
**Debian 9.x "Stretch"**
72+
deb http://debian-archive.trafficmanager.net/debian stretch main
73+
deb-src http://debian-archive.trafficmanager.net/debian stretch main
74+
deb http://debian-archive.trafficmanager.net/debian-security stretch/updates main
75+
deb-src http://debian-archive.trafficmanager.net/debian-security stretch/updates main
76+
deb http://debian-archive.trafficmanager.net/debian stretch-updates main
77+
deb-src http://debian-archive.trafficmanager.net/debian stretch-updates main
78+
deb http://debian-archive.trafficmanager.net/debian stretch-backports main
79+
deb-src http://debian-archive.trafficmanager.net/debian stretch-backports main
7380

74-
1. Install the Azure Linux Agent:
81+
7. Install the Azure Linux Agent:
7582

7683
# sudo apt-get update
7784
# sudo apt-get install waagent
78-
2. For Debian 7, it is required to run the 3.16-based kernel from the wheezy-backports repository. First create a file called /etc/apt/preferences.d/linux.pref with the following contents:
85+
86+
8. For Debian 9+, it is recommended to use the new Debian Cloud kernel for use with VMs in Azure. To install this new kernel, first create a file called /etc/apt/preferences.d/linux.pref with the following contents:
7987

80-
Package: linux-image-amd64 initramfs-tools
81-
Pin: release n=wheezy-backports
88+
Package: linux-* initramfs-tools
89+
Pin: release n=stretch-backports
8290
Pin-Priority: 500
8391

84-
Then run "sudo apt-get install linux-image-amd64" to install the new kernel.
85-
3. Deprovision the virtual machine and prepare it for provisioning on Azure and run:
92+
Then run "sudo apt-get install linux-image-cloud-amd64" to install the new Debian Cloud kernel.
93+
94+
9. Deprovision the virtual machine and prepare it for provisioning on Azure and run:
8695

8796
# sudo waagent –force -deprovision
8897
# export HISTSIZE=0
8998
# logout
90-
4. Click **Action** -> Shut Down in Hyper-V Manager. Your Linux VHD is now ready to be uploaded to Azure.
99+
100+
10. Click **Action** -> Shut Down in Hyper-V Manager. Your Linux VHD is now ready to be uploaded to Azure.
91101

92102
## Next steps
93103
You're now ready to use your Debian 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).

0 commit comments

Comments
 (0)