[Users] Unable to import VM

Daniel Rowe daniel.fathom13 at gmail.com
Sun Nov 11 23:49:01 UTC 2012


Hi

I was able to import one VM from libvirt. I am able to get the VM into the
export storage fine.

Any VMs I try and import after the first one fails and I get below in the
logs any way to work around this?

2012-11-12 07:44:56,366 ERROR [org.ovirt.engine.core.bll.ImportVmCommand]
(pool-3-thread-46) [7c3538ee] 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"
  Detail: Key (snapshot_id)=(00000000-0000-0000-0000-000000000000) already
exists.
  Where: SQL statement "INSERT INTO snapshots(
        snapshot_id,
        status,
        vm_id,
        snapshot_type,
        description,
        creation_date,
        app_list,
        vm_configuration)
    VALUES(
        v_snapshot_id,
        v_status,
        v_vm_id,
        v_snapshot_type,
        v_description,
        v_creation_date,
        v_app_list,
        v_vm_configuration)"
PL/pgSQL function "insertsnapshot" line 3 at SQL statement; nested
exception is org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "pk_snapshots"
  Detail: Key (snapshot_id)=(00000000-0000-0000-0000-000000000000) already
exists.
  Where: SQL statement "INSERT INTO snapshots(
        snapshot_id,
        status,
        vm_id,
        snapshot_type,
        description,
        creation_date,
        app_list,
        vm_configuration)
    VALUES(
        v_snapshot_id,
        v_status,
        v_vm_id,
        v_snapshot_type,
        v_description,
        v_creation_date,
        v_app_list,
        v_vm_configuration)"
PL/pgSQL function "insertsnapshot" line 3 at SQL statement
    at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:952)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:985)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:368)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:342)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:164)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:124)
[engine-dal.jar:]
    at
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:37)
[engine-dal.jar:]
    at
org.ovirt.engine.core.dao.DefaultGenericDaoDbFacade.save(DefaultGenericDaoDbFacade.java:93)
[engine-dal.jar:]
    at
org.ovirt.engine.core.bll.ImportVmCommand.addVmImagesAndSnapshots(ImportVmCommand.java:615)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.ImportVmCommand.access$200(ImportVmCommand.java:76)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.ImportVmCommand$4.runInTransaction(ImportVmCommand.java:501)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.ImportVmCommand$4.runInTransaction(ImportVmCommand.java:497)
[engine-bll.jar:]
    at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204)
[engine-utils.jar:]
    at
org.ovirt.engine.core.bll.ImportVmCommand.processImages(ImportVmCommand.java:497)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.ImportVmCommand.executeCommand(ImportVmCommand.java:477)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:804)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:896)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1203)
[engine-bll.jar:]
    at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:168)
[engine-utils.jar:]
    at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:107)
[engine-utils.jar:]
    at org.ovirt.engine.core.bll.CommandBase.Execute(CommandBase.java:911)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:268)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162)
[engine-bll.jar:]
    at
org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84)
[engine-bll.jar:]
    at
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64)
[engine-utils.jar:]
    at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[rt.jar:1.7.0_09-icedtea]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[rt.jar:1.7.0_09-icedtea]
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[rt.jar:1.7.0_09-icedtea]
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.7.0_09-icedtea]
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.7.0_09-icedtea]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "pk_snapshots"
  Detail: Key (snapshot_id)=(00000000-0000-0000-0000-000000000000) already
exists.
  Where: SQL statement "INSERT INTO snapshots(
        snapshot_id,
        status,
        vm_id,
        snapshot_type,
        description,
        creation_date,
        app_list,
        vm_configuration)
    VALUES(
        v_snapshot_id,
        v_status,
        v_vm_id,
        v_snapshot_type,
        v_description,
        v_creation_date,
        v_app_list,
        v_vm_configuration)"
PL/pgSQL function "insertsnapshot" line 3 at SQL statement
    at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
    at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
    at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
    at
org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:297)
    at
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:404)
    at
org.springframework.jdbc.core.JdbcTemplate$5.doInCallableStatement(JdbcTemplate.java:987)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:936)
[spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    ... 31 more

Regards
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20121112/24a428fb/attachment-0001.html>


More information about the Users mailing list