I'm trying to install OpenStack compute (nova) .. when I run command **nova list**
then out the results ERROR: You must provide a username via either --os_username or env[OS_USERNAME]
how to code a solution for me?

- 49
- 1
- 1
- 5
5 Answers
If you used devstack (http://devstack.org/) to deploy OpenStack you can use openrc trick:
$cd devstack/
$source openrc admin admin # for admin rights
or
$source openrc demo demo # for demo user
Otherwise you need to export OS variables manually:
$export OS_USERNAME = admin
$export OS_TENANT_NAME = <yourtenant>
$export OS_PASSWORD = <yourpasswd> # password which you used during deployment etc
Related question How to manage users/passwords in devstack?
If you want manually install all the services here's handy manual https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/blob/OVS_MultiNode/OpenStack_Grizzly_Install_Guide.rst
I'd recommend to install it once by this manual to learn how it works, and then use latest stable devstack each time when you need to set up a new environment just to save your time.
Regards
-
hi max...if i use devstack how to install network and router in devstack .. because my current devstack no network and router – Elvis Jon Freddy Sitinjak Dec 11 '13 at 08:24
-
You will need to set up them either via CLI or Horizon (Web UI) after stack.sh is done. The second is easier for beginning. Try to find some guide for this, I assume there are a lot of them. Devstack is not responsible for this. – Max Lobur Dec 11 '13 at 09:29
-
What is the os_tenant_name? Tenants are the VM instances that the openstack manages? What if I have no tenants? – Victor Pudeyev Mar 05 '14 at 00:46
-
Tenant is like access group (it has internal name "project"). You need to have at least one tenant to work with OpenStack Nova etc. Devstack creates a few tenants by default (default are admin, demo, alt_demo, invisble_to_admin, service), you can list them by issuing "keystone tenant-list" (note that you may not be able to list until you "source devstack/openrc admin admin"). Please refer to keystone client for other commands like create etc. The easier way to switch tenants for beginning is source openrc
to remove this error you just need to execute command "source openrc"
where openrc is the file where in all the credentilas are stored .. make sure you have that file in the folder. You might also have name of the file something other than open but it ll end with rc .. just change the name according to your file

- 178
- 1
- 11
I did the following to get rid of the error.
cd devstack
. openrc #this will setup the environment

- 516
- 1
- 8
- 23
the below command is used to get access right of "admin" and use the project "admin"
. openrc admin admin

- 935
- 7
- 13