John Kinsella created CLOUDSTACK-5018: -----------------------------------------
Summary: Creation of VM using template from snapshot of RBD volume fails Key: CLOUDSTACK-5018 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5018 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: KVM Affects Versions: 4.2.0 Environment: NFS secondary storage Ceph primary storage Reporter: John Kinsella Assignee: John Kinsella Fix For: 4.2.1 Steps to reproduce: 1) Take snapshot of root disk of VM running on RBD primary storage 2) Create template from that snapshot 3) Attempt to create new VM from that template Agent logs during step 3: 2013-10-31 18:42:58,958 DEBUG [cloud.agent.Agent] (agentRequest-Handler-1:null) Request:Seq 1-1365246108: { Cmd , MgmtId: 23384517833 9448, via: 1, Ver: v1, Flags: 100111, [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.t o.TemplateObjectTO":{"path":"template/tmpl/2/220/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw","uuid":"1149ec70-c436-43d5-b78e-b3cde22a7ba 4","id":220,"format":"RAW","accountId":2,"hvm":true,"displayText":"jk32template","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_u rl":"nfs://10.200.80.10/exports/secondary","_role":"Image"}},"name":"3642a6c90-2b43-39c6-8e83-2733f91a6d96","hypervisorType":"KVM"}}," destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"uuid":"1149ec70-c436-43d5-b78e-b3cde22a7ba4","id":220,"format":"RAW","a ccountId":2,"hvm":true,"displayText":"jk32template","imageDataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"c 09eee9f-8191-398b-aea2-726f05a43943","id":2,"poolType":"RBD","host":"10.10.51.10","path":"libvirt-pool","port":6789}},"name":"3642a6c 90-2b43-39c6-8e83-2733f91a6d96","hypervisorType":"KVM"}},"executeInSequence":true,"wait":10800}}] } 2013-10-31 18:42:58,958 DEBUG [cloud.agent.Agent] (agentRequest-Handler-1:null) Processing command: org.apache.cloudstack.storage.comm and.CopyCommand 2013-10-31 18:42:58,960 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) createStoragePool didn't find existing running pool: org.libvirt.LibvirtException: Storage pool not found: no pool with matching uuid, need to create it 2013-10-31 18:42:58,960 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) Didn't find an existing storage pool 1 4c0760e-762b-335d-b3e4-4f6a7b5a140c by UUID, checking for pools with duplicate paths 2013-10-31 18:42:58,962 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) Checking path of existing pool dc461b1 f-96e9-4f74-a81e-adc8db3585cb against pool we want to create 2013-10-31 18:42:58,965 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) Checking path of existing pool c09eee9 f-8191-398b-aea2-726f05a43943 against pool we want to create 2013-10-31 18:42:58,967 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) Attempting to create storage pool 14c0 760e-762b-335d-b3e4-4f6a7b5a140c 2013-10-31 18:42:58,967 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) <pool type='netfs'> <name>14c0760e-762b-335d-b3e4-4f6a7b5a140c</name> <uuid>14c0760e-762b-335d-b3e4-4f6a7b5a140c</uuid> <source> <host name='10.200.80.10'/> <dir path='/exports/secondary/template/tmpl/2/220'/> </source> <target> <path>/mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c</path> </target> </pool> 2013-10-31 18:42:59,205 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) The source image is not RBD, but the destination is. We will convert into RBD format 2 2013-10-31 18:42:59,205 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) Converting /mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw to /tmp/ec1c030b-7899-4a76-9f70-aaca8269b875 as a temporary file for RBD conversion 2013-10-31 18:42:59,205 DEBUG [utils.script.Script] (agentRequest-Handler-1:null) Executing: qemu-img convert -f qcow2 -O raw /mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw /tmp/ec1c030b-7899-4a76-9f70-aaca8269b875 2013-10-31 18:42:59,216 DEBUG [utils.script.Script] (agentRequest-Handler-1:null) Exit value is 1 2013-10-31 18:42:59,216 DEBUG [utils.script.Script] (agentRequest-Handler-1:null) qemu-img: Could not open '/mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw': Invalid argumentqemu-img: Could not open '/mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw' 2013-10-31 18:42:59,216 ERROR [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-1:null) Failed to do a temp convert from /mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw to /tmp/ec1c030b-7899-4a76-9f70-aaca8269b875 the error was: qemu-img: Could not open '/mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw': Invalid argumentqemu-img: Could not open '/mnt/14c0760e-762b-335d-b3e4-4f6a7b5a140c/dab70ab3-0eef-44ac-bb8b-bb6a3e28cde0.raw' -- This message was sent by Atlassian JIRA (v6.1#6144)