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:
- maas login yourmaasadminuser http://localhost:5240/MAAS
- 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.
- 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’.
- You can now enter you commands and they should work as long as you command syntax is correct.
By: tconrad