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