Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit e3a30f4

Browse files
committed
Revert "XSI-1107/CA-237939: Do not offer full disk copy when creating a VM from a snapshot."
This reverts commit b9df742.
1 parent adcb0c9 commit e3a30f4

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

XenAdmin/Wizards/NewVMWizard/Page_Storage.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,9 @@ private void UpdateEnablement(bool pageLoad = false)
274274
DisksGridView.Enabled = DisksRadioButton.Checked;
275275
DisklessVMRadioButton.Enabled = Template.IsHVM() && SelectedInstallMethod == InstallMethod.Network;
276276

277-
bool isDefaultTemplate = Template.DefaultTemplate();
278-
bool isSnapshot = Template.is_a_snapshot;
279-
bool createOnSameSr = false;
277+
CloneCheckBox.Enabled = false;
280278

281-
if (!isDefaultTemplate)
279+
if (!Template.DefaultTemplate())
282280
{
283281
foreach (DiskGridRowItem row in DisksGridView.Rows)
284282
{
@@ -288,15 +286,19 @@ private void UpdateEnablement(bool pageLoad = false)
288286

289287
if (row.SourceSR.Equals(dest))
290288
{
291-
createOnSameSr = true;
289+
CloneCheckBox.Enabled = true;
290+
291+
if (pageLoad)
292+
CloneCheckBox.Checked = true;
293+
292294
break;
293295
}
294296
}
295297
}
296298
}
297299

298-
CloneCheckBox.Enabled = createOnSameSr && !isSnapshot;
299-
CloneCheckBox.Checked = createOnSameSr && (isSnapshot || pageLoad);
300+
if (!CloneCheckBox.Enabled)
301+
CloneCheckBox.Checked = false;
300302

301303
OnPageUpdated();
302304
}

0 commit comments

Comments
 (0)