[ https://issues.apache.org/jira/browse/CLOUDSTACK-9025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043736#comment-15043736 ]
ASF GitHub Bot commented on CLOUDSTACK-9025: -------------------------------------------- Github user anshul1886 commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1176#discussion_r46767279 --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java --- @@ -185,7 +185,8 @@ public boolean trackVmHostChange() { DataTO srcData = cpyCommand.getSrcTO(); DataTO destData = cpyCommand.getDestTO(); - if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType() == DataObjectType.TEMPLATE) { + if (srcData.getHypervisorType() == HypervisorType.XenServer && srcData.getObjectType() == DataObjectType.SNAPSHOT && --- End diff -- @ustcweizhou @bhaisaab I prefer == to equals() method here for two reasons 1) Enum equals() method has same code internally http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/Enum.java#Enum.equals%28java.lang.Object%29 2) This will not result in NullPointerExceptions > Unable to deploy VM instance from template if template spin from linked clone > snapshot > -------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-9025 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9025 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: XenServer > Affects Versions: 4.5.2 > Environment: XenServer 6.5 > Reporter: Anshul Gangwar > Assignee: Anshul Gangwar > Priority: Critical > > As default, CloudStack create linked clone snapshot for VM instance . When we > take a snapshot for the VM, and create a template based on such snapshot, > CloudStack only download incremental VHD as template file, as a result, the > VM instance fail to deploy as it is incomplete. -- This message was sent by Atlassian JIRA (v6.3.4#6332)