Return-Path: X-Original-To: apmail-cloudstack-users-archive@www.apache.org Delivered-To: apmail-cloudstack-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 04F8910B49 for ; Wed, 31 Jul 2013 13:11:52 +0000 (UTC) Received: (qmail 13879 invoked by uid 500); 31 Jul 2013 13:11:51 -0000 Delivered-To: apmail-cloudstack-users-archive@cloudstack.apache.org Received: (qmail 13593 invoked by uid 500); 31 Jul 2013 13:11:49 -0000 Mailing-List: contact users-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cloudstack.apache.org Delivered-To: mailing list users@cloudstack.apache.org Received: (qmail 13569 invoked by uid 99); 31 Jul 2013 13:11:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2013 13:11:48 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yanke1@yonyou.com designates 125.35.5.165 as permitted sender) Received: from [125.35.5.165] (HELO yonyou.com) (125.35.5.165) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2013 13:11:40 +0000 Received: from kurtTHINK (unknown [124.202.191.233]) by coremail2.ufida.com.cn (Coremail) with SMTP id PgiowJCb3z_jDPlR7ZmmAQ--.63555S2; Wed, 31 Jul 2013 21:11:12 +0800 (CST) From: "Yan Ke" To: References: <51F8D1CD.30400@yonyou.com> In-Reply-To: <51F8D1CD.30400@yonyou.com> Subject: vhd-util 'failed to coalesce' while XenServer host executing 'create_privatetemplate_from_snapshot.sh' Date: Wed, 31 Jul 2013 21:10:56 +0800 Message-ID: <001a01ce8def$6bfb6220$43f22660$@yonyou.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01CE8E32.7A2001B0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQE1fPlUlXysAmmCTfL7YI8b1YJ+Npqw4qhw Content-Language: zh-cn X-CM-TRANSID: PgiowJCb3z_jDPlR7ZmmAQ--.63555S2 X-Coremail-Antispam: 1UD129KBjvJXoWxKw45GrWfWFW3ur48Kr1UGFg_yoWfJFy8pa y8J3WUJrn5J3Wruw45u3W3WayDWa9Y9FW3Ja1DX3W7Wrn8ZFy7W3ZakF95Zr4Fvwn2ka1I 9rW0qrWIkrWDAr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkIb7Iv0xC_Cr1lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40Eb7x2x7xS6r4j6ryUMc02F40E57IF 67AEF4xIwI1l5I8CrVAKz4kIr2xC04v26r1j6r4UMc02F40E42I26xC2a48xMcIj6I8E87 Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7xvr2IY c2Ij64vIr40E4x8a64kEw24l42xK82IYc2Ij64vIr41lx2IqxVAqx4xG67AKxVWUGVWUWw C20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48J MIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMI IF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvE x4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8o7K3UUUUU== X-CM-SenderInfo: 51dqyvmr6100x1rxhudrp/ X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_001B_01CE8E32.7A2001B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello there, I'm working on integrating CloudStack 4.0.1 with XenServer 6.0.2. I have managed setting up a basic network configuration, launching zone, launching guest instances as well as creating volume snapshots, but afterward I'm encountering following issue: The 'create template from snapshot' operation always fail. The management server log indicates that following Exception has been thrown during the operation process: com.cloud.utils.exception.CloudRuntimeException: create_privatetemplate_from_snapshot failed due to failed to coalesce /var/run/cloud_mount/d865f1ad-a164-443f-8c05-d4c56e690f25/b1a56afd-a943-4a43 -87b8-c2e2ab10126f.vhd to /var/run/cloud_mount/58d3242f-d4fb-41e9-a20e-0686ffda9eaa/85bd1f75-1d10-48c4 -ae79-d2e5ece8b6f1.vhd at com.cloud.hypervisor.xen.resource.CitrixResourceBase.createTemplateFromSnaps hot(CitrixResourceBase.java:2618) at com.cloud.hypervisor.xen.resource.CitrixResourceBase.execute(CitrixResourceB ase.java:6398) at com.cloud.hypervisor.xen.resource.CitrixResourceBase.executeRequest(CitrixRe sourceBase.java:475) at com.cloud.hypervisor.xen.resource.XenServer56Resource.executeRequest(XenServ er56Resource.java:73) at com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java: 191) 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.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$ 101(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sch eduledThreadPoolExecutor.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11 10) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6 03) at java.lang.Thread.run(Thread.java:679) With some effort on debugging the management server code, I figured out that the operation will finally lead to an invocation on the 'create_privatetemplate_from_snapshot.sh' script on the XenServer host. So I logged into the XenServer host and manually invoked the script with the same parameter from cloudstack, and it ended up as follow: [root@xenserver-modaxvnu bin]# sh -x /opt/xensource/bin/create_privatetemplate_from_snapshot.sh 20.10.97.182:/export/secondary/snapshots/2/10/85bd1f75-1d10-48c4-ae79-d2e5ec e8b6f1.vhd 20.10.97.182:/export/secondary/template/tmpl/2/218 7a51626c-dd10-43ca-b65a-162e88cf1188 + options=tcp,soft,timeo=133,retrans=1 + '[' -z 20.10.97.182:/export/secondary/snapshots/2/10/85bd1f75-1d10-48c4-ae79-d2e5ec e8b6f1.vhd ']' + snapshoturl=20.10.97.182:/export/secondary/snapshots/2/10 + vhdfilename=85bd1f75-1d10-48c4-ae79-d2e5ece8b6f1.vhd + '[' -z 20.10.97.182:/export/secondary/template/tmpl/2/218 ']' + templateurl=20.10.97.182:/export/secondary/template/tmpl/2/218 + '[' -z 7a51626c-dd10-43ca-b65a-162e88cf1188 ']' + tmpltLocalDir=7a51626c-dd10-43ca-b65a-162e88cf1188 ++ uuidgen -r + snapshotdir=/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b + mkdir -p /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b + '[' 0 -ne 0 ']' + mount -o tcp,soft,timeo=133,retrans=1 20.10.97.182:/export/secondary/snapshots/2/10 /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b + '[' 0 -ne 0 ']' + templatedir=/var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188 + mkdir -p /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188 + '[' 0 -ne 0 ']' + mount -o tcp,soft,timeo=133,retrans=1 20.10.97.182:/export/secondary/template/tmpl/2/218 /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188 + '[' 0 -ne 0 ']' + VHDUTIL=/opt/xensource/bin/vhd-util ++ uuidgen -r + templateuuid=3d1cf0b6-3eb5-4a8d-867b-ae16d14ce3ca + desvhd=/var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3e b5-4a8d-867b-ae16d14ce3ca.vhd + srcvhd=/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d 10-48c4-ae79-d2e5ece8b6f1.vhd + copyvhd /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3eb5-4a8d -867b-ae16d14ce3ca.vhd /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d10-48c4 -ae79-d2e5ece8b6f1.vhd + local desvhd=/var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3e b5-4a8d-867b-ae16d14ce3ca.vhd + local srcvhd=/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d 10-48c4-ae79-d2e5ece8b6f1.vhd + local parent= ++ /opt/xensource/bin/vhd-util query -p -n /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d10-48c4 -ae79-d2e5ece8b6f1.vhd + parent=/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98 a5-4ac3-89d7-8c4ed1af18f9.vhd + '[' 0 -ne 0 ']' + [[ /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98a5-4ac3 -89d7-8c4ed1af18f9.vhd =~ no parent ]] + copyvhd /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3eb5-4a8d -867b-ae16d14ce3ca.vhd /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98a5-4ac3 -89d7-8c4ed1af18f9.vhd + local desvhd=/var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3e b5-4a8d-867b-ae16d14ce3ca.vhd + local srcvhd=/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98 a5-4ac3-89d7-8c4ed1af18f9.vhd + local parent= ++ /opt/xensource/bin/vhd-util query -p -n /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98a5-4ac3 -89d7-8c4ed1af18f9.vhd + parent='/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-9 8a5-4ac3-89d7-8c4ed1af18f9.vhd has no parent' + '[' 0 -ne 0 ']' + [[ /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98a5-4ac3 -89d7-8c4ed1af18f9.vhd has no parent =~ no parent ]] + dd if=/var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/8c410e93-98a5-4 ac3-89d7-8c4ed1af18f9.vhd of=/var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3eb5-4 a8d-867b-ae16d14ce3ca.vhd bs=2M 470+1 records in 470+1 records out 987628032 bytes (988 MB) copied, 375.973 seconds, 2.6 MB/s + '[' 0 -ne 0 ']' + /opt/xensource/bin/vhd-util coalesce -p /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3eb5-4a8d -867b-ae16d14ce3ca.vhd -n /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d10-48c4 -ae79-d2e5ece8b6f1.vhd options: <-n name> [-a ancestor] [-o output] [-s sparse] [-p progress] [-h help] + '[' 22 -ne 0 ']' + echo '32#failed to coalesce /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3eb5-4a8d -867b-ae16d14ce3ca.vhd to /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d10-48c4 -ae79-d2e5ece8b6f1.vhd' 32#failed to coalesce /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188/3d1cf0b6-3eb5-4a8d -867b-ae16d14ce3ca.vhd to /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b/85bd1f75-1d10-48c4 -ae79-d2e5ece8b6f1.vhd + cleanup + '[' '!' -z /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b ']' + umount /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b + '[' 0 -eq 0 ']' + rmdir /var/run/cloud_mount/0be144dd-782a-45a0-9e88-ba4779b5c86b + '[' '!' -z /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188 ']' + umount /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188 + '[' 0 -eq 0 ']' + rmdir /var/run/cloud_mount/7a51626c-dd10-43ca-b65a-162e88cf1188 + exit 0 The 'vhd-util coalesce -p -n ' command failed. It seems that this is due to incorrect parameter. Can anybody help me figure out this issue? Any insight would be appreciated. And, thanks for your patient on reading this! Yours sincerely, Yan Ke ------=_NextPart_000_001B_01CE8E32.7A2001B0--