[ovirt-users] How to configure Cloud-init in Guest OS ?

TranceWorldLogic . tranceworldlogic at gmail.com
Fri Mar 17 05:24:24 UTC 2017


Thanks Juan for helping me.

~Rohit

On Fri, Mar 17, 2017 at 12:51 AM, Juan Hernández <jhernand at redhat.com>
wrote:

> On 03/16/2017 04:09 PM, TranceWorldLogic . wrote:
> > 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 ?
> >
>
> That may have been the initial design of the feature, but it doesn't
> currently work. That 'files' element isn't used at all. The recommended
> way to create a file is using the custom script, as explained in this
> example:
>
>
> https://github.com/oVirt/ovirt-engine-sdk/blob/master/
> sdk/examples/start_vm_with_cloud_init.py#L48-L57
>
> The use of 'types.CloudInit' is also disencouraged, use directly the
> attributes of 'types.Initialization', as explained here:
>
>
> https://github.com/oVirt/ovirt-engine-sdk/blob/master/
> sdk/examples/start_vm_with_cloud_init.py#L59-L86
>
> >
> >
> > On Thu, Mar 16, 2017 at 7:33 PM, Juan Hernández <jhernand at redhat.com
> > <mailto:jhernand at 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/
> >     <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
> >     <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.
> >
> >
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170317/4f5576a6/attachment.html>


More information about the Users mailing list