Not able to attach Network as an alias to existing private network attached to Virtual Machine

Hi,

I am attaching public network to Virtual Machine’s private network as an alias using xml-rpc api. But getting following error. “WRONG STATE TO PERFORM ACTION. [ONE.VM.ATTACHNIC] ALIAS NOT FOUND.”
Here is my template

<TEMPLATE>
    <NIC_ALIAS>
       <NETWORK_ID>120</NETWORK_ID>
       <NETWORK>PUBLICNET</NETWORK>
       <PARENT>vn-01</PARENT>
       <NETWORK_UNAME>oneadmin</NETWORK_UNAME>
   </NIC_ALIAS>
</TEMPLATE>

using one.vm.attachnic method

Could you, please, provide an information about OpenNebula version we are using (e.g. the output of oned --version executed on the front-end node) as well as information about your parent network vn-01 the alias to which your trying to add to:

onevnet show vn-01 -j