<div dir="ltr"><div><div><div><div>Hi,<br><br><br></div>I am trying to create file using same API, as shown below:<br>--------------------------------------------------<br>scontent="Hello World !!"<br><br>vm_service.start(<br> use_cloud_init=True,<br> vm = types.Vm(<br> initialization=types.Initialization(<br> cloud_init=types.CloudInit(<br> files=[types.File(name="/root/hello.conf", content=scontent, type="PLAINTEXT")],<br> ),<br> ),<br> ),<br>)<br>----------------------------------------------------<br><br></div>Can someone help me to understand ? why it is not working.<br></div>Or Is that variable "cloud_init=" not handled in ovirt ?<br><br></div>Thanks,<br><div><div>~Rohit<br></div><div><br><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 16, 2017 at 7:33 PM, Juan Hernández <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/16/2017 02:22 PM, TranceWorldLogic . wrote:<br>
> Hi,<br>
><br>
> I am trying to use cloud-int to provide some text file in guest OS as<br>
> mention in below link. (tried using sdk)<br>
> But it is not working.<br>
> <a href="http://www.ovirt.org/develop/release-management/features/cloud/cloud-init-integration/" rel="noreferrer" target="_blank">http://www.ovirt.org/develop/<wbr>release-management/features/<wbr>cloud/cloud-init-integration/</a><br>
><br>
<br>
</span>What SDK are you using? I guess that the Python SDK. Did you try this<br>
example:<br>
<br>
<br>
<a href="https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/start_vm_with_cloud_init.py" rel="noreferrer" target="_blank">https://github.com/oVirt/<wbr>ovirt-engine-sdk/blob/master/<wbr>sdk/examples/start_vm_with_<wbr>cloud_init.py</a><br>
<span class=""><br>
> 1> Do I need to do some configure cloud-init in Guest OS ?<br>
> -> I hav just install cloud-init package in my 2 guest<br>
> For centos 6.8 => yum install cloud-init<br>
> For ubuntu 14.05 => apt-get install cloud-init<br>
><br>
<br>
</span>That should be eough, at least in CentOS. Not sure about Ubuntu.<br>
<br>
Note that you are using a quite old version of CentOS, so you may also<br>
be using an old or buggy version of cloud-init. Did you try with latest<br>
CentOS 7?<br>
<span class=""><br>
> 2> Do cloud-init permanently write network configuration in ifconfig<br>
> file(Centos) or interface file (ubuntu)?<br>
><br>
<br>
</span>It does, in CentOS. Not sure about Ubuntu.<br>
<br>
</blockquote></div><br></div>