Error allocating a new virtual machine

Hello
I’m tring to Allocate new VM under user
my steps is
create new user (with core role) (one.user.allocate) - without any problem

then i’m tring to one.vm.allocate and send via rpc next info:
$values=array(
new PhpXmlRpc\Value($auth_user),
new PhpXmlRpc\Value($item_param[‘ostempl’]),
new PhpXmlRpc\Value(0,“boolean”),
);

$auth_use- login and password from one.user.allocate
$item_param[‘ostempl’] - contain name of template - in my case is “Debian 8.2 - KVM” so request looks like
$values=array(
new PhpXmlRpc\Value(“user:password”),
new PhpXmlRpc\Value(“Debian 8.2 - KVM”),
new PhpXmlRpc\Value(0,“boolean”),
);

and got response from server:
(
[0] =>
[1] => [VirtualMachineAllocate] Error allocating a new virtual machine. Parse error: syntax error, unexpected VARIABLE, expecting EQUAL or EQUAL_EMPTY at line 1, columns 8:9
[2] => 8192
)
:frowning:

can you please help me ?

Are you one.template.allocate or one.template.instantiate… ? Please refer
to
http://docs.opennebula.org/5.0/integration/system_interfaces/api.html for
the meaning and format of the arguments.

Also you can try from the CLI to see if the original template has a problem

Hi. Thx, i’;m already solved it :slight_smile: issue was in xml string… now seems all ok :slight_smile: thx