Thanks for your help.<br><br>I tried the import with a minimal OVF file as described by Shahar and it worked, but failed on activate.<br><br>This time I have a constraint violation on pk_vm_static, which means that ovirt-engine doesn't create a vm_guid if it isn't here. I guess it's the same for a lot of parameters.<br>
<br>To move forward, I'm going to create "shadow" VMs on ovirt-engine, export them and import my "real" libvirt/KVM VMs with the exported OVF files. Makes sense?<br><br>Where should I look in the source tree if I want to (try to) actually help with the restore code for imported VMs?<br>
<br>Alex<br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 5:59 AM, Shahar Havivi <span dir="ltr"><<a href="mailto:shaharh@redhat.com">shaharh@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 05.04.12 07:35, Itamar Heim wrote:<br>
> On 04/04/2012 01:13 PM, Alex Drahon wrote:<br>
> >Hello all,<br>
> ><br>
> >I'm trying to import VMs from a Centos5/KVM host to ovirt using<br>
> >virt-v2v. I used this command:<br>
> >virt-v2v -ic qemu+ssh://root@virthost1.mydomain.local/system -o rhev -os<br>
> >virthost3.mydomain.local:/exports/exp --network ovirtmgmt<br>
> >test.mydomain.local<br>
> ><br>
> >It works, but the resulting OVF file cannot be read by ovirt-engine<br>
> >("Failed to read VM '[Unknown name]' OVF, it may be corrupted").<br>
> ><br>
> >I had to edit the OVF file, removing the NIC Item worked, but restoring<br>
> >the imported VM fails. Looking at logs, I found a PostgreSQL constraint<br>
> >violation on an insert (sorry it's in French)<br>
> >"Caused by: org.postgresql.util.PSQLException: ERREUR: la valeur d une<br>
> >clé dupliquée rompt la contrainte unique « pk_vm_device »<br>
> > Where: instruction SQL « INSERT INTO vm_device( device_id, vm_id ,<br>
> >device , type, address , boot_order , spec_params, is_managed,<br>
> >is_plugged, is_readonly) VALUES( $1 , $2 , $3 , $4 , $5 , $6<br>
> >, $7 , $8 , $9 , $10 ) »"<br>
> ><br>
> >Looks like there's a primary key violation (duplicate) on insert.<br>
><br>
> cc-ing mbooth from v2v to have a look from ovf generation, but there<br>
> could be some bug in engine as well as the vm_device code was added<br>
> recently.<br>
><br>
> ><br>
> >I have two questions:<br>
> > - what's the minimal OVF file that can successfully import a VM?<br>
</div></div>you will need the header: the <Reference> tag the <Content> tag with the<br>
<Section> items: <System> and <item>s cpu and memory, all other devices can be<br>
omit.<br>
<div class="HOEnZb"><div class="h5">><br>
> shahar?<br>
><br>
> > - are 'default devices' created if they are not in the OVF file?<br>
> >(would explain PK violations)<br>
><br>
> eli?<br>
><br>
> ><br>
> >oVirt is very impressive and stable, deploying was a breeze, but it"s<br>
> >difficult to understand why it is so hard to move VMs from a libvirt/KVM<br>
> >host (which is basically the same architecture). Am I missing something?<br>
><br>
><br>
</div></div></blockquote></div><br>