Project

General

Profile

Azure technical setup notes » History » Version 2

Jon Goldberg, 01/07/2026 08:25 PM

1 1 Jon Goldberg
# Azure technical setup notes
2
3
## Technical Configuration
4
To set up a free account, you must:
5
* Get a Sponsorship (see [[Azure_VPS_setup_notes]])
6
* Create a Subscription linked to the Sponsorship (see [[Azure_VPS_setup_notes]])
7
* (Strongly recommended) Grant access to the subscription to other users.
8
* Create a Resource Group linked to the Subscription
9
* Create a Virtual Machine (and associated resources) linked to the Resource Group
10
11
### Create a resource group
12
* Select "Resource Groups" from the main Azure portal (left sidebar).
13
* Select **Create** and give it a name.
14
* Your subscription should be pre-selected since you only have the one.
15
* Click **Review and Create**, then **Create**.
16
17
### Create a virtual machine
18
* Click on your new resource group in the Azure Portal.
19
* Click **Create**.
20
* Search for the name of the image you want (e.g. `Debian 13 "Trixie`).
21
 * If you picked an image that shows an hourly cost, it's the wrong one.
22 2 Jon Goldberg
23
#### Basics page configuration
24
* Set the virtual machine name (e.g. "wfa01" and pick a region.  US East doesn't have many servers available, US East 2 does. Note that region affects cost, be careful when picking other regions.
25
* Set the VM architecture to Arm64, *then* pick the image.  My current standard server is the D2ps_v6. 
26 1 Jon Goldberg
 * "D2" is general-purpose VM, we always select this.  "a" is AMD-series (old preference), "p" is ARM64, "d" is temp disk included (we don't need this), "s" supports premium SSD disks. v6 is the latest gen, always use the latest gen.
27 2 Jon Goldberg
* Set the username to you (`jon` in my case). Authentication type: SSH public key. SSH public key source: Use existing public key. SSH public key should be the key of the machine you intend to run Ansible from.
28
* Select all 3 public inbound ports: 22, 80, 443.
29
* Go to the **Disks** tab.
30 1 Jon Goldberg
31 2 Jon Goldberg
#### Disks tab configuration
32
* Change the OS disk size to 128GB.
33
* Optionally change "Premium SSD" to "standard SSD". I've wavered on this.
34
* Click **Review and create**, wait for validation to finish, then click **Create**.
35 1 Jon Goldberg
36
37
### Post-provisioning configuration
38 2 Jon Goldberg
Once the server is provisioned (takes a minute), click **Go to resource**.
39 1 Jon Goldberg
40
#### Get serial console working
41 2 Jon Goldberg
Serial console is necessary for single-user mode, and troubleshooting if SSH fails.  It's normally working out of the box now.  Go to "Serial Console" in the VM left navigation and ensure you see a Debian login screen.
42 1 Jon Goldberg
43
#### Modify Firewall Rules
44 2 Jon Goldberg
* Click **Networking settings** in the side navigation.
45 1 Jon Goldberg
* You should see your firewall settings.  They should look like the screenshot below, except they'll be missing the two items circled.
46
* Add the "allow_ping" and "Port_5665" rules to the *Inbound Port Rules* as shown in the screenshot.
47 2 Jon Goldberg
 * More recently, I've been restricting the *Source* on the *Port_5665* rule to the Icinga server's IP.
48 1 Jon Goldberg
49
![Firewall Rules](https://hq.megaphonetech.com/attachments/download/1772/Selection_999(012).png)
50
51
#### Add a swapfile
52
[Complete instructions are here](https://support.microsoft.com/en-us/help/4010058/how-to-add-a-swap-file-in-linux-azure-virtual-machines) but in short, add this to `/etc/waagent.conf` for an 8GB swapfile:
53
54
```
55
    ResourceDisk.Format=y
56
    ResourceDisk.EnableSwap=y
57
    ResourceDisk.SwapSizeMB=8192
58
```
59
60
Then run `service walinuxagent restart`.