[Openstack] Assume user or create a instance for a user as admin

Kim Gert Nielsen kgn at one.com
Thu Mar 2 07:02:57 UTC 2017


On Wed, Mar 01, 2017 at 02:41:37PM +0000, Mike Smith wrote:
>    Using the nova command, you can do ‘nova —os-project-name=PROJECT_NAME
>    boot’ to create an instance in that tenant, assuming your admin user has
>    access to that tenant.    You could also export the OS_PROJECT_NAME
>    environment variable to your desired project and use the nova or openstack
>    commands directly.

Thanks for the reply :) yeah I actuall already tried that but when I do:

openstack --os-project-name=demo server create --image
7f9879b0-179c-4e30-8f6d-e9668cb87f21 --flavor
46133cfb-0d90-4448-a897-a104994b2085 myfirstserver

I get

The request you have made requires authentication. (HTTP 401)
(Request-ID: req-2e24a07e-4656-4c78-926f-9c8a6577b57b)

if I remove the --os-project-name and just use my environment like this

export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=nevergonnagiveyouup
export
OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2

I get the server created but within the admins project

-- 
Kim Gert Nielsen




More information about the Openstack mailing list