openstack compute (nova) "error"

Elvis Jon Freddy Sitinjak picture Elvis Jon Freddy Sitinjak · Nov 27, 2013 · Viewed 25.4k times · Source

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?

Answer

Max Lobur picture Max Lobur · Dec 3, 2013

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