<div dir="ltr"><div>I&#39;m apparently really bad at email, I replied only to Shahar, not the whole thread.<br></div><div><br></div><div>Vinzenz your email slipped first, so to answer your question:</div><div><br style="font-size:12.8px"><span style="font-size:12.8px">It&#39;s the latest Centos 7 with these installed:</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">cloud-init-0.7.5-10.el7.</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">centos.1</span><br style="font-size:12.8px"><span style="font-size:12.8px">kernel-</span><a href="tel:3.10.0-514" value="+13100514" style="font-size:12.8px">3.10.0-514</a><span style="font-size:12.8px">.el7</span><br style="font-size:12.8px"><span style="font-size:12.8px">ovirt-guest-agent-common-1.0.</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">13-1.20161220085008.</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">git165fff1.el7.centos</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">The setup script I use to create a template is here:</span><br style="font-size:12.8px"><a href="https://github.com/myoung34/vagrant-ovirt4/blob/master/tools/prepare_redhat_for_box.sh" rel="noreferrer" target="_blank" style="font-size:12.8px">https://github.com/myoung34/<wbr>vagrant-ovirt4/blob/master/<wbr>tools/prepare_redhat_for_box.<wbr>sh</a><br></div><div><br></div><div>The engine-host is <span style="color:rgb(0,0,0);font-family:&quot;arial unicode ms&quot;,arial,sans-serif;text-align:-webkit-center">oVirt Engine Version: 4.1.0.4-1.el7.centos</span></div><div><span style="color:rgb(0,0,0);font-family:&quot;arial unicode ms&quot;,arial,sans-serif;text-align:-webkit-center">The ruby SDK i&#39;m working with is 4.1.2</span></div><div><br></div><div><span style="font-size:12.8px">Halfway through I realized that it&#39;s actually supported in the API:</span><br style="font-size:12.8px"><br style="font-size:12.8px"></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span style="font-size:12.8px">custom_script String</span></div><div><span style="font-size:12.8px">dns_search String</span></div><div><span style="font-size:12.8px">dns_servers String</span></div></blockquote><div><br style="font-size:12.8px"><span style="font-size:12.8px">It also shows usage here:</span><br style="font-size:12.8px"><a href="https://github.com/oVirt/ovirt-engine-sdk-ruby/blob/master/sdk/examples/start_vm_with_cloud_init.rb" rel="noreferrer" target="_blank" style="font-size:12.8px">https://github.com/oVirt/<wbr>ovirt-engine-sdk-ruby/blob/<wbr>master/sdk/examples/start_vm_<wbr>with_cloud_init.rb</a><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Here&#39;s some verification:</span><br style="font-size:12.8px"><br style="font-size:12.8px"></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span style="font-size:12.8px">    66:           vm_configuration[:</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">initialization][:dns_servers] =</span></div><div><span style="font-size:12.8px">iface_options[:dns_servers] unless iface_options[:dns_servers].</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">nil?</span></div><div><span style="font-size:12.8px">    67:           vm_configuration[:</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">initialization][:dns_search] =</span></div><div><span style="font-size:12.8px">iface_options[:dns_search] unless iface_options[:dns_search].</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">nil?</span></div><div><span style="font-size:12.8px">    68:           require &#39;pry&#39;</span></div><div><span style="font-size:12.8px">    69:           binding.pry</span></div><div><span style="font-size:12.8px">    70:</span></div><div><span style="font-size:12.8px"> =&gt; 71:           machine.start(</span></div><div><span style="font-size:12.8px">    72:             use_cloud_init: true,</span></div><div><span style="font-size:12.8px">    73:             vm: vm_configuration</span></div><div><span style="font-size:12.8px">    74:           )</span></div><div><span style="font-size:12.8px">    75:</span></div><div><span style="font-size:12.8px">    76:           @app.call(env)</span></div><div><br style="font-size:12.8px"></div><div><span style="font-size:12.8px">[1] pry(#&lt;VagrantPlugins::</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">OVirtProvider::Action::</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">StartVM&gt;)&gt; vm_configuration</span></div><div><span style="font-size:12.8px">=&gt; {:initialization=&gt;</span></div><div><span style="font-size:12.8px">  {:host_name=&gt;&quot;test&quot;,</span></div><div><span style="font-size:12.8px">   :nic_configurations=&gt;[{:name=&gt;</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">&quot;eth0&quot;, :on_boot=&gt;true,</span></div><div><span style="font-size:12.8px">:boot_protocol=&gt;&quot;static&quot;, :ip=&gt;{:version=&gt;&quot;v4&quot;,</span></div><div><span style="font-size:12.8px">:address=&gt;&quot;192.168.2.200&quot;, :gateway=&gt;&quot;192.168.2.1&quot;,</span></div><div><span style="font-size:12.8px">:netmask=&gt;&quot;255.255.255.0&quot;}}],</span></div><div><span style="font-size:12.8px">   :custom_script=&gt;nil,</span></div><div><span style="font-size:12.8px">   :dns_servers=&gt;&quot;192.168.2.1&quot;,</span></div><div><span style="font-size:12.8px">   :dns_search=&gt;&quot;test.local&quot;}}</span></div></blockquote><div><br style="font-size:12.8px"><span style="font-size:12.8px">But it didn&#39;t do anything:</span><br style="font-size:12.8px"><br style="font-size:12.8px"></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span style="font-size:12.8px">[vagrant@test ~]$ cat /etc/resolv.conf</span></div><div><span style="font-size:12.8px"># Generated by NetworkManager</span></div><div><span style="font-size:12.8px">search localdomain</span></div><div><br style="font-size:12.8px"></div><div><span style="font-size:12.8px">[vagrant@test ~]$ cat /etc/sysconfig/network-</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">scripts/ifcfg-eth0</span></div><div><span style="font-size:12.8px">NM_CONTROLLED=no</span></div><div><span style="font-size:12.8px">NETMASK=255.255.255.0</span></div><div><span style="font-size:12.8px">BOOTPROTO=static</span></div><div><span style="font-size:12.8px">DEVICE=eth0</span></div><div><span style="font-size:12.8px">IPADDR=192.168.2.200</span></div><div><span style="font-size:12.8px">GATEWAY=192.168.2.1</span></div><div><span style="font-size:12.8px">ONBOOT=yes</span></div></blockquote><span style="font-size:12.8px"><div><span style="font-size:12.8px"><br></span></div></span><span style="font-size:12.8px">The same is also true using cloud_init:</span><br style="font-size:12.8px"><br style="font-size:12.8px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><span style="font-size:12.8px">    ovirt.cloud_init =&lt;&lt;EOF<br></span><span style="font-size:12.8px">write_files:<br></span><span style="font-size:12.8px">  - content: |<br></span><span style="font-size:12.8px">      wat<br></span><span style="font-size:12.8px">    path: /tmp/something.txt<br></span><span style="font-size:12.8px">    permissions: &#39;0644&#39;<br></span><span style="font-size:12.8px">network-interfaces: |<br></span><span style="font-size:12.8px">  auto eth0<br></span><span style="font-size:12.8px">  iface eth0 inet static<br></span><span style="font-size:12.8px">    address 192.168.2.201<br></span><span style="font-size:12.8px">    network 192.168.2.0<br></span><span style="font-size:12.8px">    netmask 255.255.255.0<br></span><span style="font-size:12.8px">    gateway 192.168.2.1<br></span><span style="font-size:12.8px">    dns-nameservers 192.168.2.113 192.168.2.1<br></span><span style="font-size:12.8px">EOF</span></blockquote><br style="font-size:12.8px"><span style="font-size:12.8px">and inspection:</span><br style="font-size:12.8px"><span class="gmail-im" style="font-size:12.8px"><br></span><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><span class="gmail-im" style="font-size:12.8px">    66:           vm_configuration[:<wbr>initialization][:dns_servers] =<br></span><span class="gmail-im" style="font-size:12.8px">iface_options[:dns_servers] unless iface_options[:dns_servers].<wbr>nil?<br></span><span class="gmail-im" style="font-size:12.8px">    67:           vm_configuration[:<wbr>initialization][:dns_search] =<br></span><span class="gmail-im" style="font-size:12.8px">iface_options[:dns_search] unless iface_options[:dns_search].<wbr>nil?<br></span><span class="gmail-im" style="font-size:12.8px">    68:           require &#39;pry&#39;<br></span><span class="gmail-im" style="font-size:12.8px">    69:           binding.pry<br></span><span class="gmail-im" style="font-size:12.8px">    70:<br></span><span class="gmail-im" style="font-size:12.8px"> =&gt; 71:           machine.start(<br></span><span class="gmail-im" style="font-size:12.8px">    72:             use_cloud_init: true,<br></span><span class="gmail-im" style="font-size:12.8px">    73:             vm: vm_configuration<br></span><span class="gmail-im" style="font-size:12.8px">    74:           )<br></span><span class="gmail-im" style="font-size:12.8px">    75:<br></span><span class="gmail-im" style="font-size:12.8px">    76:           @app.call(env)</span><span class="gmail-im" style="font-size:12.8px"><br></span><span class="gmail-im" style="font-size:12.8px">[1] pry(#&lt;VagrantPlugins::<wbr>OVirtProvider::Action::<wbr>StartVM&gt;)&gt; vm_configuration<br></span><span class="gmail-im" style="font-size:12.8px">=&gt; {:initialization=&gt;<br></span><span class="gmail-im" style="font-size:12.8px">  {:host_name=&gt;&quot;test&quot;,<br></span><span class="gmail-im" style="font-size:12.8px">   :nic_configurations=&gt;[{:name=&gt;<wbr>&quot;eth0&quot;, :on_boot=&gt;true,<br></span><span class="gmail-im" style="font-size:12.8px">:boot_protocol=&gt;&quot;static&quot;, :ip=&gt;{:version=&gt;&quot;v4&quot;,<br></span><span class="gmail-im" style="font-size:12.8px">:address=&gt;&quot;192.168.2.200&quot;, :gateway=&gt;&quot;192.168.2.1&quot;,<br></span><span class="gmail-im" style="font-size:12.8px">:netmask=&gt;&quot;255.255.255.0&quot;}}],<br></span><span class="gmail-im" style="font-size:12.8px">   :custom_script=&gt;<br></span><span style="font-size:12.8px">    &quot;write_files:\n  - content: |\n      wat\n    path:<br></span><span style="font-size:12.8px">/tmp/something.txt\n    permissions: &#39;0644&#39;\nnetwork-interfaces: |\n<br></span><span style="font-size:12.8px">auto eth0\n  iface eth0 inet static\n    address 192.168.2.201\n<br></span><span style="font-size:12.8px">network 192.168.2.0\n    netmask 255.255.255.0\n    gateway<br></span><span style="font-size:12.8px">192.168.2.1\n    dns-nameservers 192.168.2.113 192.168.2.1\n&quot;,<br></span><span class="gmail-im" style="font-size:12.8px">   :dns_servers=&gt;&quot;192.168.2.1&quot;,<br></span><span class="gmail-im" style="font-size:12.8px">   :dns_search=&gt;&quot;test.local&quot;}}</span></blockquote><span class="gmail-im" style="font-size:12.8px"><br></span><span style="font-size:12.8px">And here&#39;s my debugging after it comes up:</span><br style="font-size:12.8px"><span class="gmail-im" style="font-size:12.8px"><br></span><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><span class="gmail-im" style="font-size:12.8px">[vagrant@test ~]$ cat /etc/resolv.conf<br></span><span class="gmail-im" style="font-size:12.8px"># Generated by NetworkManager<br></span><span class="gmail-im" style="font-size:12.8px">search localdomain</span><span class="gmail-im" style="font-size:12.8px"><br></span><span class="gmail-im" style="font-size:12.8px">[vagrant@test ~]$ cat /etc/sysconfig/network-<wbr>scripts/ifcfg-eth0<br></span><span class="gmail-im" style="font-size:12.8px">NM_CONTROLLED=no<br></span><span class="gmail-im" style="font-size:12.8px">NETMASK=255.255.255.0<br></span><span class="gmail-im" style="font-size:12.8px">BOOTPROTO=static<br></span><span class="gmail-im" style="font-size:12.8px">DEVICE=eth0<br></span><span class="gmail-im" style="font-size:12.8px">IPADDR=192.168.2.200<br></span><span class="gmail-im" style="font-size:12.8px">GATEWAY=192.168.2.1<br></span><span class="gmail-im" style="font-size:12.8px">ONBOOT=yes</span><span class="gmail-im" style="font-size:12.8px"><br></span><span style="font-size:12.8px">[vagrant@test ~]$ cat /tmp/something.txt<br></span><span style="font-size:12.8px">wat</span><br style="font-size:12.8px"><span style="font-size:12.8px">[vagrant@test ~]$ ping -c 3 </span><a href="http://www.google.com/" rel="noreferrer" target="_blank" style="font-size:12.8px">www.google.com<br></a><span style="font-size:12.8px">ping: </span><a href="http://www.google.com/" rel="noreferrer" target="_blank" style="font-size:12.8px">www.google.com</a><span style="font-size:12.8px">: Name or service not known</span><br style="font-size:12.8px"><span style="font-size:12.8px">[vagrant@test ~]$ echo $&#39;nameserver 192.168.2.113\nnameserver<br></span><span style="font-size:12.8px">192.168.2.1&#39; | sudo tee -a /etc/resolv.conf &gt;/dev/null</span><br style="font-size:12.8px"><span style="font-size:12.8px">[vagrant@test ~]$ ping -c 3 </span><a href="http://www.google.com/" rel="noreferrer" target="_blank" style="font-size:12.8px">www.google.com<br></a><span style="font-size:12.8px">PING </span><a href="http://www.google.com/" rel="noreferrer" target="_blank" style="font-size:12.8px">www.google.com</a><span style="font-size:12.8px"> (216.58.217.4) 56(84) bytes of data.<br></span><span style="font-size:12.8px">64 bytes from </span><a href="http://den03s09-in-f4.1e100.net/" rel="noreferrer" target="_blank" style="font-size:12.8px">den03s09-in-f4.1e100.net</a><span style="font-size:12.8px"> (216.58.217.4): icmp_seq=1<br></span><span style="font-size:12.8px">ttl=54 time=47.5 ms<br></span><span style="font-size:12.8px">64 bytes from </span><a href="http://den03s09-in-f4.1e100.net/" rel="noreferrer" target="_blank" style="font-size:12.8px">den03s09-in-f4.1e100.net</a><span style="font-size:12.8px"> (216.58.217.4): icmp_seq=2<br></span><span style="font-size:12.8px">ttl=54 time=46.9 ms<br></span><span style="font-size:12.8px">64 bytes from </span><a href="http://den03s09-in-f4.1e100.net/" rel="noreferrer" target="_blank" style="font-size:12.8px">den03s09-in-f4.1e100.net</a><span style="font-size:12.8px"> (216.58.217.4): icmp_seq=3<br></span><span style="font-size:12.8px">ttl=54 time=44.3 ms</span><br style="font-size:12.8px"><span style="font-size:12.8px">--- </span><a href="http://www.google.com/" rel="noreferrer" target="_blank" style="font-size:12.8px">www.google.com</a><span style="font-size:12.8px"> ping statistics ---<br></span><span style="font-size:12.8px">3 packets transmitted, 3 received, 0% packet loss, time 2002ms<br></span><span style="font-size:12.8px">rtt min/avg/max/mdev = 44.385/46.307/47.555/1.390 ms</span></blockquote><div class="gmail_extra"><br></div></div>