<div dir="ltr"><br><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><br></div></div></div><div class="gmail_quote">>On Thu, Dec 17, 2015 at 12:20 PM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 17.12.2015 13:06, Andrei Perietanu wrote:<br>> I am trying to migrate a VMware guest to KVM. I have the .vmdk file which I<br>> convert to qcow2 format using qemu-img convert.<br>><br>
> The next step is to import the new img file.<br>
><br>
> If I use virt-install --import <guest config options> it all works fine.<br>
> But when I try the same think using the libvirt API I get the "no boot disk<br>
> found" message when starting the vm.<br>
><br>
> When importing the VM through the libvirtAPI, I use the same xml<br>
> description virsh outputs (dumpxml) after initially doing the import.<br>
><br>
> xml - the description I got using virsh xmldump <domain name><br>
><br>
> xmlDesx = xml<br>
> conn.defineXML(xmlDesc)<br>
><br>
> One other important aspect is I am using a directory storage pool to store<br>
> all my volumes (.img files).<br>
> When I use virsh to import the vm, the storage pool recognizes the new<br>
> volume (the .img file I converted from the .vmdk file). But when I use the<br>
> libvirtAPI, it does not.<br>
><br>
> So my guess is that because the storage pool does not see the new volume<br>
> when I import the vm is the reason I get the "no boot disk found message".<br>
><br>
> Is there a way to tell the storage pool about the new volume?<br>
> What exactly does virsh do and I am not ?<br>
<br></span>'virsh pool-refresh' may solve your issue. Then, isn't virt-install<br>setting boot order too? If so, you will need to 'virsh edit $dom' and<br>adjust the domain XML to set correct boot order once you've attached<br>disk to domain.</blockquote><div> </div><div><span style="background-color:rgb(255,255,255)">  <font color="#000000">I actually need to use the libvirt API for this. So virsh does not solve my problem.</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">Plus the xml files are the same, the one I use to import the vm via libvirt api and the one </font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">virsh dumpxml outputs after importing the vm using virsh --import. So boot order, or any other </font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">domain configuration is not the issue.</font></span></div><div><font color="#000000"> </font></div><div>    Andrei </div></div><br></div></div>

<br>

        
        
        


<p><img src="http://www.klasonline.com/klas_telecom_email_sig_1_01.jpg"></p><p><span style="font-family:Arial;font-size:x-small">The information
transmitted is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of or taking
of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you
receive this in error please contact the sender and delete the
material from any computer immediately. It is the policy of Klas
 Limited to disavow the sending of offensive material and should
you consider that the material contained in the message is offensive
you should contact the sender immediately and also your I.T. Manager.</span></p><p><span style="font-family:Arial;font-size:x-small">Klas Telecom
Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.</span></p>
<p>
<font color="#000000"><font face="Arial"><font size="1">Klas Limited
(Company Number 163303) trading as Klas Telecom, an Irish Limited
Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.</font></font></font></p>