mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-21 07:49:32 +01:00
XSI-1107/CA-237939: Do not offer full disk copy when creating a VM from a snapshot.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
1936b74030
commit
7d9bbbc68b
@ -274,9 +274,11 @@ namespace XenAdmin.Wizards.NewVMWizard
|
|||||||
DisksGridView.Enabled = DisksRadioButton.Checked;
|
DisksGridView.Enabled = DisksRadioButton.Checked;
|
||||||
DisklessVMRadioButton.Enabled = Template.IsHVM() && SelectedInstallMethod == InstallMethod.Network;
|
DisklessVMRadioButton.Enabled = Template.IsHVM() && SelectedInstallMethod == InstallMethod.Network;
|
||||||
|
|
||||||
CloneCheckBox.Enabled = false;
|
bool isDefaultTemplate = Template.DefaultTemplate();
|
||||||
|
bool isSnapshot = Template.is_a_snapshot;
|
||||||
|
bool createOnSameSr = false;
|
||||||
|
|
||||||
if (!Template.DefaultTemplate())
|
if (!isDefaultTemplate)
|
||||||
{
|
{
|
||||||
foreach (DiskGridRowItem row in DisksGridView.Rows)
|
foreach (DiskGridRowItem row in DisksGridView.Rows)
|
||||||
{
|
{
|
||||||
@ -286,19 +288,15 @@ namespace XenAdmin.Wizards.NewVMWizard
|
|||||||
|
|
||||||
if (row.SourceSR.Equals(dest))
|
if (row.SourceSR.Equals(dest))
|
||||||
{
|
{
|
||||||
CloneCheckBox.Enabled = true;
|
createOnSameSr = true;
|
||||||
|
|
||||||
if (pageLoad)
|
|
||||||
CloneCheckBox.Checked = true;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CloneCheckBox.Enabled)
|
CloneCheckBox.Enabled = createOnSameSr && !isSnapshot;
|
||||||
CloneCheckBox.Checked = false;
|
CloneCheckBox.Checked = createOnSameSr && (isSnapshot || pageLoad);
|
||||||
|
|
||||||
OnPageUpdated();
|
OnPageUpdated();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user