[SOLVED] [one.template.instantiate] Failed to clone images: Not authorized to perform USE IMAGE [0]

solved
(Fayaz Khan) #1

hi

i am creating vm in via VDC user .i am facing this issue kindly let me know how to resolve this issue. can any body help me .

[one.template.instantiate] Failed to clone images: Not authorized to perform USE IMAGE [0]

1 Like

(Almero Rademeyer) #2

I have the same problem . Did you manage to get this resolved ?

0 Likes

(Alejandro Huertas) #3

Hello @Almero_Rademeyer

If you have a template with images associated, you need to give use permission to the template and also to all the images, so the user can use both.

0 Likes

(Almero Rademeyer) #4

Hi Yes , I have been applying permissions for two days , even set Admin rights to the user group . Still no success . Here is an extract on the template and user examples >

onetemplate show 10
TEMPLATE 10 INFORMATION
ID : 10
NAME : cssa-neb-template-win10
USER : oneadmin
GROUP : users
LOCK : None
REGISTER TIME : 03/27 15:20:04

PERMISSIONS
OWNER : uma
GROUP : u–
OTHER : u–

TEMPLATE CONTENTS
CONTEXT=[
NETWORK=“YES”,
SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
CPU=“1”
DESCRIPTION=“Windows 10 Premium”
DISK=[
IMAGE_ID=“0”,
OPENNEBULA_MANAGED=“NO” ]
GRAPHICS=[
LISTEN=“0.0.0.0”,
TYPE=“VNC” ]
HYPERVISOR=“vcenter”
INPUTS_ORDER=""
LOGO=“images/logos/windows8.png”
MEMORY=“4096”
MEMORY_UNIT_COST=“MB”
NIC=[
NETWORK_ID=“0”,
OPENNEBULA_MANAGED=“NO” ]
OS=[
BOOT="" ]
USER_INPUTS=[
CPU=“O|fixed|| |1”,
MEMORY=“M|list||4096,6144,8192|4096”,
VCPU=“O|list||1,2,4|1” ]
VCENTER_CCR_REF=“domain-c49”
VCENTER_INSTANCE_ID=“f8f4fcdb-1361-4de5-a652-2e0ad7ef0018”
VCENTER_TEMPLATE_REF=“vm-109”
VCENTER_VM_FOLDER=“Nebula”
VCPU=“1”

And the test user using core authentication >

oneuser show 5
USER 5 INFORMATION
ID : 5
NAME : JDT
GROUP : users
SECONDARY GROUPS: 1,102
PASSWORD : 034b4625c77b5a29719d4c491fec29bff7dd118e
AUTH_DRIVER : core
ENABLED : Yes

TOKENS

USER TEMPLATE
TOKEN_PASSWORD=“42f3b4f6ba6c3a3340fd06e4f10852c73c4868f0”

VMS USAGE & QUOTAS

          VMS               MEMORY                  CPU     SYSTEM_DISK_SIZE
  0 /       8        0M /       8M      0.00 /     8.00        0M /       8M

VMS USAGE & QUOTAS - RUNNING

  RUNNING VMS       RUNNING MEMORY          RUNNING CPU
  0 /       8        0M /       8M      0.00 /     8.00

DATASTORE USAGE & QUOTAS

NETWORK USAGE & QUOTAS

IMAGE USAGE & QUOTAS

      ID          RUNNING VMS
       0         0 /        8
0 Likes

(Almero Rademeyer) #5

I just tested while tailing oned.log , it clearly states access denied

Thu Mar 28 12:17:53 2019 [Z0][ReM][D]: Req:2304 UID:5 one.template.info invoked , 10, true
Thu Mar 28 12:17:53 2019 [Z0][ReM][E]: Req:2304 UID:5 one.template.info result FAILURE [one.template.info] User [5] : Not authorized to perform USE IMAGE [0].
Thu Mar 28 12:17:56 2019 [Z0][ReM][D]: Req:240 UID:0 one.zone.raftstatus invoked
Thu Mar 28 12:17:56 2019 [Z0][ReM][D]: Req:240 UID:0 one.zone.raftstatus result SUCCESS, “<SERVER_ID>-1<…”

0 Likes

(Alejandro Huertas) #6

Could yo please send me the output of oneimage show 0?

0 Likes

(Almero Rademeyer) #7

Hi There , as expected it appears there is no 0 .

onetemplate show 0
[one.template.info] Error getting virtual machine template [0].

0 Likes

(Alejandro Huertas) #8

Hi @Almero_Rademeyer

I meant the image, no the template, the command is oneimge show 0.

0 Likes

(Almero Rademeyer) #9

Hi there , i re deployed vONE appliance to get a clean start .

Attached is the new windows 10 template . I noticed I have to add my individual users to oneadmin group to deploy . So i guess I would need a separate template for each user group

IMAGE 0 INFORMATION
ID : 0
NAME : cssa-neb-template-win10 - CSSA-STB-ESX-99-LOCAL [template 1]
USER : oneadmin
GROUP : oneadmin
LOCK : None
DATASTORE : CSSA-STB-ESX-99-LOCAL(IMG)
TYPE : OS
REGISTER TIME : 04/01 06:12:58
PERSISTENT : No
SOURCE : cssa-neb-template-win10/cssa-neb-template-win10.vmdk
PATH : vcenter://cssa-neb-template-win10/cssa-neb-template-win10.vmdk
SIZE : 25G
STATE : rdy
RUNNING_VMS : 0

PERMISSIONS
OWNER : um-
GROUP : —
OTHER : —

IMAGE TEMPLATE
DEV_PREFIX=“sd”
VCENTER_IMPORTED=“YES”

VIRTUAL MACHINES

0 Likes

(Alejandro Huertas) #10

Hi @Almero_Rademeyer

You don’t need to add your user to the oneadmin group. You just need to give use permission to others on that image.

0 Likes

(Almero Rademeyer) #11

Then I am missing a step .
Below is a screenshot of the test user for POC . ( as seen by CloudAdmin )

And when I test with a new user called JDT I still get access denied to image 0

0 Likes

(Alejandro Huertas) #12

Because, your template has an image associated, so the user needs use permission on that image too, you have to go to the image and give that use permission.

0 Likes

(Almero Rademeyer) #13

THANK YOU VERY MUCH , that was the missing step . Your excellent support will go a long way for me to motivate us getting paid for support for vONE .

0 Likes

(Alejandro Huertas) #14

Nice! And remember, this case is the same for NICS, if you have any NIC in your template, you need to give use permission to others.

1 Like