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