diff --git a/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.Designer.cs b/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.Designer.cs
index e1bfa1d2f..bc5aeb476 100644
--- a/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.Designer.cs
+++ b/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.Designer.cs
@@ -110,8 +110,8 @@
//
this.tableLayoutPanel2.SetColumnSpan(this.m_comboBoxISOLibraries, 2);
this.m_comboBoxISOLibraries.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- resources.ApplyResources(this.m_comboBoxISOLibraries, "m_comboBoxISOLibraries");
this.m_comboBoxISOLibraries.FormattingEnabled = true;
+ resources.ApplyResources(this.m_comboBoxISOLibraries, "m_comboBoxISOLibraries");
this.m_comboBoxISOLibraries.Name = "m_comboBoxISOLibraries";
this.m_comboBoxISOLibraries.SelectedIndexChanged += new System.EventHandler(this.m_comboBoxISOLibraries_SelectedIndexChanged);
//
diff --git a/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.cs b/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.cs
index a2d600759..8552042cb 100644
--- a/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.cs
+++ b/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.cs
@@ -117,10 +117,13 @@ namespace XenAdmin.Wizards.ImportWizard
/// Performs certain checks on the pages's input data and shows/hides an error accordingly
///
/// The checks to perform
- private void PerformCheck(params CheckDelegate[] checks)
+ private bool PerformCheck(params CheckDelegate[] checks)
{
- m_buttonNextEnabled = m_ctrlError.PerformCheck(checks);
+ var success = m_ctrlError.PerformCheck(checks);
+ m_buttonNextEnabled = success;
+ m_pictureBoxInfo.Visible = m_labelFixupISOInfo.Visible = success;
OnPageUpdated();
+ return success;
}
private bool IsIsoSrSelectable(SR sr)
@@ -209,6 +212,21 @@ namespace XenAdmin.Wizards.ImportWizard
return false;
}
+ private bool CheckCanCreateVdiOnIsoSr(out string error)
+ {
+ error = string.Empty;
+
+ SM sm = null;
+ if (SelectedIsoSR != null)
+ sm = SM.GetByType(Connection, SelectedIsoSR.type);
+
+ if (sm != null && sm.capabilities.Contains("VDI_CREATE"))
+ return true;
+
+ error = Messages.IMPORT_OPTIONS_PAGE_CANNOT_USE_SELECTED_ISO_LIBRARY;
+ return false;
+ }
+
private void PBD_CollectionChanged(object sender, CollectionChangeEventArgs e)
{
if (!(e.Element is PBD pbd))
@@ -324,20 +342,26 @@ namespace XenAdmin.Wizards.ImportWizard
private void ValidateSelection()
{
- SelectedIsoSR = m_comboBoxISOLibraries.SelectedItem is ToStringWrapper wrapper ? wrapper.item : null;
-
- if (SelectedIsoSR == null)
+ if (m_radioButtonDontRunOSFixups.Checked)
{
- m_pictureBoxInfo.Visible = m_labelFixupISOInfo.Visible = false;
- m_buttonNextEnabled = false;
+ m_buttonNextEnabled = true;
+ m_pictureBoxInfo.Visible = m_labelFixupISOInfo.Visible = m_ctrlError.Visible = false;
OnPageUpdated();
return;
}
- PerformCheck(CheckFixupIsoInXencenterInstallation);
+ SelectedIsoSR = m_radioButtonRunOSFixups.Checked && m_comboBoxISOLibraries.SelectedItem is ToStringWrapper wrapper
+ ? wrapper.item
+ : null;
- m_pictureBoxInfo.Visible = m_labelFixupISOInfo.Visible = !m_ctrlError.Visible;
- if (m_ctrlError.Visible)
+ if (!PerformCheck((out string error) =>
+ {
+ error = null;
+ return SelectedIsoSR != null;
+ }))
+ return;
+
+ if (!PerformCheck(CheckFixupIsoInXencenterInstallation))
return;
var isoName = OVF.GetISOFixupFileName();
@@ -352,6 +376,9 @@ namespace XenAdmin.Wizards.ImportWizard
}
}
+ if (!PerformCheck(CheckCanCreateVdiOnIsoSr))
+ return;
+
m_labelFixupISOInfo.Text = Messages.IMPORT_OPTIONS_PAGE_USE_SELECTED_ISO_LIBRARY;
}
@@ -361,6 +388,9 @@ namespace XenAdmin.Wizards.ImportWizard
private void m_comboBoxISOLibraries_SelectedIndexChanged(object sender, EventArgs e)
{
+ if (!m_radioButtonRunOSFixups.Checked)
+ m_radioButtonRunOSFixups.Checked = true;
+
ValidateSelection();
if (IsNewISOLibraryItem())
@@ -374,24 +404,13 @@ namespace XenAdmin.Wizards.ImportWizard
private void m_radioButtonRunOSFixups_CheckedChanged(object sender, EventArgs e)
{
if (m_radioButtonRunOSFixups.Checked)
- {
- m_labelLocationFixupISO.Enabled = true;
- m_comboBoxISOLibraries.Enabled = true;
ValidateSelection();
- }
}
private void m_radioButtonDontRunOSFixups_CheckedChanged(object sender, EventArgs e)
{
if (m_radioButtonDontRunOSFixups.Checked)
- {
- m_labelLocationFixupISO.Enabled = false;
- m_comboBoxISOLibraries.Enabled = false;
- m_pictureBoxInfo.Visible = false;
- m_labelFixupISOInfo.Visible = false;
- m_buttonNextEnabled = true;
- OnPageUpdated();
- }
+ ValidateSelection();
}
#endregion
diff --git a/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.resx b/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.resx
index c0fe31534..f7ec31f8b 100644
--- a/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.resx
+++ b/XenAdmin/Wizards/ImportWizard/ImportOptionsPage.resx
@@ -112,16 +112,16 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
True
-
+
GrowAndShrink
@@ -140,7 +140,7 @@
Fill
-
+
3, 0
@@ -192,7 +192,7 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
m_radioButtonDontRunOSFixups
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
tableLayoutPanel2
@@ -258,7 +258,7 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
m_radioButtonRunOSFixups
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
tableLayoutPanel2
@@ -308,23 +308,14 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
True
-
- False
-
NoControl
- 23, 193
-
-
- 3, 3, 3, 3
-
-
- 0, 3, 0, 3
+ 23, 196
- 130, 19
+ 130, 13
6
@@ -339,7 +330,7 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
m_labelLocationFixupISO
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
tableLayoutPanel2
@@ -347,9 +338,6 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
5
-
- False
-
159, 192
@@ -387,7 +375,7 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
m_pictureBoxInfo
- System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
tableLayoutPanel2
@@ -395,23 +383,20 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
7
+
+ Left, Right
+
True
-
- Fill
-
NoControl
- 181, 219
-
-
- 3, 3, 3, 3
+ 181, 220
- 409, 16
+ 409, 13
8
@@ -453,7 +438,7 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
tableLayoutPanel2
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
$this
@@ -497,7 +482,7 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
9
-
+
True
@@ -512,4 +497,4 @@ Operating System Fixup is supplied as a bootable ISO image which is attached to
XenAdmin.Controls.XenTabPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
-
+
\ No newline at end of file
diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs
index a17a0d7ec..0e3e6de02 100755
--- a/XenModel/Messages.Designer.cs
+++ b/XenModel/Messages.Designer.cs
@@ -18932,6 +18932,15 @@ namespace XenAdmin {
}
}
+ ///
+ /// Looks up a localized string similar to The Fixup ISO cannot be copied to the selected SR.
+ ///
+ public static string IMPORT_OPTIONS_PAGE_CANNOT_USE_SELECTED_ISO_LIBRARY {
+ get {
+ return ResourceManager.GetString("IMPORT_OPTIONS_PAGE_CANNOT_USE_SELECTED_ISO_LIBRARY", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to [Choose an ISO SR].
///
diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx
index 076685741..019d7af31 100755
--- a/XenModel/Messages.resx
+++ b/XenModel/Messages.resx
@@ -6674,6 +6674,9 @@ This might result in failure to migrate VMs to this server during the RPU or to
The Fixup ISO will be automatically copied to the selected SR
+
+ The Fixup ISO cannot be copied to the selected SR
+
Could not find the appliance certificate. The file is missing.