ERROR (CommandError): You must provide a username or user ID via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]

asked 2017-03-04 07:31:20 -0500

Martin gravatar image

Hi I am a novice at openstack. When I try to run the following command "nova boot --image <image-id> --flavor <flavor_id> --image <image_id> --nic net-id=<network-id> <vm_name>"

I get the following error "ERROR (CommandError): You must provide a username or user ID via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]"

Can somebody point me in the right direction of what to do ?

Kind Regards, Marin

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-03-06 12:40:02 -0500

Amitabh Sinha gravatar image

You can solve the above problem by creating a simple script with all the parameters which is required to authenticate you.

Here is the script content vi admin_creds

Paste the following:

export OS_TENANT_NAME=admin export OS_USERNAME=admin export OS_PASSWORD=admin_pass export OS_AUTH_URL=http://controller:35357/v2.0

edit it according to your environment save and quite .. just source it and run the command whatever you want to run.

edit flag offensive delete link more

Comments

This is documented here, assuming your cloud deploys Keystone API v2: https://docs.openstack.org/user-guide....

Bernd Bausch gravatar imageBernd Bausch ( 2017-03-06 15:58:40 -0500 )edit

Thank you very much, solved it

Martin gravatar imageMartin ( 2017-03-07 08:59:38 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-03-04 07:31:20 -0500

Seen: 3,073 times

Last updated: Mar 06 '17