[virt-tools-list] Error using virt-convert

Cole Robinson crobinso at redhat.com
Fri Dec 14 21:05:19 UTC 2012


On 12/11/2012 01:44 PM, Chandana De Silva wrote:
> All,
> 
> I am trying to use virt-convert to convert a KVM/libvirt guest to VMWare ESX
> 4, and getting an error. Any help would be greatly appreciated.
> 
> I have created a virt-image image file as shown at
> http://people.redhat.com/dlutter/virt-image/virt-image-xml.html. See below for
> the xml file.
> 
> I am using the following command for the conversion, and am getting the error
> shown :
> /usr/bin/virt-convert -i virt-image -o vmx -D vmdk mon03.xml mon03
> 
> ERROR    Couldn't import file "mon03.xml": Couldn't import file 'mon03.xml':
> Disk entry for 'mon03' not found
> 
> The image file itself is readable by all:
> ls -la /var/lib/libvirt/imageshelf/mon03.img
> -rw-r--r-- 1 root m4u 8589934592 Dec  3 09:25
> /var/lib/libvirt/imageshelf/mon03.img
> 
> ls -la mon03.xml
> -rw-rw-r-- 1 chandana chandana 657 Dec  5 09:08 mon03.xml
> 
> <image>
>     <name>mon03</name>
>     <domain>
>         <boot type="hvm">
>             <guest>
>                 <arch>i686</arch>
>             </guest>
>             <os>
>                 <loader dev="cdrom"/>
>             </os>
>             <drive disk="mon03" target="hda"/>
>         </boot>
>         <devices>
>             <vcpu>2</vcpu>
>             <memory>262144</memory>
>             <interface/>
>             <graphics/>
>         </devices>
>         <storage>
>             <disk id="mon03" file="/var/lib/libvirt/imageshelf/mon03.img"
> use="system" size="8388608" format="raw"/>
>         </storage>
>     </domain>
> </image>
> <!-- vi: sw=4 ts=4 et:
> -->
> 

The <storage> block needs to be moved outside the <domain> block. And you need
to change file= to point to a relative path (like cp that disk image to your
local directory, and change file="mon03.img")

But beware, virt-convert has very few users and is not actively developed, so
it may give you additional errors.

- Cole




More information about the virt-tools-list mailing list