How to install Debian VM Image from Linode
Linode is a Cloud Service Provider just like AWS, GCP or Azure.
They provide a nice CLI interface where you can create and manage VM.
Here is a quick introduction how you can create Debian 11 VM using linode-cli
Contents
Linode Documentation
Debian Images
- Debian 11 VM Image is available as of Aug 14, 2021
SSH Keys
It's easier to add ssh keys from "My Profile" => "SSH Keys" => "Add an SSH Key"
Linode CLI
- Linode CLI is a great way to automate creating/rebuilding/deleting VM with CLI.
List of Available Types
To see a list of available types for your vm using linode-cli command:
% linode-cli linodes types | egrep '(nanode|standard)' | awk '{print 2ドル}'
g6-nanode-1
g6-standard-1
g6-standard-2
g6-standard-4
g6-standard-6
g6-standard-8
g6-standard-16
g6-standard-20
g6-standard-24
g6-standard-32I used g6-nanode-1 since that's the least expensive option.
See https://www.linode.com/pricing/#compute-shared for more information.
List of Available Regions
To see a list of available regions where you can place your vm using linode-cli command:
% linode-cli regions list | grep Linodes | awk '{print 2ドル}' | sort
ap-northeast
ap-south
ap-southeast
ap-west
ca-central
eu-central
eu-west
us-central
us-east
us-southeast
us-westI used us-west since that's where I'm located.
Listing Available Images
To see a list of available debian images for VM using linode-cli command:
% linode-cli images list | awk '{print 2ドル}' | grep linode | cut -d'/' -f2 | sort | grep debian
debian10
debian11
debian8
debian9
debian9-kube-v1.19.11
debian9-kube-v1.20.7
debian9-kube-v1.21.1
Creating Debian VM Image
To create Debian VM Image using linode-cli command:
Make sure to choose available region, type and image from above.
% linode-cli linodes create --label d11vm --type g6-nanode-1 --region us-west --image linode/debian11 --root_pass Value for root_pass: ********
To create Debian VM image with SSH Keys, just add --authorized_users with your linode username.
This allows you to login the VM with SSH Key without typing password regardless the root password you've provided.
% linode-cli linodes create --label d11vm --type g6-nanode-1 --region us-west --image linode/debian11 --root_pass --authorized_users (your-linode-username) Value for root_pass: ********
┌──────────┬───────┬─────────┬─────────────┬─────────────────┬──────────────┬───────────────┐ │ id │ label │ region │ type │ image │ status │ ipv4 │ ├──────────┼───────┼─────────┼─────────────┼─────────────────┼──────────────┼───────────────┤ │ 88888811 │ d11vm │ us-west │ g6-nanode-1 │ linode/debian11 │ provisioning │ 192.168.1.11 │ └──────────┴───────┴─────────┴─────────────┴─────────────────┴──────────────┴───────────────┘
Login to Debian VM Image
When the provisioning VM is completed (it usually takes a few mins), you can login to your VM as root with the IP address assigned.
% linode-cli linodes list ┌──────────┬────────────────┬─────────┬─────────────┬─────────────────┬─────────┬───────────────┐ │ id │ label │ region │ type │ image │ status │ ipv4 │ ├──────────┼────────────────┼─────────┼─────────────┼─────────────────┼─────────┼───────────────┤ │ 88888810 │ d10vm │ us-west │ g6-nanode-1 │ linode/debian10 │ running │ 192.168.1.10 │ │ 88888811 │ d11vm │ us-west │ g6-nanode-1 │ linode/debian11 │ running │ 192.168.1.11 │ └──────────┴────────────────┴─────────┴─────────────┴─────────────────┴─────────┴───────────────┘
% ssh root@192.168.1.11 ... root@localhost:~# lsb_release -d Description: Debian GNU/Linux 11 (bullseye)