Skip to content

Ccan only migrate off host not to it #11709

@jonathaanbastin

Description

@jonathaanbastin

problem

I am trying to migrate VM's back to a host but everytime they fail. The other direction is find and I can stop VMs and start them on the effected host.

Front end kicks ou:
com.cloud.utils.exception.CloudRuntimeException: Provided libvirt destination ip is invalid at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtMigrateCommandWrapper.createMigrationURI(LibvirtMigrateCommandWrapper.java:98) at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtMigrateCommandWrapper.execute(LibvirtMigrateCommandWrapper.java:107) at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtMigrateCommandWrapper.execute(LibvirtMigrateCommandWrapper.java:88) at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78) at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1958) at com.cloud.agent.Agent.processRequest(Agent.java:779) at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1194) at com.cloud.utils.nio.Task.call(Task.java:83) at com.cloud.utils.nio.Task.call(Task.java:29) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

libvert
DST host
2025-09-24T12:33:24.077702+00:00 frn1-q05-s01 libvirtd[38853]: no connection driver available for lxc:/// 2025-09-24T12:33:24.078283+00:00 frn1-q05-s01 libvirtd[38853]: End of file while reading data: Input/output error 2025-09-24T12:33:25.349899+00:00 frn1-q05-s01 libvirtd[38853]: no connection driver available for lxc:/// 2025-09-24T12:33:25.350156+00:00 frn1-q05-s01 libvirtd[38853]: End of file while reading data: Input/output error
SRC host no error

Agent logs:
DST host
2025-09-24 12:43:36,112 INFO [kvm.resource.LibvirtConnection] (AgentRequest-Handler-4:[]) (logid:) No existing libvirtd connection found. Opening a new one 2025-09-24 12:43:36,115 WARN [kvm.resource.LibvirtConnection] (AgentRequest-Handler-4:[]) (logid:) Can not find a connection for Instance i-73-14849-VM. Assuming the default connection. 2025-09-24 12:43:36,158 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-4:[]) (logid:) Attempting to create storage pool c9b79b86-c5ef-3f73-9f2a-fc0d41857bff (NetworkFilesystem) in libvirt 2025-09-24 12:43:36,162 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-4:[]) (logid:) Found existing defined storage pool c9b79b86-c5ef-3f73-9f2a-fc0d41857bff, using it. 2025-09-24 12:43:36,172 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-4:[]) (logid:) Trying to fetch storage pool c9b79b86-c5ef-3f73-9f2a-fc0d41857bff from libvirt 2025-09-24 12:43:36,195 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-4:[]) (logid:) Trying to fetch storage pool 520f9d4c-f5a2-4279-b830-20327588987c from libvirt 2025-09-24 12:43:37,313 INFO [kvm.resource.LibvirtConnection] (AgentRequest-Handler-2:[]) (logid:) No existing libvirtd connection found. Opening a new one 2025-09-24 12:43:37,316 WARN [kvm.resource.LibvirtConnection] (AgentRequest-Handler-2:[]) (logid:) Can not find a connection for Instance i-73-14849-VM. Assuming the default connection. 2025-09-24 12:43:37,341 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-1:[]) (logid:) Trying to fetch storage pool 520f9d4c-f5a2-4279-b830-20327588987c from libvirt 2025-09-24 12:43:37,348 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-1:[]) (logid:) Asking libvirt to refresh storage pool 520f9d4c-f5a2-4279-b830-20327588987c 2025-09-24 12:43:37,548 WARN [kvm.resource.LibvirtKvmAgentHook] (AgentRequest-Handler-2:[]) (logid:) Groovy script '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not available. Transformations will not be applied. 2025-09-24 12:43:37,549 WARN [kvm.resource.LibvirtKvmAgentHook] (AgentRequest-Handler-2:[]) (logid:) Groovy scripting engine is not initialized. Data transformation skipped. ^C
SRC host
2025-09-24 12:43:37,279 WARN [cloud.agent.Agent] (AgentRequest-Handler-5:[]) (logid:) Caught: com.cloud.utils.exception.CloudRuntimeException: Provided libvirt destination ip is invalid at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtMigrateCommandWrapper.createMigrationURI(LibvirtMigrateCommandWrapper.java:98) at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtMigrateCommandWrapper.execute(LibvirtMigrateCommandWrapper.java:107) at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtMigrateCommandWrapper.execute(LibvirtMigrateCommandWrapper.java:88) at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78) at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1958) at com.cloud.agent.Agent.processRequest(Agent.java:779) at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1194) at com.cloud.utils.nio.Task.call(Task.java:83) at com.cloud.utils.nio.Task.call(Task.java:29) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

versions

Ubuntu 24.04.03
CloudStack 4.21.0.0
CloudStack Agent 4.20.0.0

The steps to reproduce the bug

  1. Power on VM on host 2

  2. Migrate to host 1 (fails)

  3. Power VM on host 1

  4. Migrate to host 2 (completes)
    ...

What to do about it?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions