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