Merge pull request #3094 from xenserver/feature/vtpm

Merge feature/vtpm into master
This commit is contained in:
Konstantina Chremmou 2023-02-13 15:33:50 +00:00 committed by GitHub
commit f885be7e4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 726 additions and 555 deletions

View File

@ -59,7 +59,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)
@ -67,7 +67,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

@ -43,6 +43,8 @@ namespace XenAdmin.Dialogs
this.labelUniqueKey = new System.Windows.Forms.Label();
this.toolTipContainerRemove = new XenAdmin.Controls.ToolTipContainer();
this.buttonRemove = new System.Windows.Forms.Button();
this.labelProtectedInfo = new System.Windows.Forms.Label();
this.labelUniqueInfo = new System.Windows.Forms.Label();
this.tableLayoutPanelBody.SuspendLayout();
this.groupBoxProperties.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
@ -77,9 +79,11 @@ namespace XenAdmin.Dialogs
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.labelProtectedKey, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.labelUniqueValue, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.labelProtectedValue, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.labelUniqueKey, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.labelProtectedInfo, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.labelUniqueKey, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.labelUniqueValue, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.labelUniqueInfo, 1, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// labelProtectedKey
@ -117,6 +121,16 @@ namespace XenAdmin.Dialogs
this.buttonRemove.UseVisualStyleBackColor = true;
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
//
// labelProtectedInfo
//
resources.ApplyResources(this.labelProtectedInfo, "labelProtectedInfo");
this.labelProtectedInfo.Name = "labelProtectedInfo";
//
// labelUniqueInfo
//
resources.ApplyResources(this.labelUniqueInfo, "labelUniqueInfo");
this.labelUniqueInfo.Name = "labelUniqueInfo";
//
// VtpmManagementPage
//
this.BackColor = System.Drawing.Color.Transparent;
@ -144,5 +158,7 @@ namespace XenAdmin.Dialogs
private System.Windows.Forms.Label labelProtectedValue;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private Controls.ToolTipContainer toolTipContainerRemove;
private System.Windows.Forms.Label labelProtectedInfo;
private System.Windows.Forms.Label labelUniqueInfo;
}
}

View File

@ -153,11 +153,7 @@
<value>True</value>
</data>
<data name="labelProtectedKey.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 5</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelProtectedKey.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 5, 5, 5</value>
<value>3, 0</value>
</data>
<data name="labelProtectedKey.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 13</value>
@ -180,47 +176,17 @@
<data name="&gt;&gt;labelProtectedKey.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelUniqueValue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelUniqueValue.Location" type="System.Drawing.Point, System.Drawing">
<value>61, 28</value>
</data>
<data name="labelUniqueValue.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 5, 5, 5</value>
</data>
<data name="labelUniqueValue.Size" type="System.Drawing.Size, System.Drawing">
<value>90, 13</value>
</data>
<data name="labelUniqueValue.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="labelUniqueValue.Text" xml:space="preserve">
<value>labelUniqueValue</value>
</data>
<data name="&gt;&gt;labelUniqueValue.Name" xml:space="preserve">
<value>labelUniqueValue</value>
</data>
<data name="&gt;&gt;labelUniqueValue.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;labelUniqueValue.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelUniqueValue.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="labelProtectedValue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelProtectedValue.Location" type="System.Drawing.Point, System.Drawing">
<value>61, 5</value>
<data name="labelProtectedValue.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
</data>
<data name="labelProtectedValue.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 5, 5, 5</value>
<data name="labelProtectedValue.Location" type="System.Drawing.Point, System.Drawing">
<value>65, 0</value>
</data>
<data name="labelProtectedValue.Size" type="System.Drawing.Size, System.Drawing">
<value>102, 13</value>
<value>121, 13</value>
</data>
<data name="labelProtectedValue.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -238,22 +204,50 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelProtectedValue.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="labelProtectedInfo.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelProtectedInfo.Location" type="System.Drawing.Point, System.Drawing">
<value>65, 16</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelProtectedInfo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 8</value>
</data>
<data name="labelProtectedInfo.Size" type="System.Drawing.Size, System.Drawing">
<value>321, 39</value>
</data>
<data name="labelProtectedInfo.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="labelProtectedInfo.Text" xml:space="preserve">
<value>The contents of a protected vTPM are shielded from unauthorized access and undetected tampering when saved to persistent storage or sent via network.</value>
</data>
<data name="&gt;&gt;labelProtectedInfo.Name" xml:space="preserve">
<value>labelProtectedInfo</value>
</data>
<data name="&gt;&gt;labelProtectedInfo.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;labelProtectedInfo.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelProtectedInfo.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="labelUniqueKey.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelUniqueKey.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 28</value>
</data>
<data name="labelUniqueKey.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 5, 5, 5</value>
<value>3, 63</value>
</data>
<data name="labelUniqueKey.Size" type="System.Drawing.Size, System.Drawing">
<value>44, 13</value>
</data>
<data name="labelUniqueKey.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>3</value>
</data>
<data name="labelUniqueKey.Text" xml:space="preserve">
<value>Unique:</value>
@ -270,20 +264,80 @@
<data name="&gt;&gt;labelUniqueKey.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="labelUniqueValue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelUniqueValue.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
</data>
<data name="labelUniqueValue.Location" type="System.Drawing.Point, System.Drawing">
<value>65, 63</value>
</data>
<data name="labelUniqueValue.Size" type="System.Drawing.Size, System.Drawing">
<value>106, 13</value>
</data>
<data name="labelUniqueValue.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="labelUniqueValue.Text" xml:space="preserve">
<value>labelUniqueValue</value>
</data>
<data name="&gt;&gt;labelUniqueValue.Name" xml:space="preserve">
<value>labelUniqueValue</value>
</data>
<data name="&gt;&gt;labelUniqueValue.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;labelUniqueValue.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelUniqueValue.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="labelUniqueInfo.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelUniqueInfo.Location" type="System.Drawing.Point, System.Drawing">
<value>65, 79</value>
</data>
<data name="labelUniqueInfo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 8</value>
</data>
<data name="labelUniqueInfo.Size" type="System.Drawing.Size, System.Drawing">
<value>323, 39</value>
</data>
<data name="labelUniqueInfo.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="labelUniqueInfo.Text" xml:space="preserve">
<value>The contents of a unique vTPM cannot be duplicated through any VM operation such as copy, clone, export, or creation from a snapshot.</value>
</data>
<data name="&gt;&gt;labelUniqueInfo.Name" xml:space="preserve">
<value>labelUniqueInfo</value>
</data>
<data name="&gt;&gt;labelUniqueInfo.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;labelUniqueInfo.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelUniqueInfo.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
<value>3, 19</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>2</value>
<value>4</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>393, 81</value>
<value>393, 138</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -301,7 +355,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="labelProtectedKey" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelUniqueValue" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelProtectedValue" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelUniqueKey" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="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="labelProtectedKey" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelProtectedValue" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelProtectedInfo" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelUniqueKey" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelUniqueValue" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelUniqueInfo" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxProperties.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -309,8 +363,11 @@
<data name="groupBoxProperties.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="groupBoxProperties.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 3</value>
</data>
<data name="groupBoxProperties.Size" type="System.Drawing.Size, System.Drawing">
<value>399, 100</value>
<value>399, 160</value>
</data>
<data name="groupBoxProperties.TabIndex" type="System.Int32, mscorlib">
<value>0</value>

View File

@ -940,8 +940,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
{
@ -1889,15 +1909,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

@ -34,7 +34,7 @@ using System.Windows.Forms;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards
{
@ -42,6 +42,7 @@ namespace XenAdmin.Wizards
{
private VM _templateVM;
private IXenConnection _connection;
private bool _poolHasCertificates;
public BootModesControl()
{
@ -60,7 +61,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();
@ -78,17 +83,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;
@ -101,50 +109,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
{
radioButtonBIOSBoot.Checked = true;
radioButtonUEFIBoot.Checked = false;
radioButtonUEFISecureBoot.Checked = false;
}
if (!_templateVM.CanChangeBootMode())
radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = false;
ShowTemplateWarning();
radioButtonBIOSBoot.Checked = true;
}
}
private void UpdateTpmControls()
@ -179,38 +231,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) &&
@ -221,5 +241,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

@ -29,7 +29,7 @@
*/
using XenAdmin.Controls;
using XenAdmin.Actions.VMActions;
using XenAPI;
namespace XenAdmin.Wizards.ImportWizard
{
@ -77,7 +77,7 @@ namespace XenAdmin.Wizards.ImportWizard
#region Accessors
public BootMode SelectedBootMode => bootModesControl1.SelectedOption;
public VmBootMode SelectedBootMode => bootModesControl1.SelectedBootMode;
public bool AssignVtpm => bootModesControl1.AssignVtpm;
@ -87,8 +87,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;
@ -102,7 +102,7 @@ namespace XenAdmin.Wizards.ImportWizard
{
switch (SelectedBootMode)
{
case BootMode.UEFI_SECURE_BOOT:
case VmBootMode.SecureUefi:
return "secureboot=true;";
default:
return string.Empty;

View File

@ -35,7 +35,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

@ -38,7 +38,6 @@ using XenAdmin.Core;
using XenCenterLib;
using System.Windows.Forms;
using System.Drawing;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards.NewVMWizard
{
@ -59,9 +58,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

@ -30,10 +30,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
using XenAdmin.Core;
using System.Xml;
namespace XenAdmin.Actions.VMActions
@ -45,26 +46,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);
@ -75,7 +56,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;
@ -134,7 +115,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,
@ -321,7 +302,7 @@ namespace XenAdmin.Actions.VMActions
{
if (_copyBiosStringsFrom != null && Template.DefaultTemplate())
{
VM.copy_bios_strings(Session, this.VM.opaque_ref, _copyBiosStringsFrom.opaque_ref);
VM.copy_bios_strings(Session, VM.opaque_ref, _copyBiosStringsFrom.opaque_ref);
}
}
@ -335,8 +316,8 @@ namespace XenAdmin.Actions.VMActions
private void SetVMParams()
{
Description = Messages.SETTING_VM_PROPERTIES;
XenAPI.VM.set_name_label(Session, VM.opaque_ref, _nameLabel);
XenAPI.VM.set_name_description(Session, VM.opaque_ref, _nameDescription);
VM.set_name_label(Session, VM.opaque_ref, _nameLabel);
VM.set_name_description(Session, VM.opaque_ref, _nameDescription);
ChangeVCPUSettingsAction vcpuAction = new ChangeVCPUSettingsAction(VM, _vcpusMax, _vcpusAtStartup);
vcpuAction.RunSync(Session);
@ -349,10 +330,10 @@ namespace XenAdmin.Actions.VMActions
// Check these values have changed before setting them, as they are RBAC protected
if (HomeServerChanged())
XenAPI.VM.set_affinity(Session, VM.opaque_ref, _homeServer != null ? _homeServer.opaque_ref : Helper.NullOpaqueRef);
VM.set_affinity(Session, VM.opaque_ref, _homeServer != null ? _homeServer.opaque_ref : Helper.NullOpaqueRef);
if (Template.memory_dynamic_min != _memoryDynamicMin || Template.memory_dynamic_max != _memoryDynamicMax || Template.memory_static_max != _memoryStaticMax)
XenAPI.VM.set_memory_limits(Session, VM.opaque_ref, Template.memory_static_min, _memoryStaticMax, _memoryDynamicMin, _memoryDynamicMax);
VM.set_memory_limits(Session, VM.opaque_ref, Template.memory_static_min, _memoryStaticMax, _memoryDynamicMin, _memoryDynamicMax);
}
private bool HomeServerChanged()
@ -371,35 +352,35 @@ namespace XenAdmin.Actions.VMActions
// boot from network
Dictionary<string, string> hvm_params = VM.HVM_boot_params;
hvm_params["order"] = GetBootOrderNetworkFirst();
XenAPI.VM.set_HVM_boot_params(Session, VM.opaque_ref, hvm_params);
VM.set_HVM_boot_params(Session, VM.opaque_ref, hvm_params);
}
else if (IsEli() && _installMethod == InstallMethod.Network)
{
Dictionary<string, string> other_config = VM.other_config;
string normal_url = IsRhel() ? NormalizeRepoUrlForRHEL(_url) : _url;
other_config["install-repository"] = normal_url;
XenAPI.VM.set_other_config(Session, VM.opaque_ref, other_config);
VM.set_other_config(Session, VM.opaque_ref, other_config);
}
else if (IsEli() && _installMethod == InstallMethod.CD)
{
Dictionary<string, string> other_config = VM.other_config;
other_config["install-repository"] = "cdrom";
XenAPI.VM.set_other_config(Session, VM.opaque_ref, other_config);
VM.set_other_config(Session, VM.opaque_ref, other_config);
}
if (!Template.IsHVM())
{
XenAPI.VM.set_PV_args(Session, VM.opaque_ref, _pvArgs);
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";
XenAPI.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";
XenAPI.VM.set_platform(Session, VM.opaque_ref, platform);
platform["secureboot"] = _bootMode == VmBootMode.SecureUefi ? "true" : "false";
VM.set_platform(Session, VM.opaque_ref, platform);
}
}
@ -424,7 +405,7 @@ namespace XenAdmin.Actions.VMActions
{
Description = Messages.PROVISIONING_VM;
RewriteProvisionXML();
RelatedTask = XenAPI.VM.async_provision(Session, VM.opaque_ref);
RelatedTask = VM.async_provision(Session, VM.opaque_ref);
PollToCompletion(10, 60);
}
@ -439,13 +420,13 @@ namespace XenAdmin.Actions.VMActions
// set the new vm's provision xml: remove "disks" entry, as we are going to explicitly create all the disks
Dictionary<string, string> other_config = VM.other_config;
other_config.Remove("disks");
XenAPI.VM.set_other_config(Session, VM.opaque_ref, other_config);
VM.set_other_config(Session, VM.opaque_ref, other_config);
}
private void AddCdDrive()
{
if (Helpers.CustomWithNoDVD(Template))
return; // we have skipped the install media page because we are a cutom template with no cd drive - the user doesnt want a cd drive
return; // we have skipped the install media page because we are a custom template with no cd drive - the user doesnt want a cd drive
Description = Messages.CREATE_CD_DRIVE;
VBD cd_drive = null;
@ -481,9 +462,10 @@ namespace XenAdmin.Actions.VMActions
private VBD CreateCdDrive()
{
List<string> devices = AllowedVBDs;
if (devices.Count == 0)
var devices = VM.get_allowed_VBD_devices(Session, VM.opaque_ref);
if (devices.Length == 0)
throw new Exception(Messages.NO_MORE_USERDEVICES);
VBD vbd = new VBD
{
bootable = _installMethod == InstallMethod.CD,
@ -510,7 +492,7 @@ namespace XenAdmin.Actions.VMActions
string suspendSr = null;
double progress = 70;
double step = 20.0 / (double)_disks.Count;
double step = 20.0 / _disks.Count;
foreach (DiskDescription disk in _disks)
{
VBD vbd = GetDiskVBD(disk, vbds);
@ -575,17 +557,16 @@ namespace XenAdmin.Actions.VMActions
{
string old_vdi_ref = vbd.VDI.opaque_ref;
RelatedTask = XenAPI.VDI.async_copy(Session, vbd.VDI.opaque_ref, disk.Disk.SR.opaque_ref);
RelatedTask = VDI.async_copy(Session, vbd.VDI.opaque_ref, disk.Disk.SR.opaque_ref);
PollToCompletion(progress, progress + 0.25 * step);
AddVMHint(Connection.WaitForCache(new XenRef<VDI>(Result)));
VDI new_vdi = Connection.Resolve(new XenRef<VDI>(Result));
RelatedTask = XenAPI.VBD.async_destroy(Session, vbd.opaque_ref);
RelatedTask = VBD.async_destroy(Session, vbd.opaque_ref);
PollToCompletion(progress + 0.25 * step, progress + 0.5 * step);
RelatedTask = XenAPI.VDI.async_destroy(Session, old_vdi_ref);
RelatedTask = VDI.async_destroy(Session, old_vdi_ref);
PollToCompletion(progress + 0.5 * step, progress + 0.75 * step);
CreateVbd(disk, new_vdi, progress + 0.75 * step, progress + step, IsDeviceAtPositionZero(disk));
@ -647,7 +628,7 @@ namespace XenAdmin.Actions.VMActions
vdi.virtual_size = disk.Disk.virtual_size;
vdi.sm_config = disk.Disk.sm_config;
RelatedTask = XenAPI.VDI.async_create(Session, vdi);
RelatedTask = VDI.async_create(Session, vdi);
PollToCompletion(progress1, progress2);
return Connection.WaitForCache(new XenRef<VDI>(Result));
}
@ -666,9 +647,10 @@ namespace XenAdmin.Actions.VMActions
/// <param name="bootable">Set VBD.bootable to this value - see comments above</param>
private void CreateVbd(DiskDescription disk, VDI vdi, double progress1, double progress2, bool bootable)
{
List<string> devices = AllowedVBDs;
if (devices.Count == 0)
var devices = VM.get_allowed_VBD_devices(Session, VM.opaque_ref);
if (devices.Length == 0)
throw new Exception(Messages.NO_MORE_USERDEVICES);
VBD vbd = new VBD();
vbd.SetIsOwner(true);
vbd.bootable = bootable;
@ -691,37 +673,38 @@ namespace XenAdmin.Actions.VMActions
double progress = 90;
VIF vif;
List<VIF> existingTemplateVifs = Connection.ResolveAll(VM.VIFs);
double step = 5.0 / (double)existingTemplateVifs.Count;
double step = 5.0 / existingTemplateVifs.Count;
for (int i = 0; i < existingTemplateVifs.Count; i++)
{
vif = existingTemplateVifs[i];
RelatedTask = XenAPI.VIF.async_destroy(Session, vif.opaque_ref);
RelatedTask = VIF.async_destroy(Session, vif.opaque_ref);
PollToCompletion(progress, progress + step);
progress += step;
}
// then we add the ones the user has specified
step = 5.0 / (double)_vifs.Count;
step = 5.0 / _vifs.Count;
for (int i = 0; i < _vifs.Count; i++)
{
vif = _vifs[i];
List<string> devices = AllowedVIFs;
VIF new_vif = new VIF();
var devices = VM.get_allowed_VIF_devices(Session, VM.opaque_ref);
if (devices.Count < 1)
if (devices.Length < 1)
{
// If we have assigned more VIFs than we have space for then don't try to create them
log.Warn("Tried to create more VIFs than the server allows. Ignoring remaining vifs");
return;
}
VIF new_vif = new VIF();
new_vif.device = devices.Contains(vif.device) ? vif.device : devices[0];
new_vif.MAC = vif.MAC;
new_vif.network = vif.network;
new_vif.VM = new XenRef<VM>(VM.opaque_ref);
new_vif.qos_algorithm_type = vif.qos_algorithm_type;
new_vif.qos_algorithm_params = vif.qos_algorithm_params;
RelatedTask = XenAPI.VIF.async_create(Session, new_vif);
RelatedTask = VIF.async_create(Session, new_vif);
PollToCompletion(progress, progress + step);
progress += step;
@ -730,10 +713,6 @@ namespace XenAdmin.Actions.VMActions
}
}
private List<string> AllowedVBDs => new List<String>(XenAPI.VM.get_allowed_VBD_devices(Session, VM.opaque_ref));
private List<string> AllowedVIFs => new List<String>(XenAPI.VM.get_allowed_VIF_devices(Session, VM.opaque_ref));
protected override void CleanOnError()
{
if (VM != null && !_pointOfNoReturn && Connection.IsConnected)

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>
@ -18466,29 +18466,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>
@ -6452,14 +6452,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} and greater versions. It cannot connect to {2}.

View File

@ -277,24 +277,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"))
@ -448,14 +430,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";
}
@ -1849,4 +1842,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;
}
}
}
}