Display a list of available operating systems on Vultr in pretty JSON

Vultr Cloud banner

Vultr, a Cloud hosting services provider, supports Docker Machine through their own Docker Machine driver, which you can install on Linux Mint 18 and Ubuntu 16.04 using this guide.

With the driver installed, you may then provision Dockerized hosts, or machines, on the Vultr platform using the docker-machine create command. A list of available operating systems on Vultr is accessible via this URL. That’s rendered by the browser in a JSON format that’s painful to read.

To obtain a JSON output that’s a lot more easy on the eyes, use the following curl command.

# Pipe output of the curl command through a Python script

curl -H 'Accept: application/json' \
 https://api.vultr.com/v1/os/list | python -mjson.tool

#

The output should be like the one shown below. Note that each operating system has an id.

# List of operating systems available on Vultr in pretty JSON

{
    "127": {
        "OSID": 127,
        "name": "CentOS 6 x64",
        "arch": "x64",
        "family": "centos",
        "windows": false
    },
    "147": {
        "OSID": 147,
        "name": "CentOS 6 i386",
        "arch": "i386",
        "family": "centos",
        "windows": false
    },
    "162": {
        "OSID": 162,
        "name": "CentOS 5 x64",
        "arch": "x64",
        "family": "centos",
        "windows": false
    },
    "163": {
        "OSID": 163,
        "name": "CentOS 5 i386",
        "arch": "i386",
        "family": "centos",
        "windows": false
    },
    "167": {
        "OSID": 167,
        "name": "CentOS 7 x64",
        "arch": "x64",
        "family": "centos",
        "windows": false
    },
    "128": {
        "OSID": 128,
        "name": "Ubuntu 12.04 x64",
        "arch": "x64",
        "family": "ubuntu",
        "windows": false
    },
    "148": {
        "OSID": 148,
        "name": "Ubuntu 12.04 i386",
        "arch": "i386",
        "family": "ubuntu",
        "windows": false
    },
    "160": {
        "OSID": 160,
        "name": "Ubuntu 14.04 x64",
        "arch": "x64",
        "family": "ubuntu",
        "windows": false
    },
    "161": {
        "OSID": 161,
        "name": "Ubuntu 14.04 i386",
        "arch": "i386",
        "family": "ubuntu",
        "windows": false
    },
    "215": {
        "OSID": 215,
        "name": "Ubuntu 16.04 x64",
        "arch": "x64",
        "family": "ubuntu",
        "windows": false
    },
    "216": {
        "OSID": 216,
        "name": "Ubuntu 16.04 i386",
        "arch": "i386",
        "family": "ubuntu",
        "windows": false
    },
    "231": {
        "OSID": 231,
        "name": "Ubuntu 16.10 x64",
        "arch": "x64",
        "family": "ubuntu",
        "windows": false
    },
    "232": {
        "OSID": 232,
        "name": "Ubuntu 16.10 i386",
        "arch": "i386",
        "family": "ubuntu",
        "windows": false
    },
    "139": {
        "OSID": 139,
        "name": "Debian 7 x64 (wheezy)",
        "arch": "x64",
        "family": "debian",
        "windows": false
    },
    "152": {
        "OSID": 152,
        "name": "Debian 7 i386 (wheezy)",
        "arch": "i386",
        "family": "debian",
        "windows": false
    },
    "193": {
        "OSID": 193,
        "name": "Debian 8 x64 (jessie)",
        "arch": "x64",
        "family": "debian",
        "windows": false
    },
    "194": {
        "OSID": 194,
        "name": "Debian 8 i386 (jessie)",
        "arch": "i386",
        "family": "debian",
        "windows": false
    },
    "140": {
        "OSID": 140,
        "name": "FreeBSD 10 x64",
        "arch": "x64",
        "family": "freebsd",
        "windows": false
    },
    "230": {
        "OSID": 230,
        "name": "FreeBSD 11 x64",
        "arch": "x64",
        "family": "freebsd",
        "windows": false
    },
    "179": {
        "OSID": 179,
        "name": "CoreOS Stable",
        "arch": "x64",
        "family": "coreos",
        "windows": false
    },
    "225": {
        "OSID": 225,
        "name": "Fedora 24 x64",
        "arch": "x64",
        "family": "fedora",
        "windows": false
    },
    "124": {
        "OSID": 124,
        "name": "Windows 2012 R2 x64",
        "arch": "x64",
        "family": "windows",
        "windows": true
    },
    "159": {
        "OSID": 159,
        "name": "Custom",
        "arch": "x64",
        "family": "iso",
        "windows": false
    },
    "164": {
        "OSID": 164,
        "name": "Snapshot",
        "arch": "x64",
        "family": "snapshot",
        "windows": false
    },
    "180": {
        "OSID": 180,
        "name": "Backup",
        "arch": "x64",
        "family": "backup",
        "windows": false
    },
    "186": {
        "OSID": 186,
        "name": "Application",
        "arch": "x64",
        "family": "application",
        "windows": false
    }
}

#

Knowing the id of an operating system, you can now specify it when creating a Dockerized host on the Vultr platform. For example, to create a Dockerized host with Debian 8 Jessie, whose id is 193, as the base operating system, you would type the following command.

# Create a Dockerized host on Vultr with Debian 8 as the base operating system

docker-machine create -d vultr --vultr-os-id 193  --vultr-api-key $VTOKEN debian-vtr

#

A separate article on how to provision Dockerized hosts on Vultr is about to be published later today, so stay tuned!
Vultr Cloud banner

Related Post:  What is Kubernetes? An intro for beginners

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Hola! Did you notice that LinuxBSDos.com no longer run network ads?  Yep, no more ads from the usual suspects that track and annoy you across the Internet. But since I still need to pay to keep the site running, feel free to make a small donation by PayPal or your favorite cryptocurrency.

  • Bitcoin
  • Ethereum
  • Xrp
  • Bitcoin cash
  • Bitcoin sv
  • Litecoin
  • Binance coin
  • Cardano
  • Ethereum classic
Scan to Donate Bitcoin to bc1qzvlte2m224zkayhdc7fdfjkp2rsgt0l5a496ua

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x0F4362DFF77F3Ba0Dc637F5f3Eba35D09a2fA60C

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Xrp to r4ggjvL36njsMCYTkJ3S7cTHscPsMsSGQv

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Bitcoin cash to qrs0dedzp9t55af3nfwypydghp29r0xguy9s20fz2k

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Bitcoin sv to 15K9TLyVDBtLuG9cYvXCX9SSkq9C9oUKHK

Donate Bitcoin sv to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin sv

Scan to Donate Litecoin to LetJ9QQMb7u2LMZ9Tu6rtHwcBcQFW98fbG

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Binance coin to bnb1ga8trq08ssqepd90v6225nzfgy448pu5pw8gxp

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Cardano to addr1qx2354yw49etstfljpdhwja3ajjlt487lg95vu9ngy2q6vu4rf2ga2tjhqknlyzmwa9mrm997h20a7stgectxsg5p5esq5l7d9

Donate Cardano to this address

Scan the QR code or copy the address below into your wallet to send some Cardano

Scan to Donate Ethereum classic to 0xcD6CC972a2297FcafACDcfE042C55C69516a9264

Donate Ethereum classic to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum classic

Subscribe for updates. Trust me, no spam!

Sponsored links

1. Attend Algorithm Conference, a top AI and ML event.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.

Upcoming events

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest

On social media
Via my newsletter

Partner links

1. Attend Algorithm Conference, a top AI and ML event for 2021.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
Hacking, pentesting distributions

Linux Distributions for Hacking

Experts use these Linux distributions for hacking, digital forensics, and pentesting.

Categories
Archives

The authors of these books are confirmed to speak during

Algorithm Conference

T-minus AI

Author was the first chairperson of AI for the U.S. Air Force.

The case for killer robots

Author is the Director of the Center for Natural and Artificial Intelligence.

Why greatness cannot be planned

Author works on AI safety as a Senior Research Scientist at Uber AI Labs.