[Users] Importing from KVM

Shahar Havivi shaharh at redhat.com
Thu Apr 5 04:59:56 UTC 2012


On 05.04.12 07:35, Itamar Heim wrote:
> On 04/04/2012 01:13 PM, Alex Drahon wrote:
> >Hello all,
> >
> >I'm trying to import VMs from a Centos5/KVM host to ovirt using
> >virt-v2v. I used this command:
> >virt-v2v -ic qemu+ssh://root@virthost1.mydomain.local/system -o rhev -os
> >virthost3.mydomain.local:/exports/exp --network ovirtmgmt
> >test.mydomain.local
> >
> >It works, but the resulting OVF file cannot be read by ovirt-engine
> >("Failed to read VM '[Unknown name]' OVF, it may be corrupted").
> >
> >I had to edit the OVF file, removing the NIC Item worked, but restoring
> >the imported VM fails. Looking at logs, I found a PostgreSQL constraint
> >violation on an insert (sorry it's in French)
> >"Caused by: org.postgresql.util.PSQLException: ERREUR: la valeur d une
> >clé dupliquée rompt la contrainte unique « pk_vm_device »
> >   Where: instruction SQL « INSERT INTO vm_device( device_id, vm_id ,
> >device , type, address , boot_order , spec_params, is_managed,
> >is_plugged, is_readonly) VALUES(  $1  ,  $2  ,  $3  ,  $4  ,  $5  ,  $6
> >,  $7 ,  $8 ,  $9 ,  $10 ) »"
> >
> >Looks like there's a primary key violation (duplicate) on insert.
> 
> cc-ing mbooth from v2v to have a look from ovf generation, but there
> could be some bug in engine as well as the vm_device code was added
> recently.
> 
> >
> >I have two questions:
> >  - what's the minimal OVF file that can successfully import a VM?
you will need the header: the <Reference> tag the <Content> tag with the
<Section> items: <System> and <item>s cpu and memory, all other devices can be
omit.
> 
> shahar?
> 
> >  - are 'default devices' created if they are not in the OVF file?
> >(would explain PK violations)
> 
> eli?
> 
> >
> >oVirt is very impressive and stable, deploying was a breeze, but it"s
> >difficult to understand why it is so hard to move VMs from a libvirt/KVM
> >host (which is basically the same architecture). Am I missing something?
> 
> 



More information about the Users mailing list