Skip to content

Unable to migrate instance that came from an external KVM host #8827

@pcfriek1987

Description

@pcfriek1987
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Migration to other host
CLOUDSTACK VERSION
4.19.0
CONFIGURATION

Local storage on VM hosts

OS / ENVIRONMENT

Ubuntu 22.04 on all hosts

SUMMARY

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions