[ovirt-users] assign hostname to vm using REST API
Shahar Havivi
shaharh at redhat.com
Sun Aug 10 08:29:04 UTC 2014
On 06.08.14 12:36, naaz wrote:
> I am using REST API to integrate rhev with java(not SDK)
> I am trying to assign hostname to vm but showing some bad request error.
if its a bad request it may be you are not using the PUT http method?
(PUT if you are updating POST if you are creating new VM)
>
> I have created template from vm which have cloud init package in it also m
> using rhev 3.4.
> Do i need to use payload method if so please provide me the proper code for
> both -for passing payload through code in url and the payload file sample
>
> can anyone plz tell me how to do it?
Take a look here:
http://www.ovirt.org/Features/Cloud-Init_Integration
Make sure that you are adding to the http header "Content-Type=Application/xml"
<vm>
...
<initialization>
<cloud_init>
<host>
<address>cloudInitInstanceName</address>
</host>
...
>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
More information about the Users
mailing list