<div dir="ltr"><div>Hi All,<br><br><br>I am using the ovirt version 3.5 and having some issues with the vm startup with cloud-init using api in run-once mode.....
<br><br>Below is the steps i follow :- 
<br><br>1. Create the VM by API from precreated Template..
<br>2. Start the VM in run-once mode and push the cloud-init data from API..
<br>3. VM stuck and from console it display the following :-
<br>Booting from DVD/CD.. ...
<br>Boot failed : could not read from CDROM (code 004)
<br><br>I am using the following xml for this operation :-<br><br>&lt;action&gt;<br>    &lt;vm&gt;<br>     &lt;os&gt;<br>      &lt;boot dev=&#39;cdrom&#39;/&gt;    <br>     &lt;/os&gt;<br>     &lt;initialization&gt;<br>      &lt;cloud_init&gt;<br>       &lt;host&gt;<br>        &lt;address&gt;test&lt;/address&gt;<br>       &lt;/host&gt;<br>       &lt;network_configuration&gt;<br>        &lt;nics&gt;<br>         &lt;nic&gt;<br>          &lt;interface&gt;virtIO&lt;/interface&gt; <br>          &lt;name&gt;eth0&lt;/name&gt;<br>          &lt;boot_protocol&gt;static&lt;/boot_protocol&gt;<br>          &lt;mac address=&#39;&#39;/&gt;<br>          &lt;network&gt;<br>           &lt;ip address=&#39;&#39; netmask=&#39;&#39; gateway=&#39;&#39;/&gt;<br>          &lt;/network&gt;<br>          &lt;on_boot&gt;true&lt;/on_boot&gt;&lt;vnic_profile id=&#39;&#39; /&gt;<br>         &lt;/nic&gt;<br>         &lt;nic&gt;<br>          &lt;interface&gt;virtIO&lt;/interface&gt; <br>          &lt;name&gt;eth1&lt;/name&gt;<br>          &lt;boot_protocol&gt;static&lt;/boot_protocol&gt;<br>          &lt;mac address=&#39;&#39;/&gt;<br>          &lt;network&gt;<br>           &lt;ip address=&#39;&#39; netmask=&#39;255.255.255.0&#39; gateway=&#39;&#39;/&gt;<br>          &lt;/network&gt;<br>          &lt;on_boot&gt;true&lt;/on_boot&gt;&lt;vnic_profile id=&#39;&#39; /&gt;<br>         &lt;/nic&gt;<br>        &lt;/nics&gt;<br>       &lt;/network_configuration&gt;<br>       &lt;files&gt;<br>        &lt;file&gt;<br>         &lt;name&gt;/ignored&lt;/name&gt;&lt;content&gt;&lt;![CDATA[#cloud-config<br>disable-ec2-metadata: true<br>disable_root: false<br>ssh_pwauth: true<br>ssh_deletekeys: true<br>chpasswd: { expire: False }<br><br>users:<br> - name: root<br>   primary-group: root<br>   passwd: 8W7RQ5Bh<br>   lock-passwd: false<br><br>runcmd:<br> - sed -i &#39;/nameserver/d&#39; /etc/resolv.conf<br> - echo &#39;nameserver 8.8.8.8&#39; &gt;&gt; /etc/resolv.conf<br> - echo &#39;nameserver 8.8.4.4&#39; &gt;&gt; /etc/resolv.conf<br> - echo &#39;root:8W7RQ5Bh&#39; | chpasswd<br> - yum -y update<br> - yum -y install rdate<br> - rdate -s <a href="http://stdtime.gov.hk">stdtime.gov.hk</a>]]&gt;&lt;/content&gt;<br>         &lt;type&gt;plaintext&lt;/type&gt;<br>        &lt;/file&gt;<br>       &lt;/files&gt;<br>      &lt;/cloud_init&gt;&lt;custom_script&gt;&lt;![CDATA[#cloud-config<br>disable-ec2-metadata: true<br>disable_root: false<br>ssh_pwauth: true<br>ssh_deletekeys: true<br>chpasswd: { expire: False }<br><br>users:<br> - name: root<br>   primary-group: root<br>   passwd: 8W7RQ5Bh<br>   lock-passwd: false<br><br>runcmd:<br> - sed -i &#39;/nameserver/d&#39; /etc/resolv.conf<br> - echo &#39;nameserver 8.8.8.8&#39; &gt;&gt; /etc/resolv.conf<br> - echo &#39;nameserver 8.8.4.4&#39; &gt;&gt; /etc/resolv.conf<br> - echo &#39;root:8W7RQ5Bh&#39; | chpasswd<br> - yum -y update<br> - yum -y install rdate<br> - rdate -s <a href="http://stdtime.gov.hk">stdtime.gov.hk</a>]]&gt;&lt;/custom_script&gt;<br>     &lt;/initialization&gt;<br>    &lt;/vm&gt;<br>   &lt;/action&gt;<br><br></div>I am also attaching the screen shot to this.<br><div><br><br><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><span>-- <br></span>Regards
<br>Shanil
</div></div></div>
</div></div>