Community

CLI questions

Avatar ringo458 1 week, 6 days ago

Can the CLI spin up a powered off node?
Can the CLI be ported to Windows?
Can the CLI upsize/downsize the RAM on a node before powering up?

I'd like to set up a 1024 instance. Shut off and then at different times boot up a larger RAM version but store it upon shutdown as a smaller RAM version. For obvious reasons. It does say somewhere that you can resize your RAM, without saying that you have to do that on billing month boundaries.

3 Replies

  • Can the CLI spin up a powered off node?

A Linode is automatically booted when it is created with the CLI. But, you can shutdown a Linode with the following command, where $LABEL is your Linode's name:

$ linode linode stop $LABEL

If you want to boot a powered off Linode, you can run:

$ linode linode start $LABEL
  • Can the CLI be ported to Windows?

The Linode CLI is built on Perl and works with the Linode API, so it's entirely possible to either port it or create your own version for Windows. However, the current version of the Linode CLI is only available for Linux and Mac OS, but if you are using Windows 10 you could try installing it with the Windows Subsystem for Linux

  • Can the CLI upsize/downsize the RAM on a node before powering up?

When a Linode is created with the CLI, it is automatically booted. If you want to resize it, you'll need to create it, power it down, resize, and then power it up. As far as I’m aware, there aren’t any limits on the number of times you can resize.

Updated for the new Linode CLI

  • Can the CLI spin up a powered off node?

Yes it can! See @wsmith's answer below. Remember that you can also issue shutdown and boot commands like so (where $ID is your Linode's ID number)

$ linode-cli linodes shutdown $ID

You can get the ID with linode-cli linodes list.

If you want to boot a powered off Linode, you can run:

$ linode-cli linodes boot $ID
  • Can the CLI be ported to Windows?

The new Linode CLI is built on Python and works with the Linode v4 API, so it could definitely run on Windows. If you're having trouble getting Python up and running on a Windows 10 Machine, check out this helpful guide.

  • Can the CLI upsize/downsize the RAM on a node before powering up?

Yes, it can! See @wsmith's answer below.

If you try the new Linode CLI on Windows, please report back about how it went and open issues on github with any problems you encounter. In theory it should work fine, but I haven't tested it personally.

  • Can the CLI spin up a powered off node?

There's a better way ;)

linode-cli linodes create --root_pass 's3cureP@ssw0rd' --booted no

(this is assuming you have a default region, image, and type configured)

Passing --booted no into linodes create will tell the CLI not to boot the new Linode. You can get more information on what an individual action can do with --help, for example:

linode-cli linodes create --help

You can find specific examples of each command on the official docs at developers.linode.com.

Reply

Please enter an answer
Tip:

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct