I am trying to migrate a VMware guest to KVM. I have the .vmdk file which I convert to qcow2 format using qemu-img convert. The next step is to import the new img file. If I use virt-install --import <guest config options> it all works fine. But when I try the same think using the libvirt API I get the "no boot disk found" message when starting the vm. When importing the VM through the libvirtAPI, I use the same xml description virsh outputs (dumpxml) after initially doing the import. xml - the description I got using virsh xmldump <domain name> xmlDesx = xml conn.defineXML(xmlDesc) One other important aspect is I am using a directory storage pool to store all my volumes (.img files). When I use virsh to import the vm, the storage pool recognizes the new volume (the .img file I converted from the .vmdk file). But when I use the libvirtAPI, it does not. So my guess is that because the storage pool does not see the new volume when I import the vm is the reason I get the "no boot disk found message". Is there a way to tell the storage pool about the new volume? What exactly does virsh do and I am not ? Thanks, Andrei -- 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. Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW, Washington, DC 20007. 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.
Michal Privoznik
2015-Dec-17 12:20 UTC
Re: [libvirt-users] migrate a guest from VMware to KVM
On 17.12.2015 13:06, Andrei Perietanu wrote:> I am trying to migrate a VMware guest to KVM. I have the .vmdk file which I > convert to qcow2 format using qemu-img convert. > > The next step is to import the new img file. > > If I use virt-install --import <guest config options> it all works fine. > But when I try the same think using the libvirt API I get the "no boot disk > found" message when starting the vm. > > When importing the VM through the libvirtAPI, I use the same xml > description virsh outputs (dumpxml) after initially doing the import. > > xml - the description I got using virsh xmldump <domain name> > > xmlDesx = xml > conn.defineXML(xmlDesc) > > One other important aspect is I am using a directory storage pool to store > all my volumes (.img files). > When I use virsh to import the vm, the storage pool recognizes the new > volume (the .img file I converted from the .vmdk file). But when I use the > libvirtAPI, it does not. > > So my guess is that because the storage pool does not see the new volume > when I import the vm is the reason I get the "no boot disk found message". > > Is there a way to tell the storage pool about the new volume? > What exactly does virsh do and I am not ?'virsh pool-refresh' may solve your issue. Then, isn't virt-install setting boot order too? If so, you will need to 'virsh edit $dom' and adjust the domain XML to set correct boot order once you've attached disk to domain. Michal
Andrei Perietanu
2015-Dec-17 13:03 UTC
Re: [libvirt-users] migrate a guest from VMware to KVM
>On Thu, Dec 17, 2015 at 12:20 PM, Michal Privoznik <mprivozn@redhat.com>wrote:> On 17.12.2015 13:06, Andrei Perietanu wrote: > > I am trying to migrate a VMware guest to KVM. I have the .vmdk file > which I > > convert to qcow2 format using qemu-img convert. > > > > The next step is to import the new img file. > > > > If I use virt-install --import <guest config options> it all works fine. > > But when I try the same think using the libvirt API I get the "no boot > disk > > found" message when starting the vm. > > > > When importing the VM through the libvirtAPI, I use the same xml > > description virsh outputs (dumpxml) after initially doing the import. > > > > xml - the description I got using virsh xmldump <domain name> > > > > xmlDesx = xml > > conn.defineXML(xmlDesc) > > > > One other important aspect is I am using a directory storage pool to > store > > all my volumes (.img files). > > When I use virsh to import the vm, the storage pool recognizes the new > > volume (the .img file I converted from the .vmdk file). But when I use > the > > libvirtAPI, it does not. > > > > So my guess is that because the storage pool does not see the new volume > > when I import the vm is the reason I get the "no boot disk found > message". > > > > Is there a way to tell the storage pool about the new volume? > > What exactly does virsh do and I am not ? > > 'virsh pool-refresh' may solve your issue. Then, isn't virt-install > setting boot order too? If so, you will need to 'virsh edit $dom' and > adjust the domain XML to set correct boot order once you've attached > disk to domain.I actually need to use the libvirt API for this. So virsh does not solve my problem. Plus the xml files are the same, the one I use to import the vm via libvirt api and the one virsh dumpxml outputs after importing the vm using virsh --import. So boot order, or any other domain configuration is not the issue. Andrei -- 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. Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW, Washington, DC 20007. 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.