From 7518488672bd14be3d153a67977300cfe258cf37 Mon Sep 17 00:00:00 2001 From: Anthony Xu Date: Tue, 23 Nov 2010 16:15:26 -0800 Subject: [PATCH] bug 7293: return complete installpath for createprivatetemplatefromvolume status 7293: resolved fixed --- .../cloud/hypervisor/xen/resource/CitrixResourceBase.java | 1 + scripts/vm/hypervisor/xenserver/vmopsSnapshot | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 2e114e8cd68..165983816bc 100644 --- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -5478,6 +5478,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR if (!result) { throw new CloudRuntimeException("Could not create the template.properties file on secondary storage dir: " + tmpltURI); } + installPath = installPath + "/" + tmpltFilename; return new CreatePrivateTemplateAnswer(cmd, true, null, installPath, virtualSize, tmpltUUID, ImageFormat.VHD); } catch (XenAPIException e) { details = "Creating template from volume " + volumeUUID + " failed due to " + e.getMessage(); diff --git a/scripts/vm/hypervisor/xenserver/vmopsSnapshot b/scripts/vm/hypervisor/xenserver/vmopsSnapshot index ca2f21e8bc0..d889390fa39 100755 --- a/scripts/vm/hypervisor/xenserver/vmopsSnapshot +++ b/scripts/vm/hypervisor/xenserver/vmopsSnapshot @@ -126,17 +126,18 @@ def post_create_private_template(session, args): template_properties_install_path = local_mount_path + "/template.properties" f = open(template_properties_install_path, "w") f.write("filename=" + filename + "\n") - f.write("name=" + filename + "\n") f.write("vhd=true\n") f.write("id=" + template_id + "\n") f.write("vhd.filename=" + filename + "\n") + f.write("public=false\n") f.write("uniquename=" + name + "\n") f.write("vhd.virtualsize=" + virtual_size + "\n") - f.write("vhd.size=" + str(file_size) + "\n") f.write("virtualsize=" + virtual_size + "\n") f.write("checksum=" + checksum + "\n") f.write("hvm=true\n") - f.write("description=" + name + "\n") + f.write("description=" + description + "\n") + f.write("vhd.size=" + str(file_size) + "\n") + f.write("size=" + str(file_size) + "\n") f.close() util.SMlog("Created template.properties file")