Disk attach JAVA OCA


I’m developing an app with the Java API of OpenNebula 5.2 and I’m not able to attach disk. I call:

VirtualMachine.diskAttach(client, vmId, diskTemplate);

where disk template is:

DISK = [ IMAGE = "image_name", IMAGE_UNAME= "user_name" ]

(I checked the sunstone action when doing the same and it’s disk template is like this)

And I don’t get any error but the disk is not attached.

¿Anyone deal with a problem like that?