Hi,<div><br></div><div>I think template configuration is definitely not an option for networks with a large amount of segments.</div><div><br></div><div>I haven&#39;t played with VNIC profiles, but I will tomorrow. I didn&#39;t remember seeing any documentation on changing that with a PUT, but I&#39;ll look into it. Will report back shortly, thank you!</div><div><br></div><div>MorganĀ <span></span><br><br>On Thursday, October 2, 2014, Lior Vernia &lt;<a href="mailto:lvernia@redhat.com">lvernia@redhat.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 02/10/14 10:22, Tomas Jelinek wrote:<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt;&gt; From: &quot;Itamar Heim&quot; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;iheim@redhat.com&#39;)">iheim@redhat.com</a>&gt;<br>
&gt;&gt; To: &quot;Lior Vernia&quot; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;lvernia@redhat.com&#39;)">lvernia@redhat.com</a>&gt;, &quot;Morgan McLean&quot; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;wrx230@gmail.com&#39;)">wrx230@gmail.com</a>&gt;<br>
&gt;&gt; Cc: <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;users@ovirt.org&#39;)">users@ovirt.org</a><br>
&gt;&gt; Sent: Wednesday, October 1, 2014 12:38:13 PM<br>
&gt;&gt; Subject: Re: [ovirt-users] API -- Do I need to use templates? Can I change network for the nic?<br>
&gt;&gt;<br>
&gt;&gt; On 10/01/2014 10:54 AM, Lior Vernia wrote:<br>
&gt;&gt;&gt; Hi Morgan,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m not sure if you want all VMs to use the same network or not. If you<br>
&gt;&gt;&gt; do, the best way would be to create a template with one interface, and<br>
&gt;&gt;&gt; the relevant network (profile) attached.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If you want certain VMs to be connected to other networks, once you<br>
&gt;&gt;&gt; create the VM you can send a PUT request on /api/vms/{id}/nics/{id}/ and<br>
&gt;&gt;&gt; update it with the relevant network (profile).<br>
&gt;&gt;<br>
&gt;&gt; I thought we allow to change the logical network at vm creation since<br>
&gt;&gt; instance types were added?<br>
&gt;<br>
&gt; Not on API level. In webadmin/userportal you can do it in one go, but that anyway triggers two different actions.<br>
&gt;<br>
&gt; But now as I have tried it, if I create a VM from template or instance type (using API), the NICs are completely ignored.<br>
&gt; It does not matter if template or instance type since instance types just inherit the behavior of the templates so are inheriting also the bug/missing logic etc.<br>
&gt;<br>
&gt; For me it seems like a bug but not sure. Is there a reason why the NICs are ignored when the VM is created from a template with NICs using API?<br>
&gt; What I think is that since the NIC can have different profiles assigned and this can be edited on the FE, this functionality of sending different profile for the specific NIC is just not implemented on API level, so the API just<br>
&gt; completely ignores the NICs.<br>
&gt; What do you think Lior?<br>
&gt;<br>
&gt;<br>
<br>
If I correctly understand what you mean, then that is the current<br>
&quot;intended&quot; behavior - supplying NICs as part of VM creation isn&#39;t<br>
supported, and there&#39;s this RFE to support it:<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=999969" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=999969</a><br>
<br>
My two original suggestions will apparently have to suffice until this<br>
RFE is realised; either properly configuring the template&#39;s NICs before<br>
VM creation or modifying the VMs&#39; NICs following creation.<br>
<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hope this helps! Let us know please :)<br>
&gt;&gt;&gt; Yours, Lior.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 01/10/14 10:32, Morgan McLean wrote:<br>
&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Trying to remotely spawn a large amount of VM&#39;s. It would appear I can<br>
&gt;&gt;&gt;&gt; only use templates...which would have a NIC stuck to one network vlan.<br>
&gt;&gt;&gt;&gt; It doesn&#39;t appear that I can change that vlan remotely.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Is there any easy way I can get this done?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt;&gt; Morgan<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; Users mailing list<br>
&gt;&gt;&gt;&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Users@ovirt.org&#39;)">Users@ovirt.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Users mailing list<br>
&gt;&gt;&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Users@ovirt.org&#39;)">Users@ovirt.org</a><br>
&gt;&gt;&gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Users@ovirt.org&#39;)">Users@ovirt.org</a><br>
&gt;&gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;&gt;<br>
</blockquote></div><br><br>-- <br>Thanks,<div>Morgan</div><br>