[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Likitha Shetty resolved CLOUDSTACK-8113.
----------------------------------------
    Resolution: Fixed

+Root Cause Analysis+

Volume migration /VM migration with storage will fails if volume's path in DB 
(volume attached to the VM) doesn't match the volume's actual VMDK path.

When a VM is migrated with storage, all its volume's (entire disk chain) is 
migrated to the destination primary storage. In case of linked clones, the ROOT 
volume's chain will contain the parent template which is present in primary 
storage and the ROOT disk VMDK. Once the VM has been migrate if a volume 
snapshot is taken on the volume, it results in the coalesce of the ROOT disk 
chain wherein vCenter removes the top of the disk chain. This is because volume 
snapshot involves creation and deletion of VM snapshots during which vCenter 
coalesces the disk chain. Since vCenter removes the top of the disk chain, ROOT 
volumes' path changes. CS updates the volume path of only the volume whose 
snapshot is being taken once a volume snapshot has been taken. That is why any 
further operations on the volume like migration that depend on the volume's 
path will fail for the ROOT volume is the snapshot of a Datadisk is taken.

> VM migration fails with "Message: No such disk device: " error
> --------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8113
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8113
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.5.0
>            Reporter: Likitha Shetty
>            Assignee: Likitha Shetty
>            Priority: Critical
>             Fix For: Future
>
>
> +Steps to reproduce+
> 1. Deploy VM
> 2. Live Migrate VM to another primary storage pool
> 3. Take VM snapshot
> 4. Delete VM snapshot
> 5. Attempt to Migrate VM will fail with below error -
> {noformat}
> WARN  [c.c.h.v.r.VmwareResource] (DirectAgent-30:ctx-8ec50a5a 10.102.192.7) 
> MigrationCommand failed due to Exception: java.lang.Exception
> Message: No such disk device: ROOT-20-000001.vmdk
> java.lang.Exception: No such disk device: ROOT-20-000001.vmdk
>         at 
> com.cloud.hypervisor.vmware.resource.VmwareResource.getVirtualDiskInfo(VmwareResource.java:4814)
>         at 
> com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:4644)
>         at 
> com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:529)
>         at 
> com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:215)
>         at 
> org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:50)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at 
> org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:47)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
> INFO  [c.c.h.v.u.VmwareContextPool] (DirectAgent-30:ctx-8ec50a5a 
> 10.102.192.7) Recycle VmwareContext into idle pool: 
> [email protected], current idle pool size: 3, outstanding count: 3
> ERROR [o.a.c.s.m.VmwareStorageMotionStrategy] 
> (Work-Job-Executor-5:ctx-0b939401 job-252/job-253 ctx-0a71c68d) Migration 
> with storage of vm VM[User|i-2-20-VM] failed. Details: No such disk device: 
> ROOT-20-000001.vmdk
> ERROR [o.a.c.s.m.VmwareStorageMotionStrategy] 
> (Work-Job-Executor-5:ctx-0b939401 job-252/job-253 ctx-0a71c68d) copy failed
> com.cloud.utils.exception.CloudRuntimeException: Error while migrating the vm 
> VM[User|i-2-20-VM] to host Host[-6-Routing]. No such disk device: 
> ROOT-20-000001.vmdk
>         at 
> org.apache.cloudstack.storage.motion.VmwareStorageMotionStrategy.migrateVmWithVolumesAcrossCluster(VmwareStorageMotionStrategy.java:144)
>         at 
> org.apache.cloudstack.storage.motion.VmwareStorageMotionStrategy.copyAsync(VmwareStorageMotionStrategy.java:103)
>         at 
> org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:89)
>         at 
> org.apache.cloudstack.storage.volume.VolumeServiceImpl.migrateVolumes(VolumeServiceImpl.java:1023)
>         at 
> org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.migrateVolumes(VolumeOrchestrator.java:958)
>         at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateMigrateWithStorage(VirtualMachineManagerImpl.java:2138)
>         at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateMigrateWithStorage(VirtualMachineManagerImpl.java:5220)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
>         at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5315)
>         at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:101)
>         at 
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:519)
>         at 
> org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:50)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at 
> org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:47)
>         at 
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:476)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to