[Users] Failed to import Vm after virt-v2v

Andrey Gordeev dreyou at gmail.com
Thu Aug 16 14:42:27 UTC 2012


Got error "Failed to import Vm <vmName> to <storageName>" after
running virt-v2v, also found error in engine.log:

2012-08-16 16:39:30,090 ERROR
[org.ovirt.engine.core.bll.ImportVmCommand] (pool-3-thread-50)
[2781049c] Command
org.ovirt.engine.core.bll.ImportVmCommand throw exception:
org.springframework.dao.DataIntegrityViolationException:
CallableStatementCallback; SQL [{call insertsnapshot(?, ?, ?, ?, ?, ?,
?, ?)}]; ERROR: duplicate key value violates
unique constraint "pk_snapshots"

Where: SQL statement "INSERT INTO snapshots( snapshot_id, status,
vm_id, snapshot_type, description, creation_date,
app_list, vm_configuration) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6
,  $7 ,  $8 )"


I discovered that this happened because i had 2 disks and virt-v2v set
ovf:vm_snapshot_id=“00000000-0000-0000-0000-000000000000” to both
disks.
When I replaced this ids to unique ids generated by uuid, then vm was
succesfully imported.

-- 
Andrey Gordeev aka Dreyou.



More information about the Users mailing list