Hi guys, 

I am wondering if anyone is experiencing problems with creating Snapshot, 
converting it to the Template and deploying a vm from that template? 

I am having a problem doing this on my newly installed ACS 4.2.0 with KVM 
hypervisor with NFS secondary storage. I get the following error: 


2013-12-23 15:54:11,088 DEBUG [agent.transport.Request] 
(AgentManager-Handler-11:null) Seq 1-2082880489 : Processing: { Ans: , MgmtId: 
238402986947284, via: 1, Ver: v1, Flags: 110, 
[{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"result":false,"details":"com.cloud.utils.exception.CloudRuntimeException:
 Failed to copy 
/mnt/08452456-d626-307b-9cbe-c028ae633435/59dfab5d-832e-4160-8f8e-47efb2d23d3e.raw
 to 0756278c-5abc-4e6c-b9ae-37033194d31a","wait":0}}] } 
2013-12-23 15:54:11,088 DEBUG [agent.manager.AgentAttache] 
(AgentManager-Handler-11:null) Seq 1-2082880489 : No more commands found 
2013-12-23 15:54:11,088 DEBUG [agent.transport.Request] 
(Job-Executor-113:job-548 = [ dc47c0ce-eb8b-4230-b58a-047ab55950fb ]) Seq 
1-2082880489 : Received: { Ans: , MgmtId: 238402986947284, via: 1, Ver: v1, 
Flags: 110, { CopyCmdAnswer } } 
2013-12-23 15:54:11,093 INFO [storage.volume.VolumeServiceImpl] 
(Job-Executor-113:job-548 = [ dc47c0ce-eb8b-4230-b58a-047ab55950fb ]) releasing 
lock for VMTemplateStoragePool 12 
2013-12-23 15:54:11,093 WARN [utils.db.Merovingian2] (Job-Executor-113:job-548 
= [ dc47c0ce-eb8b-4230-b58a-047ab55950fb ]) Was unable to find lock for the key 
template_spool_ref12 and thread id 291724899 
2013-12-23 15:54:11,093 DEBUG [cloud.storage.VolumeManagerImpl] 
(Job-Executor-113:job-548 = [ dc47c0ce-eb8b-4230-b58a-047ab55950fb ]) Unable to 
create Vol[504|vm=508|ROOT]:com.cloud.utils.exception.CloudRuntimeException: 
Failed to copy 
/mnt/08452456-d626-307b-9cbe-c028ae633435/59dfab5d-832e-4160-8f8e-47efb2d23d3e.raw
 to 0756278c-5abc-4e6c-b9ae-37033194d31a 
2013-12-23 15:54:11,093 INFO [cloud.vm.VirtualMachineManagerImpl] 
(Job-Executor-113:job-548 = [ dc47c0ce-eb8b-4230-b58a-047ab55950fb ]) Unable to 
contact resource. 
com.cloud.exception.StorageUnavailableException: Resource [StoragePool:2] is 
unreachable: Unable to create 
Vol[504|vm=508|ROOT]:com.cloud.utils.exception.CloudRuntimeException: Failed to 
copy 
/mnt/08452456-d626-307b-9cbe-c028ae633435/59dfab5d-832e-4160-8f8e-47efb2d23d3e.raw
 to 0756278c-5abc-4e6c-b9ae-37033194d31a 
at 
com.cloud.storage.VolumeManagerImpl.recreateVolume(VolumeManagerImpl.java:2544) 
at com.cloud.storage.VolumeManagerImpl.prepare(VolumeManagerImpl.java:2592) 
at 
com.cloud.vm.VirtualMachineManagerImpl.advanceStart(VirtualMachineManagerImpl.java:889)
 
at 
com.cloud.vm.VirtualMachineManagerImpl.start(VirtualMachineManagerImpl.java:578)
 
at 
org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.deployVirtualMachine(VMEntityManagerImpl.java:227)
 
at 
org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.deploy(VirtualMachineEntityImpl.java:209)
 
at 
com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:3406) 
at 
com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2966) 
at 
com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2952) 
at 
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
 
at 
org.apache.cloudstack.api.command.user.vm.DeployVMCmd.execute(DeployVMCmd.java:420)
 
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158) 
at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) 
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:701) 


The template file is there: 

# find ./ |grep 59dfab5d-832e-4160-8f8e-47efb2d23d3e.raw 
./template/tmpl/5/217/59dfab5d-832e-4160-8f8e-47efb2d23d3e.raw 


What I've noticed is that I can stop a vm, create a template from its volume 
and roll out a new vm without any issues. The problem is when you create a 
snapshot and create a template from that snapshot. 


An even stranger thing is that I have another installation of ACS 4.2.0, which 
has been upgraded many times from version 3 to 4.0 to 4.1 to 4.2.0 instead of a 
clean install. I do not have this issue on that installation of ACS, but I do 
with a clean one. I've tried reinstalling a clean version many times and the 
problem is reproducible for me. 

Any help or thoughts would be highly welcome. 

Many thanks 

Andrei 

Reply via email to