January 24

Linux: MAAS – cli error when uploading an image

When trying to do MAAS commands you may receive an error similar to:

argument COMMAND: invalid choice: ‘boot-resource’ (choose from ‘login’, ‘logout’ … )

This error is due to you not being logged into the MAAS server from the command line.

To login use the following syntax:

  1. maas login yourmaasadminuser http://localhost:5240/MAAS
  2. paste your API Key. (This can be found from your MAAS gui. Click on the user name at the top right hand corner of the page and then click API keys under details.
  3. If the user and API key are correct you will receive a message that ‘You are now logged in to the MAAS server at http://localhost:5240?MAAS/api/2.0/ with the profile name ‘yourmaasadminuser’.
  4. You can now enter you commands and they should work as long as you command syntax is correct.

By: tconrad


Copyright 2021. All rights reserved.

Posted January 24, 2022 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B