<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><action><br> <vm><br> <os><br> <boot dev='cdrom'/> <br> </os><br> <initialization><br> <cloud_init><br> <host><br> <address>test</address><br> </host><br> <network_configuration><br> <nics><br> <nic><br> <interface>virtIO</interface> <br> <name>eth0</name><br> <boot_protocol>static</boot_protocol><br> <mac address=''/><br> <network><br> <ip address='' netmask='' gateway=''/><br> </network><br> <on_boot>true</on_boot><vnic_profile id='' /><br> </nic><br> <nic><br> <interface>virtIO</interface> <br> <name>eth1</name><br> <boot_protocol>static</boot_protocol><br> <mac address=''/><br> <network><br> <ip address='' netmask='255.255.255.0' gateway=''/><br> </network><br> <on_boot>true</on_boot><vnic_profile id='' /><br> </nic><br> </nics><br> </network_configuration><br> <files><br> <file><br> <name>/ignored</name><content><![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 '/nameserver/d' /etc/resolv.conf<br> - echo 'nameserver 8.8.8.8' >> /etc/resolv.conf<br> - echo 'nameserver 8.8.4.4' >> /etc/resolv.conf<br> - echo 'root:8W7RQ5Bh' | chpasswd<br> - yum -y update<br> - yum -y install rdate<br> - rdate -s <a href="http://stdtime.gov.hk">stdtime.gov.hk</a>]]></content><br> <type>plaintext</type><br> </file><br> </files><br> </cloud_init><custom_script><![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 '/nameserver/d' /etc/resolv.conf<br> - echo 'nameserver 8.8.8.8' >> /etc/resolv.conf<br> - echo 'nameserver 8.8.4.4' >> /etc/resolv.conf<br> - echo 'root:8W7RQ5Bh' | chpasswd<br> - yum -y update<br> - yum -y install rdate<br> - rdate -s <a href="http://stdtime.gov.hk">stdtime.gov.hk</a>]]></custom_script><br> </initialization><br> </vm><br> </action><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>