Missing DISK mandatory attributes (SOURCE, TM_MAD, CLONE, DATASTORE_ID)

Hi,

I have created correctly an image and a template but I get the following error while instantiating a VM

The error:

Fri Jan 27 22:37:56 2017 [Z0][VM][I]: New LCM state is PROLOG
Fri Jan 27 22:37:56 2017 [Z0][TM][E]: missing DISK mandatory attributes (SOURCE, TM_MAD, CLONE, DATASTORE_ID) for VM 0, DISK 0
Fri Jan 27 22:37:56 2017 [Z0][VM][I]: New LCM state is PROLOG_FAILURE

The image config:

[root@vdicone01 one]# oneimage list
ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS
0 oneadmin oneadmin Windows10 nfs-vdic-i 40G OS No used 1
[root@vdicone01 one]# oneimage show 0
IMAGE 0 INFORMATION
ID : 0
NAME : Windows10
USER : oneadmin
GROUP : oneadmin
DATASTORE : nfs-vdic-images
TYPE : OS
REGISTER TIME : 01/27 17:35:54
PERSISTENT : No
SOURCE :
PATH : /mnt/nfs-vdic-images/W10/Windows10.qcow2
FSTYPE : qcow2
SIZE : 40G
STATE : used
RUNNING_VMS : 1

PERMISSIONS
OWNER : um-
GROUP : —
OTHER : —

IMAGE TEMPLATE
DESCRIPTION="Windows10 base image"
DEV_PREFIX="hd"
DRIVER=“qcow2”

Template config:

[root@vdicone01 one]# onetemplate show 0
TEMPLATE 0 INFORMATION
ID : 0
NAME : Windows10-template
USER : oneadmin
GROUP : oneadmin
REGISTER TIME : 01/27 20:12:21

PERMISSIONS
OWNER : um-
GROUP : —
OTHER : —

TEMPLATE CONTENTS
CPU="0.1"
DISK=[
IMAGE=“Windows10” ]
GRAPHICS=[
KEYMAP=“es”,
LISTEN=“0.0.0.0”,
TYPE=“SPICE” ]
HYPERVISOR="kvm"
LOGO="images/logos/windows8.png"
MEMORY="2048"
NIC=[
NETWORK=“VDI” ]
NIC_DEFAULT=[
MODEL=“virtio” ]
VCPU=“2”

System datastore:

[root@vdicone01 one]# onedatastore show 0
DATASTORE 0 INFORMATION
ID : 0
NAME : system
USER : oneadmin
GROUP : oneadmin
CLUSTERS : 0,100
TYPE : SYSTEM
DS_MAD : -
TM_MAD : ssh
BASE PATH : /var/lib/one//datastores/0
DISK_TYPE : FILE
STATE : READY

DATASTORE CAPACITY
TOTAL: : -
FREE: : -
USED: : -
LIMIT: : -

PERMISSIONS
OWNER : um-
GROUP : u–
OTHER : —

DATASTORE TEMPLATE
DISK_TYPE="FILE"
DS_MIGRATE=“YES"
RESTRICTED_DIRS=”/“
SAFE_DIRS=”/var/tmp"
SHARED="NO"
TM_MAD="ssh"
TYPE=“SYSTEM_DS”

Images datastore:

[root@vdicone01 one]# onedatastore show 100
DATASTORE 100 INFORMATION
ID : 100
NAME : nfs-vdic-images
USER : oneadmin
GROUP : oneadmin
CLUSTERS : 0,100
TYPE : IMAGE
DS_MAD : fs
TM_MAD : shared
BASE PATH : /var/lib/one//datastores/100
DISK_TYPE : FILE
STATE : READY

DATASTORE CAPACITY
TOTAL: : 80G
FREE: : 59.4G
USED: : 20.5G
LIMIT: : -

PERMISSIONS
OWNER : um-
GROUP : u–
OTHER : —

DATASTORE TEMPLATE
CLONE_TARGET="SYSTEM"
DS_MAD="fs"
LN_TARGET="NONE"
NAME=“nfs-vdic-images"
SAFE_DIRS=”/var/tmp /mnt/nfs-vdic-images"
TM_MAD="shared"
TYPE=“IMAGE_DS”

IMAGES
0

Anyone has experienced the same issue?

Thanks a lot.

It is missing the SOURCE attribute indeed,

Maybe you have imported the image and enable it but it is not in a consistent state.

Hi Ruben,

To create the Windows 10 image I have run the following command:

oneimage create --name Windows10 --driver qcow2 --datastore nfs-vdic-images --type OS --path /mnt/nfs-vdic-images/W10/Windows10.qcow2 --description “Windows10 base image”

It has been created without errors…

Thanks a lot.

Hi,

I have tried to create the image copy from the sunstone GUI and it has created it correctly and automatically it has populated the SOURCE parameter. Nevertheless, when I execute the same from the command line, it does not populate the source parameter.

May I redirect this post to the developers ?

Thanks a lot.

Can you check that the command oneimage list does not show the image in fail state? It should stay for some time in lock state while it copies and after that it should turn into rdy or fail. If it turns into fail state can you check /var/log/one/oned.log for any errors registering the image?

Hi,

It the status was “rdy” and afterwards I could create a template and isntantiate it later as usual.

Yesterday, I tried again the same process and everything worked perfectly.

@Tip: I get out of space in one of my opennebula’s kvm node therefore is it possible there could be an unexpected behaviour under theese circumstances.

Thanks a lot!