Skip to content

Commit b1ffd88

Browse files
author
Mike Tutkowski
committed
Save off the UUID of the VDI before detaching its SR
1 parent 15c8d8c commit b1ffd88

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ public SnapshotAndCopyAnswer snapshotAndCopy(SnapshotAndCopyCommand cmd) {
135135

136136
VDI vdiCopy = vdiSnapshot.copy(conn, newSr);
137137

138+
String vdiUuid = vdiCopy.getUuid(conn);
139+
138140
vdiSnapshot.destroy(conn);
139141

140142
if (sourceSr != null) {
@@ -145,7 +147,7 @@ public SnapshotAndCopyAnswer snapshotAndCopy(SnapshotAndCopyCommand cmd) {
145147

146148
SnapshotAndCopyAnswer snapshotAndCopyAnswer = new SnapshotAndCopyAnswer();
147149

148-
snapshotAndCopyAnswer.setPath(vdiCopy.getUuid(conn));
150+
snapshotAndCopyAnswer.setPath(vdiUuid);
149151

150152
return snapshotAndCopyAnswer;
151153
}

0 commit comments

Comments
 (0)