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

Commit

Permalink
Revert "XSI-1107/CA-237939: Do not offer full disk copy when creating…
Browse files Browse the repository at this point in the history
… a VM from a snapshot."

This reverts commit b9df742.
  • Loading branch information
kc284 committed Oct 27, 2021
1 parent adcb0c9 commit e3a30f4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions XenAdmin/Wizards/NewVMWizard/Page_Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,9 @@ private void UpdateEnablement(bool pageLoad = false)
DisksGridView.Enabled = DisksRadioButton.Checked;
DisklessVMRadioButton.Enabled = Template.IsHVM() && SelectedInstallMethod == InstallMethod.Network;

bool isDefaultTemplate = Template.DefaultTemplate();
bool isSnapshot = Template.is_a_snapshot;
bool createOnSameSr = false;
CloneCheckBox.Enabled = false;

if (!isDefaultTemplate)
if (!Template.DefaultTemplate())
{
foreach (DiskGridRowItem row in DisksGridView.Rows)
{
Expand All @@ -288,15 +286,19 @@ private void UpdateEnablement(bool pageLoad = false)

if (row.SourceSR.Equals(dest))
{
createOnSameSr = true;
CloneCheckBox.Enabled = true;

if (pageLoad)
CloneCheckBox.Checked = true;

break;
}
}
}
}

CloneCheckBox.Enabled = createOnSameSr && !isSnapshot;
CloneCheckBox.Checked = createOnSameSr && (isSnapshot || pageLoad);
if (!CloneCheckBox.Enabled)
CloneCheckBox.Checked = false;

OnPageUpdated();
}
Expand Down

0 comments on commit e3a30f4

Please sign in to comment.