Project

General

Profile

Azure VPS setup notes » History » Version 59

Jon Goldberg, 11/19/2025 07:29 PM

1 12 Jon Goldberg
{{last_updated_at}} by {{last_updated_by}}
2
3 14 Jon Goldberg
# Microsoft Azure - Setup
4 6 Jon Goldberg
5 14 Jon Goldberg
## For the Client
6 6 Jon Goldberg
7 22 Jon Goldberg
Hi there!  If I've directed you to this page, the part that concerns you are the first three sections only.  It's a bit convoluted, so feel free to ask me if you run into trouble! -Jon
8 14 Jon Goldberg
9 1 Jon Goldberg
[**NOTE**: Most of Microsoft's pages break with an ad blocker enabled.]
10 6 Jon Goldberg
11
### Get a Sponsorship
12
* [Go to the Nonprofit Microsoft Getting Started page](https://nonprofit.microsoft.com/en-us/getting-started).  Fill out the paperwork to be approved as a 501c3.  Approval can take 1 day or 3-4 weeks - I've seen both multiple times.
13
* Once approved, go to https://www.microsoft.com/en-us/nonprofits/azure to claim credits (or go directly to [Claiming Your Credits](https://nonprofit.microsoft.com/en-us/offers/azure).
14 41 Jon Goldberg
* You'll know you're successful because you'll see a sponsorship listed on the [Sponsorship Page](https://www.microsoftazuresponsorships.com/Balance).
15 6 Jon Goldberg
16
### Create a Subscription
17
18 1 Jon Goldberg
* Check that you have credits in your sponsored account: https://www.microsoftazuresponsorships.com/Balance
19
* Visit the [Azure Portal](https://portal.azure.com).  
20
* Click the **Subscriptions** icon.
21
* Click the **Add** button.
22
* Add a subscription of type "Microsoft Azure Sponsorship" from the Azure portal. You will likely need to select **Show other subscription types** to see it.
23
 * **Note**: Even sponsored subscriptions require a credit card, make sure you have one available.
24
25 22 Jon Goldberg
### Grant access to other users
26 59 Jon Goldberg
Microsoft has made recent changes to this system, so these are experimental instructions.  I may ask you to take additional steps!
27
* Log in to https://entra.microsoft.com.
28
* Select **Users** from the left navigation menu.
29
* Click **New User » Invite External User**.
30
* Add my email (jon@megaphonetech.com) and display name (Jon Goldberg).
31
* On the *Assignments* tab, click **Add Role**, then grant me the **Global Administrator** role.
32
* Go to the *Review and Invite* tab, and click **Invite** at the bottom of the screen.
33 22 Jon Goldberg
34 42 Jon Goldberg
### On Renewals
35 49 Jon Goldberg
You will need to renew every year.  Instructions for this are incomplete - but you should go to your [Azure portal](https://portal.azure.com) and click the **Subscriptions** button (see screenshot 1 below).  Find the subscription ID (screenshot 2) - it's a string of numbers and letters.  Then go to https://www.microsoftazuresponsorships.com/Balance and assign your new credits to the existing subscription.
36 42 Jon Goldberg
37 1 Jon Goldberg
If you did not do this in time, you should be able to open a support ticket with Microsoft to request a refund.
38 49 Jon Goldberg
39
**Screenshot 1**
40
![Azure portal toolbar, "Subscriptions" is circled](Selection_2157.png)
41
**Screenshot 2**
42
![Azure portal Subscriptions screen, a red arrow points to the Subscription ID](Selection_2158.png)
43 42 Jon Goldberg
44 16 Jon Goldberg
## Technical Configuration
45
To set up a free account, you must:
46
* Get a Sponsorship (see above)
47
* Create a Subscription linked to the Sponsorship (see above)
48
* (Strongly recommended) Grant access to the subscription to other users.
49
* Create a Resource Group linked to the Subscription
50
* Create a Virtual Machine (and associated resources) linked to the Resource Group
51 14 Jon Goldberg
52
### Create a resource group
53 47 Jon Goldberg
* Select "Resource Groups" from the main Azure portal (left sidebar).
54 28 Jon Goldberg
* Select **Create** and give it a name.
55 1 Jon Goldberg
* Your subscription should be pre-selected since you only have the one.
56 23 Jon Goldberg
* Click **Review and Create**, then **Create**.
57 6 Jon Goldberg
58 1 Jon Goldberg
### Create a virtual machine
59 14 Jon Goldberg
* Click on your new resource group in the Azure Portal.
60 30 Jon Goldberg
* Click **Create**.
61 53 Jon Goldberg
* Search for the name of the image you want (e.g. `Debian 13 "Trixie`).
62
 * If you picked an image that shows an hourly cost, it's the wrong one.
63
* See the screenshots below for configuration of the "Basics" and "Disk" tabs.  The other tabs I keep with the defaults.  My standard VPS type is now `D2ps_v6`.
64
 * "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.
65 9 Jon Goldberg
66 54 Jon Goldberg
![Create a VM - Basics Tab](Selection_2678.png)
67 9 Jon Goldberg
68 54 Jon Goldberg
![Create a VM - Disks Tab](Selection_2679.png)
69 6 Jon Goldberg
70 14 Jon Goldberg
### Post-provisioning configuration
71 10 Jon Goldberg
72 37 Jon Goldberg
#### Get serial console working
73 1 Jon Goldberg
Serial console is necessary for single-user mode, and troubleshooting if SSH fails.
74 57 Jon Goldberg
75
It's normally working out of the box now.  Go to "Serial Console" in the VM left navigation.  If it doesn't work:
76
77 1 Jon Goldberg
* Go to **Boot Diagnostics** in the VM's left nav.
78
* Click **Settings** at the top.
79 44 Jon Goldberg
* Select **Enable with managed storage account**.
80
* Save.
81 1 Jon Goldberg
82 37 Jon Goldberg
Now Serial Console will work.
83
84 8 Jon Goldberg
#### Modify Firewall Rules
85
* Click on your new virtual machine in the Azure portal.
86 14 Jon Goldberg
* Click **Networking** in the side navigation.
87 6 Jon Goldberg
* You should see your firewall settings.  They should look like the screenshot below, except they'll be missing the two items circled.
88
* Add the "allow_ping" and "Port_5665" rules to the *Inbound Port Rules* as shown in the screenshot.
89
90
![Firewall Rules](https://hq.megaphonetech.com/attachments/download/1772/Selection_999(012).png)
91
92
#### Add a swapfile
93
[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:
94
95
```
96 27 Jon Goldberg
    ResourceDisk.Format=y
97
    ResourceDisk.EnableSwap=y
98
    ResourceDisk.SwapSizeMB=8192
99
```
100 1 Jon Goldberg
101
Then run `service walinuxagent restart`.