Jump to content
Welcome to our new Citrix community!
  • 0

VM migration/import fails: "would create a duplicate"


Alexander Reum

Question

Hello,

we're running 2 XenServer 7.2 installations, let's call them A and B. Recently I tried to migrate a certain VM from A to the B using XenCenter, but it failed with the following error message:

"Cannot restore this VM because it would create a duplicate". The same happens if I export the VM from A and try to import it on B.

There is

  • no VM with the same uuid on B
  • no VDI with the same uuid on B
  • no (virtual) network interface with the same MAC on B

 

I found this old thread that seems related, but unfortunately it is missing the happy end:

https://discussions.citrix.com/topic/326486-problem-with-storage-xenmotion-between-pools/

 

The log gives no info other than the source of the error, import.ml line 213.

The server has already been restarted.
Other VMs can be migrated without problems.

"xe task-list" is empty.

 

I'd really appreciate any hint on how to track down the cause. Thank you.

 

Kind regards,

Alex

Link to comment

4 answers to this question

Recommended Posts

  • 0

Good news: By examining the xensource.log more thoroughly, I found the following lines:

Jun 20 13:27:55 XenA xapi: [error|XenA|1142990 INET :::80|dispatch:VM.assert_can_migrate D:ef4c809dbb0b|backtrace] VM.assert_can_migrate R:4b04854e9fa3 failed with exception Server_error(DUPLICATE_VM, [ 7df2268c-78c1-ced1-a0c1-1019097ca9e7 ])
Jun 20 13:27:55 XenA xapi: [error|XenA|1142990 INET :::80|dispatch:VM.assert_can_migrate D:ef4c809dbb0b|backtrace] Raised Server_error(DUPLICATE_VM, [ 7df2268c-78c1-ced1-a0c1-1019097ca9e7 ])

The mentioned VM-UUID, 7df2268c-78c1-ced1-a0c1-1019097ca9e7, does neither belong to a real VM on A or B, nor is it equal to the one to be migrated. However, it belongs to a VM template on B, created ages ago from a VM snapshot. I stumbled upon it by accidentially typing "xe vm-list --all". Maybe the origin of this snapshot was exactly the VM that I tried to migrate, and somehow the relation had been detected by the API. After deleting the template, the migration worked.

 

Alex

  • Like 1
Link to comment
  • 0

Hi Alan,

indeed, it's a strange issue. A and B are different machines in different pools.

 

I'm close to reinstalling B, but I'm slightly afraid of not being able to reimport its VMs.

 

Do you happen to know what exactly this duplicate checker is looking for? I had a brief look at the XenAPI sources, but didn't really figure out what's going on.

 

Thanks,

Alex

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...