XSI-1362/CA-373773: Reworked the logic for selecting boot mode when creating a VM.

The new logic takes also account of platform:secure-boot=auto.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-01-18 21:37:06 +00:00
parent 439d29d9c3
commit f30afbe1d2
12 changed files with 566 additions and 467 deletions

View File

@ -60,7 +60,7 @@ namespace XenAdmin.Commands
vm.IsRealVm() &&
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
Helpers.XapiEqualOrGreater_22_26_0(vm.Connection) &&
vm.IsUEFIEnabled();
vm.IsHVM() && vm.IsDefaultBootModeUefi();
}
protected override string GetCantRunReasonCore(IXenObject item)
@ -68,7 +68,7 @@ namespace XenAdmin.Commands
if (item is VM vm &&
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
Helpers.XapiEqualOrGreater_22_26_0(vm.Connection) &&
!vm.IsUEFIEnabled())
!(vm.IsHVM() && vm.IsDefaultBootModeUefi()))
return Messages.COMMAND_VTPM_DISABLED_NON_UEFI;
return base.GetCantRunReasonCore(item);

View File

@ -941,8 +941,28 @@ namespace XenAdmin.TabPages
{
s.AddEntry(FriendlyName("VM.BootOrder"), HVMBootOrder(vm),
new PropertiesToolStripMenuItem(new VmEditStartupOptionsCommand(Program.MainWindow, vm)));
if (Helpers.NaplesOrGreater(vm.Connection))
s.AddEntry(FriendlyName("VM.BootMode"), HVMBootMode(vm));
{
//see XSI-1362 for an explanation of this logic
if (vm.IsHVM() && vm.IsDefaultBootModeUefi())
{
var secureBoot = vm.GetSecureBootMode();
var pool = Helpers.GetPoolOfOne(vm.Connection);
var poolHasCertificates = !string.IsNullOrEmpty(pool?.uefi_certificates);
if (secureBoot == "true" && !poolHasCertificates)
s.AddEntry(FriendlyName("VM.BootMode"), string.Format(Messages.CUSTOM_FIELD_NAME_AND_TYPE, Messages.UEFI_SECURE_BOOT, Messages.GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES), Color.Red);
else if (secureBoot == "true" || secureBoot == "auto" && poolHasCertificates)
s.AddEntry(FriendlyName("VM.BootMode"), Messages.UEFI_SECURE_BOOT);
else
s.AddEntry(FriendlyName("VM.BootMode"), Messages.UEFI_BOOT);
}
else
{
s.AddEntry(FriendlyName("VM.BootMode"), Messages.BIOS_BOOT);
}
}
}
else
{
@ -1891,15 +1911,6 @@ namespace XenAdmin.TabPages
return string.Join("\n", order.Select(c => new BootDevice(c).ToString()).ToArray());
}
private static string HVMBootMode(VM vm)
{
if (vm.IsSecureBootEnabled())
return Messages.UEFI_SECURE_BOOT;
if (vm.IsUEFIEnabled())
return Messages.UEFI_BOOT;
return Messages.BIOS_BOOT;
}
#endregion
/// <summary>

View File

@ -33,26 +33,30 @@ namespace XenAdmin.Wizards
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BootModesControl));
this.groupBoxBootMode = new System.Windows.Forms.GroupBox();
this.tableLayoutPanelBootMode = new System.Windows.Forms.TableLayoutPanel();
this.radioButtonUEFISecureBoot = new System.Windows.Forms.RadioButton();
this.radioButtonBIOSBoot = new System.Windows.Forms.RadioButton();
this.imgBios = new System.Windows.Forms.PictureBox();
this.labelBios = new System.Windows.Forms.Label();
this.radioButtonUEFIBoot = new System.Windows.Forms.RadioButton();
this.imgUefi = new System.Windows.Forms.PictureBox();
this.labelUefi = new System.Windows.Forms.Label();
this.radioButtonUEFISecureBoot = new System.Windows.Forms.RadioButton();
this.imgSecureUefi = new System.Windows.Forms.PictureBox();
this.labelSecureUefi = new System.Windows.Forms.Label();
this.tableVtpmWarning = new System.Windows.Forms.TableLayoutPanel();
this.labelTpm = new System.Windows.Forms.Label();
this.imgTpm = new System.Windows.Forms.PictureBox();
this.labelUnsupported = new System.Windows.Forms.Label();
this.imgUnsupported = new System.Windows.Forms.PictureBox();
this.groupBoxDevSecurity = new System.Windows.Forms.GroupBox();
this.checkBoxVtpm = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableBootModeWarning = new System.Windows.Forms.TableLayoutPanel();
this.groupBoxBootMode.SuspendLayout();
this.tableLayoutPanelBootMode.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.imgBios)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imgUefi)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imgSecureUefi)).BeginInit();
this.tableVtpmWarning.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.imgTpm)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imgUnsupported)).BeginInit();
this.groupBoxDevSecurity.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tableBootModeWarning.SuspendLayout();
this.SuspendLayout();
//
// groupBoxBootMode
@ -64,18 +68,18 @@ namespace XenAdmin.Wizards
//
// tableLayoutPanelBootMode
//
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFISecureBoot, 0, 2);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonBIOSBoot, 0, 0);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFIBoot, 0, 1);
resources.ApplyResources(this.tableLayoutPanelBootMode, "tableLayoutPanelBootMode");
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonBIOSBoot, 0, 0);
this.tableLayoutPanelBootMode.Controls.Add(this.imgBios, 1, 0);
this.tableLayoutPanelBootMode.Controls.Add(this.labelBios, 2, 0);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFIBoot, 0, 1);
this.tableLayoutPanelBootMode.Controls.Add(this.imgUefi, 1, 1);
this.tableLayoutPanelBootMode.Controls.Add(this.labelUefi, 2, 1);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFISecureBoot, 0, 2);
this.tableLayoutPanelBootMode.Controls.Add(this.imgSecureUefi, 1, 2);
this.tableLayoutPanelBootMode.Controls.Add(this.labelSecureUefi, 2, 2);
this.tableLayoutPanelBootMode.Name = "tableLayoutPanelBootMode";
//
// radioButtonUEFISecureBoot
//
resources.ApplyResources(this.radioButtonUEFISecureBoot, "radioButtonUEFISecureBoot");
this.radioButtonUEFISecureBoot.Name = "radioButtonUEFISecureBoot";
this.radioButtonUEFISecureBoot.UseVisualStyleBackColor = true;
//
// radioButtonBIOSBoot
//
resources.ApplyResources(this.radioButtonBIOSBoot, "radioButtonBIOSBoot");
@ -83,12 +87,55 @@ namespace XenAdmin.Wizards
this.radioButtonBIOSBoot.UseVisualStyleBackColor = true;
this.radioButtonBIOSBoot.CheckedChanged += new System.EventHandler(this.radioButtonBIOSBoot_CheckedChanged);
//
// imgBios
//
resources.ApplyResources(this.imgBios, "imgBios");
this.imgBios.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
this.imgBios.Name = "imgBios";
this.imgBios.TabStop = false;
//
// labelBios
//
resources.ApplyResources(this.labelBios, "labelBios");
this.labelBios.Name = "labelBios";
//
// radioButtonUEFIBoot
//
resources.ApplyResources(this.radioButtonUEFIBoot, "radioButtonUEFIBoot");
this.radioButtonUEFIBoot.Name = "radioButtonUEFIBoot";
this.radioButtonUEFIBoot.UseVisualStyleBackColor = true;
//
// imgUefi
//
resources.ApplyResources(this.imgUefi, "imgUefi");
this.imgUefi.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
this.imgUefi.Name = "imgUefi";
this.imgUefi.TabStop = false;
//
// labelUefi
//
resources.ApplyResources(this.labelUefi, "labelUefi");
this.labelUefi.Name = "labelUefi";
//
// radioButtonUEFISecureBoot
//
resources.ApplyResources(this.radioButtonUEFISecureBoot, "radioButtonUEFISecureBoot");
this.radioButtonUEFISecureBoot.Name = "radioButtonUEFISecureBoot";
this.radioButtonUEFISecureBoot.UseVisualStyleBackColor = true;
this.radioButtonUEFISecureBoot.CheckedChanged += new System.EventHandler(this.radioButtonUEFISecureBoot_CheckedChanged);
//
// imgSecureUefi
//
resources.ApplyResources(this.imgSecureUefi, "imgSecureUefi");
this.imgSecureUefi.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
this.imgSecureUefi.Name = "imgSecureUefi";
this.imgSecureUefi.TabStop = false;
//
// labelSecureUefi
//
resources.ApplyResources(this.labelSecureUefi, "labelSecureUefi");
this.labelSecureUefi.Name = "labelSecureUefi";
//
// tableVtpmWarning
//
resources.ApplyResources(this.tableVtpmWarning, "tableVtpmWarning");
@ -108,18 +155,6 @@ namespace XenAdmin.Wizards
this.imgTpm.Name = "imgTpm";
this.imgTpm.TabStop = false;
//
// labelUnsupported
//
resources.ApplyResources(this.labelUnsupported, "labelUnsupported");
this.labelUnsupported.Name = "labelUnsupported";
//
// imgUnsupported
//
resources.ApplyResources(this.imgUnsupported, "imgUnsupported");
this.imgUnsupported.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
this.imgUnsupported.Name = "imgUnsupported";
this.imgUnsupported.TabStop = false;
//
// groupBoxDevSecurity
//
this.groupBoxDevSecurity.Controls.Add(this.checkBoxVtpm);
@ -139,16 +174,8 @@ namespace XenAdmin.Wizards
this.tableLayoutPanel1.Controls.Add(this.groupBoxBootMode, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.groupBoxDevSecurity, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.tableVtpmWarning, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.tableBootModeWarning, 0, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// tableBootModeWarning
//
resources.ApplyResources(this.tableBootModeWarning, "tableBootModeWarning");
this.tableBootModeWarning.Controls.Add(this.imgUnsupported, 0, 0);
this.tableBootModeWarning.Controls.Add(this.labelUnsupported, 1, 0);
this.tableBootModeWarning.Name = "tableBootModeWarning";
//
// BootModesControl
//
resources.ApplyResources(this, "$this");
@ -160,16 +187,16 @@ namespace XenAdmin.Wizards
this.groupBoxBootMode.ResumeLayout(false);
this.tableLayoutPanelBootMode.ResumeLayout(false);
this.tableLayoutPanelBootMode.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.imgBios)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.imgUefi)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.imgSecureUefi)).EndInit();
this.tableVtpmWarning.ResumeLayout(false);
this.tableVtpmWarning.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.imgTpm)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.imgUnsupported)).EndInit();
this.groupBoxDevSecurity.ResumeLayout(false);
this.groupBoxDevSecurity.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableBootModeWarning.ResumeLayout(false);
this.tableBootModeWarning.PerformLayout();
this.ResumeLayout(false);
}
@ -182,13 +209,16 @@ namespace XenAdmin.Wizards
private System.Windows.Forms.RadioButton radioButtonBIOSBoot;
private System.Windows.Forms.RadioButton radioButtonUEFIBoot;
private System.Windows.Forms.TableLayoutPanel tableVtpmWarning;
private System.Windows.Forms.PictureBox imgUnsupported;
private System.Windows.Forms.Label labelUnsupported;
private System.Windows.Forms.PictureBox imgUefi;
private System.Windows.Forms.Label labelBios;
private System.Windows.Forms.GroupBox groupBoxDevSecurity;
private System.Windows.Forms.CheckBox checkBoxVtpm;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label labelTpm;
private System.Windows.Forms.PictureBox imgTpm;
private System.Windows.Forms.TableLayoutPanel tableBootModeWarning;
private System.Windows.Forms.PictureBox imgBios;
private System.Windows.Forms.PictureBox imgSecureUefi;
private System.Windows.Forms.Label labelSecureUefi;
private System.Windows.Forms.Label labelUefi;
}
}

View File

@ -35,7 +35,7 @@ using System.Windows.Forms;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards
{
@ -43,6 +43,7 @@ namespace XenAdmin.Wizards
{
private VM _templateVM;
private IXenConnection _connection;
private bool _poolHasCertificates;
public BootModesControl()
{
@ -61,7 +62,11 @@ namespace XenAdmin.Wizards
_templateVM = value;
if (_templateVM != null)
{
_connection = _templateVM.Connection;
var pool = Helpers.GetPoolOfOne(_connection);
_poolHasCertificates = !string.IsNullOrEmpty(pool?.uefi_certificates);
}
UpdateControls();
UpdateTpmControls();
@ -79,17 +84,20 @@ namespace XenAdmin.Wizards
return;
_connection = value;
var pool = Helpers.GetPoolOfOne(_connection);
_poolHasCertificates = !string.IsNullOrEmpty(pool?.uefi_certificates);
UpdateControls();
UpdateTpmControls();
}
}
public BootMode SelectedOption =>
public VmBootMode SelectedBootMode =>
radioButtonUEFISecureBoot.Checked
? BootMode.UEFI_SECURE_BOOT
? VmBootMode.SecureUefi
: radioButtonUEFIBoot.Checked
? BootMode.UEFI_BOOT
: BootMode.BIOS_BOOT;
? VmBootMode.Uefi
: VmBootMode.Bios;
public bool AssignVtpm => !IsVtpmTemplate && checkBoxVtpm.Checked;
@ -102,50 +110,94 @@ namespace XenAdmin.Wizards
radioButtonBIOSBoot.Checked = true;
}
private void UpdateBiosWarning(string text)
{
if (string.IsNullOrEmpty(text))
{
imgBios.Visible = labelBios.Visible = false;
return;
}
imgBios.Visible = labelBios.Visible = true;
labelBios.Text = text;
}
private void UpdateUefiWarning(string text)
{
if (string.IsNullOrEmpty(text))
{
imgUefi.Visible = labelUefi.Visible = false;
return;
}
imgUefi.Visible = labelUefi.Visible = true;
labelUefi.Text = text;
}
private void UpdateSecureUefiWarning(string text, bool isInfo = true)
{
if (string.IsNullOrEmpty(text))
{
imgSecureUefi.Visible = labelSecureUefi.Visible = false;
return;
}
imgSecureUefi.Visible = labelSecureUefi.Visible = true;
labelSecureUefi.Text = text;
imgSecureUefi.Image = isInfo ? Images.StaticImages._000_Info3_h32bit_16 : Images.StaticImages._000_Alert2_h32bit_16;
}
private void UpdateControls()
{
radioButtonBIOSBoot.Enabled = true;
UpdateBiosWarning(null);
UpdateUefiWarning(null);
UpdateSecureUefiWarning(null);
radioButtonUEFIBoot.Visible = !Helpers.FeatureForbidden(_connection, Host.UefiBootDisabled);
radioButtonUEFISecureBoot.Visible = !Helpers.FeatureForbidden(_connection, Host.UefiSecureBootDisabled);
// ensure that a visible option is selected
if (radioButtonUEFIBoot.Checked && !radioButtonUEFIBoot.Visible)
radioButtonBIOSBoot.Checked = true;
if (radioButtonUEFISecureBoot.Checked && !radioButtonUEFISecureBoot.Visible)
radioButtonBIOSBoot.Checked = true;
if (_templateVM != null)
if (_templateVM == null)
{
radioButtonUEFIBoot.Enabled = _templateVM.CanSupportUEFIBoot();
radioButtonUEFISecureBoot.Enabled = _templateVM.CanSupportUEFISecureBoot();
radioButtonBIOSBoot.Enabled = radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = true;
radioButtonBIOSBoot.Checked = true;
return;
}
if (_templateVM.IsUEFIEnabled())
radioButtonBIOSBoot.Enabled = true;
radioButtonUEFIBoot.Enabled = _templateVM.SupportsUefiBoot();
if (!radioButtonUEFIBoot.Enabled)
UpdateUefiWarning(Messages.BOOT_MODE_UNSUPPORTED_WARNING);
radioButtonUEFISecureBoot.Enabled = _templateVM.SupportsSecureUefiBoot();
if (!radioButtonUEFISecureBoot.Enabled)
UpdateSecureUefiWarning(Messages.BOOT_MODE_UNSUPPORTED_WARNING);
if (_templateVM.IsHVM() && _templateVM.IsDefaultBootModeUefi())
{
if (!_templateVM.CanChangeBootMode() || IsVtpmTemplate)
{
if (_templateVM.IsSecureBootEnabled())
radioButtonUEFISecureBoot.Checked = true;
else
radioButtonUEFIBoot.Checked = true;
if (!_templateVM.CanChangeBootMode() || IsVtpmTemplate)
radioButtonBIOSBoot.Enabled = false;
radioButtonBIOSBoot.Enabled = false;
UpdateBiosWarning(Messages.BOOT_MODE_UNSUPPORTED_WARNING);
}
var secureBoot = _templateVM.GetSecureBootMode();
if (secureBoot == "true" || secureBoot == "auto" && _poolHasCertificates)
radioButtonUEFISecureBoot.Checked = true;
else
{
radioButtonBIOSBoot.Checked = true;
radioButtonUEFIBoot.Checked = true;
if (!_templateVM.CanChangeBootMode())
radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = false;
}
if (radioButtonUEFISecureBoot.Enabled && radioButtonUEFISecureBoot.Checked && !_poolHasCertificates)
UpdateSecureUefiWarning(Messages.GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES, false);
}
else
{
if (!_templateVM.CanChangeBootMode())
radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = false;
radioButtonBIOSBoot.Checked = true;
radioButtonUEFIBoot.Checked = false;
radioButtonUEFISecureBoot.Checked = false;
}
ShowTemplateWarning();
}
private void UpdateTpmControls()
@ -180,38 +232,6 @@ namespace XenAdmin.Wizards
labelTpm.Visible = imgTpm.Visible = groupBoxDevSecurity.Visible && !checkBoxVtpm.Enabled && !checkBoxVtpm.Checked;
}
private void ShowTemplateWarning()
{
if (_templateVM == null)
{
imgUnsupported.Visible = labelUnsupported.Visible = false;
return;
}
if (radioButtonBIOSBoot.Visible && !radioButtonBIOSBoot.Enabled)
{
imgUnsupported.Visible = labelUnsupported.Visible = true;
labelUnsupported.Text = Messages.BIOS_BOOT_MODE_UNSUPPORTED_WARNING;
return;
}
var uefiNotSupported = radioButtonUEFIBoot.Visible && !radioButtonUEFIBoot.Enabled;
var uefiSecureNotSupported = radioButtonUEFISecureBoot.Visible && !radioButtonUEFISecureBoot.Enabled;
if (uefiNotSupported || uefiSecureNotSupported)
{
imgUnsupported.Visible = labelUnsupported.Visible = true;
labelUnsupported.Text = uefiNotSupported && uefiSecureNotSupported
? Messages.GUEFI_BOOT_MODES_UNSUPPORTED_WARNING
: uefiNotSupported
? Messages.GUEFI_BOOT_MODE_UNSUPPORTED_WARNING
: Messages.GUEFI_SECUREBOOT_MODE_UNSUPPORTED_WARNING;
}
else
{
imgUnsupported.Visible = labelUnsupported.Visible = false;
}
}
public static bool ShowBootModeOptions(IXenConnection connection)
{
return Helpers.NaplesOrGreater(connection) &&
@ -222,5 +242,13 @@ namespace XenAdmin.Wizards
{
UpdateTpmControls();
}
private void radioButtonUEFISecureBoot_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonUEFISecureBoot.Checked && !_poolHasCertificates)
UpdateSecureUefiWarning(Messages.GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES, false);
else
UpdateSecureUefiWarning(null);
}
}
}

View File

@ -117,149 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="groupBoxBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="groupBoxBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>465, 98</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBoxBootMode.Text" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Name" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Name" xml:space="preserve">
<value>radioButtonBIOSBoot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Name" xml:space="preserve">
<value>radioButtonUEFIBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanelBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanelBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
</data>
<data name="tableLayoutPanelBootMode.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 3</value>
</data>
<data name="tableLayoutPanelBootMode.RowCount" type="System.Int32, mscorlib">
<data name="tableLayoutPanelBootMode.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>459, 79</value>
</data>
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="radioButtonUEFISecureBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFISecureBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonUEFISecureBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 49</value>
</data>
<data name="radioButtonUEFISecureBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 17</value>
</data>
<data name="radioButtonUEFISecureBoot.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="radioButtonUEFISecureBoot.Text" xml:space="preserve">
<value>UEFI &amp;Secure Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>0</value>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonBIOSBoot.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -267,6 +131,7 @@
<data name="radioButtonBIOSBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="radioButtonBIOSBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 3</value>
</data>
@ -289,8 +154,80 @@
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="imgBios.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="imgBios.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgBios.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="imgBios.InitialImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgBios.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 3</value>
</data>
<data name="imgBios.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 3, 3, 3</value>
</data>
<data name="imgBios.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="imgBios.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="&gt;&gt;imgBios.Name" xml:space="preserve">
<value>imgBios</value>
</data>
<data name="&gt;&gt;imgBios.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;imgBios.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;imgBios.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="labelBios.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="labelBios.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelBios.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelBios.Location" type="System.Drawing.Point, System.Drawing">
<value>147, 5</value>
</data>
<data name="labelBios.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
</data>
<data name="labelBios.Size" type="System.Drawing.Size, System.Drawing">
<value>306, 13</value>
</data>
<data name="labelBios.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;labelBios.Name" xml:space="preserve">
<value>labelBios</value>
</data>
<data name="&gt;&gt;labelBios.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelBios.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;labelBios.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="radioButtonUEFIBoot.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="radioButtonUEFIBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -304,7 +241,7 @@
<value>74, 17</value>
</data>
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>2</value>
</data>
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
<value>&amp;UEFI Boot</value>
@ -319,7 +256,238 @@
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="imgUefi.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="imgUefi.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgUefi.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="imgUefi.InitialImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgUefi.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 26</value>
</data>
<data name="imgUefi.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 3, 3, 3</value>
</data>
<data name="imgUefi.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="imgUefi.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="&gt;&gt;imgUefi.Name" xml:space="preserve">
<value>imgUefi</value>
</data>
<data name="&gt;&gt;imgUefi.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;imgUefi.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;imgUefi.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="labelUefi.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="labelUefi.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelUefi.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelUefi.Location" type="System.Drawing.Point, System.Drawing">
<value>147, 28</value>
</data>
<data name="labelUefi.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
</data>
<data name="labelUefi.Size" type="System.Drawing.Size, System.Drawing">
<value>306, 13</value>
</data>
<data name="labelUefi.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;labelUefi.Name" xml:space="preserve">
<value>labelUefi</value>
</data>
<data name="&gt;&gt;labelUefi.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelUefi.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;labelUefi.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="radioButtonUEFISecureBoot.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="radioButtonUEFISecureBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFISecureBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonUEFISecureBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 49</value>
</data>
<data name="radioButtonUEFISecureBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 17</value>
</data>
<data name="radioButtonUEFISecureBoot.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="radioButtonUEFISecureBoot.Text" xml:space="preserve">
<value>UEFI &amp;Secure Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="imgSecureUefi.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="imgSecureUefi.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgSecureUefi.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="imgSecureUefi.InitialImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgSecureUefi.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 49</value>
</data>
<data name="imgSecureUefi.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 3, 3, 3</value>
</data>
<data name="imgSecureUefi.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="imgSecureUefi.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="&gt;&gt;imgSecureUefi.Name" xml:space="preserve">
<value>imgSecureUefi</value>
</data>
<data name="&gt;&gt;imgSecureUefi.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;imgSecureUefi.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;imgSecureUefi.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="labelSecureUefi.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="labelSecureUefi.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelSecureUefi.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelSecureUefi.Location" type="System.Drawing.Point, System.Drawing">
<value>147, 51</value>
</data>
<data name="labelSecureUefi.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
</data>
<data name="labelSecureUefi.Size" type="System.Drawing.Size, System.Drawing">
<value>306, 13</value>
</data>
<data name="labelSecureUefi.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;labelSecureUefi.Name" xml:space="preserve">
<value>labelSecureUefi</value>
</data>
<data name="&gt;&gt;labelSecureUefi.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelSecureUefi.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;labelSecureUefi.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="tableLayoutPanelBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanelBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
</data>
<data name="tableLayoutPanelBootMode.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 3</value>
</data>
<data name="tableLayoutPanelBootMode.RowCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>459, 81</value>
</data>
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="imgBios" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelBios" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="imgUefi" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelUefi" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="imgSecureUefi" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelSecureUefi" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBoxBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="groupBoxBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>465, 100</value>
</data>
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBoxBootMode.Text" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Name" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableVtpmWarning.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@ -382,7 +550,7 @@
<value>1</value>
</data>
<data name="tableVtpmWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 197</value>
<value>3, 189</value>
</data>
<data name="tableVtpmWarning.RowCount" type="System.Int32, mscorlib">
<value>1</value>
@ -391,7 +559,7 @@
<value>465, 22</value>
</data>
<data name="tableVtpmWarning.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>2</value>
</data>
<data name="&gt;&gt;tableVtpmWarning.Name" xml:space="preserve">
<value>tableVtpmWarning</value>
@ -406,70 +574,7 @@
<value>2</value>
</data>
<data name="tableVtpmWarning.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelTpm" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="imgTpm" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="labelUnsupported.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="labelUnsupported.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelUnsupported.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelUnsupported.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 3</value>
</data>
<data name="labelUnsupported.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="labelUnsupported.Size" type="System.Drawing.Size, System.Drawing">
<value>437, 13</value>
</data>
<data name="labelUnsupported.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;labelUnsupported.Name" xml:space="preserve">
<value>labelUnsupported</value>
</data>
<data name="&gt;&gt;labelUnsupported.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelUnsupported.Parent" xml:space="preserve">
<value>tableBootModeWarning</value>
</data>
<data name="&gt;&gt;labelUnsupported.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="imgUnsupported.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgUnsupported.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="imgUnsupported.InitialImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="imgUnsupported.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="imgUnsupported.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="imgUnsupported.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="&gt;&gt;imgUnsupported.Name" xml:space="preserve">
<value>imgUnsupported</value>
</data>
<data name="&gt;&gt;imgUnsupported.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;imgUnsupported.Parent" xml:space="preserve">
<value>tableBootModeWarning</value>
</data>
<data name="&gt;&gt;imgUnsupported.ZOrder" xml:space="preserve">
<value>0</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelTpm" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="imgTpm" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,22" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="checkBoxVtpm.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -502,7 +607,7 @@
<value>Fill</value>
</data>
<data name="groupBoxDevSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 144</value>
<value>3, 136</value>
</data>
<data name="groupBoxDevSecurity.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 10, 3, 3</value>
@ -514,7 +619,7 @@
<value>465, 47</value>
</data>
<data name="groupBoxDevSecurity.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>1</value>
</data>
<data name="groupBoxDevSecurity.Text" xml:space="preserve">
<value>Device Security</value>
@ -534,45 +639,6 @@
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableBootModeWarning.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableBootModeWarning.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableBootModeWarning.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableBootModeWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableBootModeWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 107</value>
</data>
<data name="tableBootModeWarning.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableBootModeWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>465, 24</value>
</data>
<data name="tableBootModeWarning.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tableBootModeWarning.Name" xml:space="preserve">
<value>tableBootModeWarning</value>
</data>
<data name="&gt;&gt;tableBootModeWarning.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableBootModeWarning.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableBootModeWarning.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tableBootModeWarning.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="imgUnsupported" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelUnsupported" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -601,7 +667,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="groupBoxBootMode" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="groupBoxDevSecurity" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableVtpmWarning" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableBootModeWarning" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,30,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="groupBoxBootMode" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="groupBoxDevSecurity" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableVtpmWarning" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,20,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>

View File

@ -30,7 +30,7 @@
*/
using XenAdmin.Controls;
using XenAdmin.Actions.VMActions;
using XenAPI;
namespace XenAdmin.Wizards.ImportWizard
{
@ -78,7 +78,7 @@ namespace XenAdmin.Wizards.ImportWizard
#region Accessors
public BootMode SelectedBootMode => bootModesControl1.SelectedOption;
public VmBootMode SelectedBootMode => bootModesControl1.SelectedBootMode;
public bool AssignVtpm => bootModesControl1.AssignVtpm;
@ -88,8 +88,8 @@ namespace XenAdmin.Wizards.ImportWizard
{
switch (SelectedBootMode)
{
case BootMode.UEFI_BOOT:
case BootMode.UEFI_SECURE_BOOT:
case VmBootMode.Uefi:
case VmBootMode.SecureUefi:
return "firmware=uefi;";
default:
return string.Empty;
@ -103,7 +103,7 @@ namespace XenAdmin.Wizards.ImportWizard
{
switch (SelectedBootMode)
{
case BootMode.UEFI_SECURE_BOOT:
case VmBootMode.SecureUefi:
return "secureboot=true;";
default:
return string.Empty;

View File

@ -36,7 +36,6 @@ using System.Linq;
using System.Text.RegularExpressions;
using XenAdmin.Actions;
using XenAdmin.Actions.OvfActions;
using XenAdmin.Actions.VMActions;
using XenAdmin.Commands;
using XenAdmin.Controls;
using XenAdmin.Core;

View File

@ -39,7 +39,6 @@ using XenAdmin.Core;
using XenCenterLib;
using System.Windows.Forms;
using System.Drawing;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards.NewVMWizard
{
@ -60,9 +59,7 @@ namespace XenAdmin.Wizards.NewVMWizard
public bool AssignVtpm => bootModesControl1.AssignVtpm;
public BootMode SelectedBootMode => SelectedTemplate.IsHVM()
? bootModesControl1.SelectedOption
: BootMode.NOT_AVAILABLE;
public VmBootMode SelectedBootMode => bootModesControl1.SelectedBootMode;
public InstallMethod SelectedInstallMethod
{

View File

@ -47,26 +47,6 @@ namespace XenAdmin.Actions.VMActions
Network
}
public enum BootMode { BIOS_BOOT, UEFI_BOOT, UEFI_SECURE_BOOT, NOT_AVAILABLE }
public static class EnumExt
{
public static string StringOf(this BootMode x)
{
switch (x)
{
case BootMode.BIOS_BOOT:
return Messages.BIOS_BOOT;
case BootMode.UEFI_BOOT:
return Messages.UEFI_BOOT;
case BootMode.UEFI_SECURE_BOOT:
return Messages.UEFI_SECURE_BOOT;
default:
return Messages.UNAVAILABLE;
}
}
}
public class CreateVMAction : AsyncAction
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -77,7 +57,7 @@ namespace XenAdmin.Actions.VMActions
private readonly string _pvArgs;
private readonly VDI _cd;
private readonly string _url;
private readonly BootMode _bootMode;
private readonly VmBootMode _bootMode;
private readonly Host _homeServer;
private readonly long _vcpusMax;
private readonly long _vcpusAtStartup;
@ -136,7 +116,7 @@ namespace XenAdmin.Actions.VMActions
public CreateVMAction(IXenConnection connection, VM template, Host copyBiosStringsFrom,
string name, string description, InstallMethod installMethod,
string pvArgs, VDI cd, string url, BootMode bootMode, Host homeServer, long vcpusMax, long vcpusAtStartup,
string pvArgs, VDI cd, string url, VmBootMode bootMode, Host homeServer, long vcpusMax, long vcpusAtStartup,
long memoryDynamicMin, long memoryDynamicMax, long memoryStaticMax,
List<DiskDescription> disks, SR fullCopySR, List<VIF> vifs, bool startAfter,
bool assignVtpm, Action<VM, bool> warningDialogHAInvalidConfig,
@ -393,14 +373,14 @@ namespace XenAdmin.Actions.VMActions
{
VM.set_PV_args(Session, VM.opaque_ref, _pvArgs);
}
else if (_bootMode != BootMode.NOT_AVAILABLE)
else
{
var hvm_params = VM.HVM_boot_params;
hvm_params["firmware"] = _bootMode != BootMode.BIOS_BOOT ? "uefi" : "bios";
VM.set_HVM_boot_params(Session, VM.opaque_ref, hvm_params);
var hvmParams = VM.HVM_boot_params;
hvmParams["firmware"] = _bootMode == VmBootMode.Bios ? "bios" : "uefi";
VM.set_HVM_boot_params(Session, VM.opaque_ref, hvmParams);
var platform = VM.platform;
platform["secureboot"] = _bootMode == BootMode.UEFI_SECURE_BOOT ? "true" : "false";
platform["secureboot"] = _bootMode == VmBootMode.SecureUefi ? "true" : "false";
VM.set_platform(Session, VM.opaque_ref, platform);
}
}

View File

@ -6071,15 +6071,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to The BIOS boot mode is not supported with the selected template..
/// </summary>
public static string BIOS_BOOT_MODE_UNSUPPORTED_WARNING {
get {
return ResourceManager.GetString("BIOS_BOOT_MODE_UNSUPPORTED_WARNING", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to BIOS strings copied.
/// </summary>
@ -6292,6 +6283,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Not supported with the selected template.
/// </summary>
public static string BOOT_MODE_UNSUPPORTED_WARNING {
get {
return ResourceManager.GetString("BOOT_MODE_UNSUPPORTED_WARNING", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Boot order: {0}.
/// </summary>
@ -18448,29 +18448,11 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to The UEFI boot mode is not supported with the selected template..
/// Looks up a localized string similar to UEFI certificates are missing from your system.
/// </summary>
public static string GUEFI_BOOT_MODE_UNSUPPORTED_WARNING {
public static string GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES {
get {
return ResourceManager.GetString("GUEFI_BOOT_MODE_UNSUPPORTED_WARNING", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The UEFI and UEFI secure boot modes are not supported with the selected template..
/// </summary>
public static string GUEFI_BOOT_MODES_UNSUPPORTED_WARNING {
get {
return ResourceManager.GetString("GUEFI_BOOT_MODES_UNSUPPORTED_WARNING", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The UEFI secure boot mode is not supported with the selected template..
/// </summary>
public static string GUEFI_SECUREBOOT_MODE_UNSUPPORTED_WARNING {
get {
return ResourceManager.GetString("GUEFI_SECUREBOOT_MODE_UNSUPPORTED_WARNING", resourceCulture);
return ResourceManager.GetString("GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES", resourceCulture);
}
}

View File

@ -2204,9 +2204,6 @@ This is a potentially dangerous operation and is not allowed.</value>
<data name="BIOS_BOOT" xml:space="preserve">
<value>BIOS Boot</value>
</data>
<data name="BIOS_BOOT_MODE_UNSUPPORTED_WARNING" xml:space="preserve">
<value>The BIOS boot mode is not supported with the selected template.</value>
</data>
<data name="BIOS_STRINGS_COPIED" xml:space="preserve">
<value>BIOS strings copied</value>
</data>
@ -2299,6 +2296,9 @@ Deleting this bond will disrupt traffic through the secondary interface on the b
<data name="BOOT_MODE" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="BOOT_MODE_UNSUPPORTED_WARNING" xml:space="preserve">
<value>Not supported with the selected template</value>
</data>
<data name="BOOTORDER" xml:space="preserve">
<value>Boot order: {0}</value>
</data>
@ -6444,14 +6444,8 @@ Note: Any custom color selections will remain unchanged</value>
<data name="GROUP_ROLES" xml:space="preserve">
<value>Group Roles</value>
</data>
<data name="GUEFI_BOOT_MODE_UNSUPPORTED_WARNING" xml:space="preserve">
<value>The UEFI boot mode is not supported with the selected template.</value>
</data>
<data name="GUEFI_BOOT_MODES_UNSUPPORTED_WARNING" xml:space="preserve">
<value>The UEFI and UEFI secure boot modes are not supported with the selected template.</value>
</data>
<data name="GUEFI_SECUREBOOT_MODE_UNSUPPORTED_WARNING" xml:space="preserve">
<value>The UEFI secure boot mode is not supported with the selected template.</value>
<data name="GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES" xml:space="preserve">
<value>UEFI certificates are missing from your system</value>
</data>
<data name="GUI_NOT_COMPATIBLE" xml:space="preserve">
<value>This version of {0} can only connect to {1} {2} and greater versions. It cannot connect to {3}.

View File

@ -278,24 +278,6 @@ namespace XenAPI
return IsRealVm() && !IsHVM() && !other_config.ContainsKey("pvcheckpass");
}
public bool IsUEFIEnabled()
{
if (!IsHVM())
return false;
var firmware = Get(HVM_boot_params, "firmware");
return !string.IsNullOrEmpty(firmware) && firmware.Trim().ToLower() == "uefi";
}
public bool IsSecureBootEnabled()
{
if (!IsUEFIEnabled())
return false;
var secureboot = Get(platform, "secureboot");
return !string.IsNullOrEmpty(secureboot) && secureboot.Trim().ToLower() == "true";
}
public int GetVcpuWeight()
{
if (VCPUs_params != null && VCPUs_params.ContainsKey("weight"))
@ -449,14 +431,25 @@ namespace XenAPI
return true;
}
#region Supported Boot Mode Recommendations
#region Boot Mode
public bool CanSupportUEFIBoot()
public bool IsDefaultBootModeUefi()
{
var firmware = Get(HVM_boot_params, "firmware")?.Trim().ToLower();
return firmware == "uefi";
}
public string GetSecureBootMode()
{
return Get(platform, "secureboot")?.Trim().ToLower();
}
public bool SupportsUefiBoot()
{
return GetRecommendationByField("supports-uefi") == "yes";
}
public bool CanSupportUEFISecureBoot()
public bool SupportsSecureUefiBoot()
{
return GetRecommendationByField("supports-secure-boot") == "yes";
}
@ -1850,4 +1843,23 @@ namespace XenAPI
}
}
public enum VmBootMode { Bios, Uefi, SecureUefi }
public static class BootModeExtensions
{
public static string StringOf(this VmBootMode mode)
{
switch (mode)
{
case VmBootMode.Bios:
return Messages.BIOS_BOOT;
case VmBootMode.Uefi:
return Messages.UEFI_BOOT;
case VmBootMode.SecureUefi:
return Messages.UEFI_SECURE_BOOT;
default:
return Messages.UNAVAILABLE;
}
}
}
}