You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to migrate instance that came from an external KVM host #8827
When trying to migrate an instance to a different host that was migrated from an external KVM host before, it errors out and won't migrate.
STEPS TO REPRODUCE
Migrate a VM from an external KVM host to Cloudstack, and then try to migrate that same instance to a different host.
EXPECTED RESULTS
That it migrates without issues
ACTUAL RESULTS
It errors out on "Failed to migrate VM [VM instance {"id":116,"instanceName":"i-8-115-VM","type":"User","uuid":"5056c82d-e436-408f-b4c7-e0be8229a1cd"}] along with its volumes due to [java.lang.NullPointerException]."
Here is the log for this action: https://gist.github.com/pcfriek1987/ba7bb24a8a373e5c2abaa22e802316ec
It seems to have something to do with the template it gets assigned when migrated is my assumption, as all migrated vm's get the: kvm-default-vm-import-dummy-template or VM default import template as listed on the side.
When trying to migrate it, it says:
Copying template [212] of volume [122] from source storage pool [5] to target storage pool [3].
2024-03-24 00:28:17,788 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (Work-Job-Executor-73:ctx-6a8adbf6 job-980/job-981 ctx-23d85860) (logid:61b73463) template 212 is not in store:2, type:Image
Template 212 is the dummy template according to MySQL.
This is kind of an issue since when migrating you cannot specify which server is should go too so instances you want to divide between physical servers you cannot move now. Instances created directly from CS work without issues.
Activity
pcfriek1987 commentedon Mar 25, 2024
Looks like migrating one offline between hosts works, just not online.
weizhouapache commentedon Mar 26, 2024
this looks like an issue related to vm import
added to 4.19.1.0 milestone. cc @sureshanaparti
pcfriek1987 commentedon Mar 26, 2024
The workaround currently is changing the vm template id in the database on the tables vm_instance and volumes.
As always, create a backup of your database before making any changes.
sureshanaparti commentedon Jun 24, 2024
Fixed in #9259