Created attachment 963532 [details] VM failed Description of problem: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..... Version-Release number of selected component (if applicable): Engine 3.5 (On centos 6.6) Host On Centos 7. How reproducible: Steps to Reproduce: 1. Create the VM by API from precreated OS Template..(Template has boot order priority 1. harddisk 2. Cdrom) 2. Start the VM in run-once mode and push the cloud-init data from API.. 3. VM stuck and from console it display the following :- Booting from DVD/CD.. ... Boot failed : could not read from CDROM (code 004) Actual results:Can not Startup the VM.. Expected results: VM will startup and get the cloud-init data from API.. Additional info:I am using the following XML for the API propose... I am using the following xml for this operation :- <action> <vm> <os> <boot dev='cdrom'/> </os> <initialization> <cloud_init> <host> <address>test</address> </host> <network_configuration> <nics> <nic> <interface>virtIO</interface> <name>eth0</name> <boot_protocol>static</boot_protocol> <mac address=''/> <network> <ip address='' netmask='' gateway=''/> </network> <on_boot>true</on_boot><vnic_profile id='' /> </nic> <nic> <interface>virtIO</interface> <name>eth1</name> <boot_protocol>static</boot_protocol> <mac address=''/> <network> <ip address='' netmask='255.255.255.0' gateway=''/> </network> <on_boot>true</on_boot><vnic_profile id='' /> </nic> </nics> </network_configuration> <files> <file> <name>/ignored</name><content><![CDATA[#cloud-config disable-ec2-metadata: true disable_root: false ssh_pwauth: true ssh_deletekeys: true chpasswd: { expire: False } users: - name: root primary-group: root passwd: 8W7RQ5Bh lock-passwd: false runcmd: - sed -i '/nameserver/d' /etc/resolv.conf - echo 'nameserver 8.8.8.8' >> /etc/resolv.conf - echo 'nameserver 8.8.4.4' >> /etc/resolv.conf - echo 'root:8W7RQ5Bh' | chpasswd - yum -y update - yum -y install rdate - rdate -s stdtime.gov.hk]]></content> <type>plaintext</type> </file> </files> </cloud_init><custom_script><![CDATA[#cloud-config disable-ec2-metadata: true disable_root: false ssh_pwauth: true ssh_deletekeys: true chpasswd: { expire: False } users: - name: root primary-group: root passwd: 8W7RQ5Bh lock-passwd: false runcmd: - sed -i '/nameserver/d' /etc/resolv.conf - echo 'nameserver 8.8.8.8' >> /etc/resolv.conf - echo 'nameserver 8.8.4.4' >> /etc/resolv.conf - echo 'root:8W7RQ5Bh' | chpasswd - yum -y update - yum -y install rdate - rdate -s stdtime.gov.hk]]></custom_script> </initialization> </vm> </action>
for some reason i missed that you are using run once, and in this run once, you override the boot order with cd-rom only: <os> <boot dev='cdrom'/> </os> this is not needed when you start the vm, because we still want the vm to boot from hard-disk, the cloud init cd rom will be used by the cloud-init service when the vm starts. please try again without changing the boot and see if it helps
Hi Omer, We try the same method in the previous cluster and it's working fine there....the only difference between both the cluster is the host OS version :- 1. New One Built on CentOS 7 2. Old One Built On CentOS 6.6 Yes...it's true if we remove this part from the XML the VM can boot up... <os> <boot dev='cdrom'/> </os> But earlier someone from community suggested us to use this method to put the cloud-init data... Thanks, Punit
*** Bug 1169625 has been marked as a duplicate of this bug. ***
Thanks Punit for the update, i guess the suggestion was just wrong.. there is no relation between cloud-init and boot order. since its working, closing. please re-open if needed