Re: [ovirt-users] cloud_init not apply when v create from API
Thanks, that's works for me . On Wed, Mar 30, 2016 at 2:21 PM, Juan Hernández <jhern...@redhat.com> wrote: > On 03/30/2016 08:44 AM, Arpit Makhiyaviya wrote: > > > > I used *Version: 3.6.3.4-1.el7.centos* of ovirt engine.I already tried > > following xml request with run VM but still its not working. > > From admin panel of oVirt Its completely working but I found issue only > > with oVirt API (VM start but cloudinit data not accepted). > > > > Version 3.6.3.4 is affected by the bug that I mentioned. The result is > that the "cloud_init" element is just ignored. That will be fixed in > version 3.6.5. Meanwhile you can use the workaround suggested in comment > 1 of the bug: > > https://bugzilla.redhat.com/show_bug.cgi?id=1305904#c1 > > Translated to XML it should look like described by Karim Boumedhel in > comment 7: > > https://bugzilla.redhat.com/show_bug.cgi?id=1305904#c7 > > > *XML Request : * > > > > > >false > > true > > > > > > > > > > vishal.123456 > > > >true > >Atlantic/Reykjavik > > > > > >root > >Vishal@131 > > > > > > > > > > > > eth1 > > STATIC > > > > > gateway="149.202.85.254" /> > > > > false > > > > > > > > > > > > > >8.8.8.8 > > > > > > > > > >8.8.4.4 > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > *Arpit Makhiyaviya* > > Software Engineer > > +91-79-40038284 > > +91-971-437-6669 > > <http://www.sculptsoft.com> > > > > On Wed, Mar 30, 2016 at 12:27 AM, Juan Hernández <jhern...@redhat.com > > <mailto:jhern...@redhat.com>> wrote: > > > > On 03/29/2016 03:07 PM, Arpit Makhiyaviya wrote: > > > Thanks for quick response. > > > we already knew this and we are passing following xml when calling > > Start > > > action. > > > > > > > What version of the engine are you using exactly? This is a known > bug. > > The "cloud_init" element is ignored. See here for details: > > > > Cloud-Init payload not passed into VM via python SDK > > https://bugzilla.redhat.com/1305904 > > > > That will be fixed in version 3.6.5. If you have a version 3.6.2 or > > newer then you can use the workaround described there, using the > > "initailization" element directly. > > > > > > > > > > > > > > > > > > > > vm-cloud-init-restapi > > > > > > > > > > > > > > > root > > > > > >ssh-rsa restapi-cloud-init-ssh-key > > root@localdomain > > > > > > > > >true > > >Atlantic/Reykjavik > > > > > > > > >root > > >SuperSecretPassword! > > > > > > > > > > > > > > > > > > eth0 > > > STATIC > > > > > > > > gateway="192.168.2.254" /> > > > > > > true > > > > > > > > > eth1 > > > DHCP > > > true > > > > > > > > > > > > > > > > > >10.20.30.100 > > > > > > > > > > > > > > >domain.your.rhevm.com > > <http://domain.your.rhevm.com> > > > <
Re: [ovirt-users] cloud_init not apply when v create from API
I used *Version: 3.6.3.4-1.el7.centos* of ovirt engine.I already tried following xml request with run VM but still its not working. >From admin panel of oVirt Its completely working but I found issue only with oVirt API (VM start but cloudinit data not accepted). *XML Request : * false true vishal.123456 true Atlantic/Reykjavik root Vishal@131 eth1 STATIC false 8.8.8.8 8.8.4.4 Regards, *Arpit Makhiyaviya* Software Engineer +91-79-40038284 +91-971-437-6669 <http://www.sculptsoft.com> On Wed, Mar 30, 2016 at 12:27 AM, Juan Hernández <jhern...@redhat.com> wrote: > On 03/29/2016 03:07 PM, Arpit Makhiyaviya wrote: > > Thanks for quick response. > > we already knew this and we are passing following xml when calling Start > > action. > > > > What version of the engine are you using exactly? This is a known bug. > The "cloud_init" element is ignored. See here for details: > > Cloud-Init payload not passed into VM via python SDK > https://bugzilla.redhat.com/1305904 > > That will be fixed in version 3.6.5. If you have a version 3.6.2 or > newer then you can use the workaround described there, using the > "initailization" element directly. > > > > > > > > > > > > > vm-cloud-init-restapi > > > > > > > > > > root > > > >ssh-rsa restapi-cloud-init-ssh-key root@localdomain > > > > > > >true > >Atlantic/Reykjavik > > > > > >root > >SuperSecretPassword! > > > > > > > > > > > > eth0 > > STATIC > > > > > gateway="192.168.2.254" /> > > > > true > > > > > > eth1 > > DHCP > > true > > > > > > > > > > > >10.20.30.100 > > > > > > > > > >domain.your.rhevm.com > > <http://domain.your.rhevm.com> > > > > > > > > > > > > > >/tmp/file1.txt > >line 1 > > line 2 > > and now something special > > !@#$%^*()_+ > >PLAINTEXT > > > > > > > > > > > > > > > > we also found following link . is this related to my issue? > > > > https://gerrit.ovirt.org/#/c/50240/2 > > > > Regards, > > *Arpit Makhiyaviya* > > Software Engineer > > +91-79-40038284 > > +91-971-437-6669 > > <http://www.sculptsoft.com> > > > > On Tue, Mar 29, 2016 at 6:24 PM, Renout Gerrits <m...@renout.nl > > <mailto:m...@renout.nl>> wrote: > > > > In the more recent versions you have to use 'use_cloud_init=True' in > > the api, which isn't described in most documentation yet. Maybe > > thats the reason it isn't working? > > > > Here's a working snippet: > > > > vm = api.vms.get(name=vm_name) > > > > action = params.Action( > > use_cloud_init=True, > > vm=params.VM( > > initialization=params.Initialization( > > regenerate_ssh_keys=True, > > host_name=vm_fqdn, > > nic_configurations=params.GuestNicsConfiguration( > > nic_configuration=[ > > params.GuestNicConfiguration( > > name="eth0", > > boot_protocol="static", > > on_boot=True, > > ip=params.IP( > > address=vm_address, > > netmask=vm_netmask, > > gateway=vm_gateway, > > ), > > ), >
Re: [ovirt-users] cloud_init not apply when v create from API
Thanks for quick response. we already knew this and we are passing following xml when calling Start action. vm-cloud-init-restapi root ssh-rsa restapi-cloud-init-ssh-key root@localdomain true Atlantic/Reykjavik root SuperSecretPassword! eth0 STATIC true eth1 DHCP true 10.20.30.100 domain.your.rhevm.com /tmp/file1.txt line 1 line 2 and now something special !@#$%^*()_+ PLAINTEXT we also found following link . is this related to my issue? https://gerrit.ovirt.org/#/c/50240/2 Regards, *Arpit Makhiyaviya* Software Engineer +91-79-40038284 +91-971-437-6669 <http://www.sculptsoft.com> On Tue, Mar 29, 2016 at 6:24 PM, Renout Gerrits <m...@renout.nl> wrote: > In the more recent versions you have to use 'use_cloud_init=True' in the > api, which isn't described in most documentation yet. Maybe thats the > reason it isn't working? > > Here's a working snippet: > > vm = api.vms.get(name=vm_name) > > action = params.Action( > use_cloud_init=True, > vm=params.VM( > initialization=params.Initialization( > regenerate_ssh_keys=True, > host_name=vm_fqdn, > nic_configurations=params.GuestNicsConfiguration( > nic_configuration=[ > params.GuestNicConfiguration( > name="eth0", > boot_protocol="static", > on_boot=True, > ip=params.IP( > address=vm_address, > netmask=vm_netmask, > gateway=vm_gateway, > ), > ), > ], > ), > ), > ), > ) > > vm.start(action) > > > On Tue, Mar 29, 2016 at 2:03 PM, Arpit Makhiyaviya < > arpit.icre...@gmail.com> wrote: > >> Hello, >> we are using ovirt api with json data format. >> we have create vm from template and i want to set ip,macaddress,user and >> password for that we are using cloud_init for that we it can't set any >> options. >> >> >> Regards, >> *Arpit Makhiyaviya* >> Software Engineer >> +91-79-40038284 >> +91-971-437-6669 >> <http://www.sculptsoft.com> >> >> ___ >> Users mailing list >> Users@ovirt.org >> http://lists.ovirt.org/mailman/listinfo/users >> >> > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] cloud_init not apply when v create from API
Hello, we are using ovirt api with json data format. we have create vm from template and i want to set ip,macaddress,user and password for that we are using cloud_init for that we it can't set any options. Regards, *Arpit Makhiyaviya* Software Engineer +91-79-40038284 +91-971-437-6669 <http://www.sculptsoft.com> ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users