Creating a Free Tier VM
- Create a VPC and subnet with IPv6 enabled.
- Configure VPC Firewall.
- Create Instance Template for reuse.
- Select Debian amd64 image, which avoids Snap from Ubuntu and OOM problems with
dnf
. - Change disk type to “standard persistent disk”.
- Select e2-micro instance type and one of the Free Tier-eligible regions.
- Select Debian amd64 image, which avoids Snap from Ubuntu and OOM problems with
- Create instance from template.
- Select “No service account”.
- Unselect custom device name of boot disk.
- Enable “block project-wide SSH keys” and “deletion protection” if you want to.
Instance Template
- Select e2-micro machine type.
- Change disk type to standard and size to 30 GB.
- Select the OS image you want.
- Select VPC and subnet.
- Select “IPv4 and IPv6” IP stack.
- If you prefer not to log in via the console, add SSH keys in Security with one word “comment” as the username.
KEY_VALUE USERNAME
Network Egress
Avoid China and Australia destinations, e.g. derp5-all.tailscale.com
(Australia).
Swap
Caution
It is not recommended to use RHEL-compatible Linux distributions on an e2-micro instance.
1 GB memory is not enough for dnf upgrade
with many repos (per Bug 1907030). Set up swap space as follows.
Before dnf upgrade
, remove unused packages.