简体   繁体   English

openstack compute(nova)“错误”

[英]openstack compute (nova) “error”

我正在尝试安装OpenStack compute(nova)..当我运行命令**nova list**然后输出结果错误:你必须通过--os_username或env [OS_USERNAME]提供一个用户名如何编写解决方案的代码我?

If you used devstack ( http://devstack.org/ ) to deploy OpenStack you can use openrc trick: 如果您使用devstack( http://devstack.org/ )部署OpenStack,您可以使用openrc技巧:

$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? 相关问题如何在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 如果你想在这里手动安装所有服务的方便手册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. 我建议您通过本手册安装一次以了解它的工作原理,然后在每次需要设置新环境时使用最新的稳定devstack以节省您的时间。

Regards 问候

to remove this error you just need to execute command "source openrc" 要删除此错误,您只需执行命令“source openrc”

where openrc is the file where in all the credentilas are stored .. make sure you have that file in the folder. 其中openrc是存储所有凭证的文件。确保文件夹中包含该文件。 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 您可能还有文件的名称而不是打开,但它将以rc结尾..只需根据您的文件更改名称

在我的情况下,我需要调用“source stackrc”,它解决了问题。

I did the following to get rid of the error. 我做了以下以摆脱错误。

cd devstack
. openrc #this will setup the environment

以下命令用于获取“admin”的访问权限并使用项目“admin”

 . openrc admin admin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM