Hi Shashank,<br><br>Thanks for your answer. Iwanted to do the same modification. But something is weird in your XML description file : <br>&lt;source<b> dev</b>=&#39;/var/lib/one/16/images/disk.0&#39;/&gt;<br>&lt;target dev=&#39;hdb&#39;/&gt;<br>
<br>Why it&#39;s dev, at this point it should be<b> file</b> as you set in the LibVirtDriver.cc , isn&#39;t it? I think the probllem come from there and not from libvirt. <br><br>Let me know when you fix it.<br><br><div class="gmail_quote">
2010/5/28 Shashank Rachamalla <span dir="ltr">&lt;<a href="mailto:shashank.rachamalla@hexagrid.com">shashank.rachamalla@hexagrid.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br><br>I have faced the same issue while working with OpenNebula 1.4.<br><br>As you have already mentioned, I had to change LibVirtDriver.cc and recompile from source. <br><br>I had to add an else if block ( in bold font ) to the below piece of code in LibVirtDriver.cc<br>

<br>        if ( type == &quot;BLOCK&quot; )<br>        {<br>            file &lt;&lt; &quot;\t\t&lt;disk type=&#39;block&#39; device=&#39;disk&#39;&gt;&quot; &lt;&lt; endl<br>                 &lt;&lt; &quot;\t\t\t&lt;source dev=&#39;&quot; &lt;&lt; vm-&gt;get_remote_dir() &lt;&lt; &quot;/disk.&quot;<br>



                 &lt;&lt; i &lt;&lt; &quot;&#39;/&gt;&quot; &lt;&lt; endl;<br>        }<br><br>          /* Added newly */<br><b>        else if ( type == &quot;CDROM&quot;)<br>
        {<br>
            file &lt;&lt; &quot;\t\t&lt;disk type=&#39;file&#39; device=&#39;cdrom&#39;&gt;&quot; &lt;&lt; endl<br>


                 &lt;&lt; &quot;\t\t\t&lt;source file=&#39;&quot; &lt;&lt; vm-&gt;get_remote_dir() &lt;&lt; &quot;/disk.&quot;<br>
                 &lt;&lt; i &lt;&lt; &quot;&#39;/&gt;&quot; &lt;&lt; endl;<br>
        }<br></b>


<br>        else<br>        {<br>            file &lt;&lt; &quot;\t\t&lt;disk type=&#39;file&#39; device=&#39;disk&#39;&gt;&quot; &lt;&lt; endl<br>                 &lt;&lt; &quot;\t\t\t&lt;source file=&#39;&quot; &lt;&lt; vm-&gt;get_remote_dir() &lt;&lt; &quot;/disk.&quot;<br>



                 &lt;&lt; i &lt;&lt; &quot;&#39;/&gt;&quot; &lt;&lt; endl;<br>        }<br><br>I have also seen issues while working with qemu hypervisor  version 0.11.0 (qemu-kvm-0.11.0). After making the above changes, I have created a new VM  and the following deployment descriptor was created:<br>

<br>&lt;domain type=&#39;kvm&#39;&gt;<br>    &lt;name&gt;one-16&lt;/name&gt;<br>    &lt;memory&gt;524288&lt;/memory&gt;<div class="im"><br>    &lt;os&gt;<br>        &lt;type&gt;hvm&lt;/type&gt;<br>        &lt;boot dev=&#39;cdrom&#39;/&gt;<br>

    &lt;/os&gt;<br>    &lt;devices&gt;<br>        &lt;emulator&gt;/usr/bin/kvm&lt;/emulator&gt;<br></div>        &lt;disk type=&#39;file&#39; device=&#39;cdrom&#39;&gt;<br>            &lt;source dev=&#39;/var/lib/one/16/images/disk.0&#39;/&gt;<br>

            &lt;target dev=&#39;hdb&#39;/&gt;<br>        &lt;/disk&gt;<br>        &lt;graphics type=&#39;vnc&#39; listen=&#39;0.0.0.0&#39; port=&#39;15&#39;/&gt;<br>    &lt;/devices&gt;<br>    &lt;features&gt;<br>        &lt;acpi/&gt;<br>

    &lt;/features&gt;<br>&lt;/domain&gt;<br><br>disk.0 is linked to an iso file.<br>lrwxrwxrwx 1 oneadmin nogroup 23 2010-05-27 22:37 disk.0 -&gt; /mnt/onenfs/ReactOS.iso<br><br><br>The following are the contents of  var/log/libvirt/qemu/one-16.log<br>

<br>LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin /usr/bin/kvm -S -M pc-0.11 -m 512 -smp 1 -name one-16 -uuid 70ac26ff-654e-9149-8323-283a7e66f1b6 -monitor unix:/var/run/libvirt/qemu/one-16.monitor,server,nowait <b>-boot d -drive file=,if=ide,media=cdrom,index=1</b> -net none -serial none -parallel none -usb -vnc 0.0.0.0:-5885 -vga cirrus <br>

<br>Note the line in bold above. Ideally file should be pointing to &#39;/var/lib/one/16/images/disk.0&#39; but it was not pointing to anything. As a result VM couldn&#39;t boot.<br><br>Can somebody please throw some light on this issue. <br>

<br><div class="gmail_quote"><div><div></div><div class="h5">On 18 May 2010 07:56, florian chazal <span dir="ltr">&lt;<a href="mailto:florianchazal@gmail.com" target="_blank">florianchazal@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi,<br><br>Is it normal that when you create a virtual machine and you configure one of its disk as a cdrom : <br>


<br>#########Open nebula VM Template #########<br>...<br>OS = [ BOOT = \&quot;cdrom\&quot; ]<br>...<br>DISK = [ TYPE = &quot;<span style="background-color: rgb(255, 0, 0);">cdrom</span>&quot; ,<br>
SOURCE = &quot;/srv/cloud/one/IM_template/debian-504-i386-netinst.iso&quot; ,<br>TARGET = &quot;hdc&quot; ,<br>CLONE = &quot;no&quot; ,<br>SAVE = &quot;no&quot; ,<br>READONLY = &quot;no&quot; ]<br>DISK = [ TYPE = &quot;disk&quot; ,<br>



SOURCE = &quot;/srv/cloud/one/IM_template/test.qcow2&quot; ,<br>TARGET = &quot;hda&quot; ,<br>CLONE = &quot;no&quot; ,<br>SAVE = &quot;no&quot; ,<br>READONLY = &quot;no&quot; ]<br>...<br>################################<br>



<br>the libvirt driver translate it like this : <br><br>#########LibVirt VM Template #########<br>...<br>&lt;os&gt;<br>                &lt;type&gt;hvm&lt;/type&gt;<br>                &lt;boot dev=&#39;&quot;cdrom&quot;&#39;/&gt;<br>



        &lt;/os&gt;<br>        &lt;devices&gt;<br>                &lt;emulator&gt;/usr/bin/kvm&lt;/emulator&gt;<br>                &lt;disk type=&#39;file&#39; device=&#39;<span style="background-color: rgb(255, 0, 0);">disk</span>&#39;&gt;<br>



                        &lt;source file=&#39;/srv/cloud/one/var/94/images/disk.0&#39;/&gt;<br>                        &lt;target dev=&#39;hdc&#39;/&gt;<br>                &lt;/disk&gt;<br>                &lt;disk type=&#39;file&#39; device=&#39;disk&#39;&gt;<br>



                        &lt;source file=&#39;/srv/cloud/one/var/94/images/disk.1&#39;/&gt;<br>                        &lt;target dev=&#39;hda&#39;/&gt;<br>                &lt;/disk&gt;<br>...<br>################################<br>



<br>That is to say the translation doesn&#39;t care about my cdrom type . And the vm failed. but if I put cdrom in the device attirbute it works ...<br><br>I searched in the code and I realized that if the type is block in the ON template the device attirbute will be set as disk and if not it will be set at disk again : <a href="http://dev.opennebula.org/projects/opennebula/repository/revisions/master/show" target="_blank">root</a>

    / <a href="http://dev.opennebula.org/projects/opennebula/repository/revisions/master/show/src" target="_blank">src</a>

    / <a href="http://dev.opennebula.org/projects/opennebula/repository/revisions/master/show/src/vmm" target="_blank">vmm</a>


    / <a href="http://dev.opennebula.org/projects/opennebula/repository/revisions/master/changes/src/vmm/LibVirtDriver.cc" target="_blank">LibVirtDriver.cc</a> line 687 to 697 ...<br clear="all"><br><br>-- <br><font color="#888888">Florian Chazal<br>



</font><br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><font color="#888888">Shashank Rachamalla<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Florian Chazal<br>