mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Merge pull request #3094 from xenserver/feature/vtpm
Merge feature/vtpm into master
This commit is contained in:
commit
f885be7e4d
@ -59,7 +59,7 @@ namespace XenAdmin.Commands
|
|||||||
vm.IsRealVm() &&
|
vm.IsRealVm() &&
|
||||||
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
|
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
|
||||||
Helpers.XapiEqualOrGreater_22_26_0(vm.Connection) &&
|
Helpers.XapiEqualOrGreater_22_26_0(vm.Connection) &&
|
||||||
vm.IsUEFIEnabled();
|
vm.IsHVM() && vm.IsDefaultBootModeUefi();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string GetCantRunReasonCore(IXenObject item)
|
protected override string GetCantRunReasonCore(IXenObject item)
|
||||||
@ -67,7 +67,7 @@ namespace XenAdmin.Commands
|
|||||||
if (item is VM vm &&
|
if (item is VM vm &&
|
||||||
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
|
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
|
||||||
Helpers.XapiEqualOrGreater_22_26_0(vm.Connection) &&
|
Helpers.XapiEqualOrGreater_22_26_0(vm.Connection) &&
|
||||||
!vm.IsUEFIEnabled())
|
!(vm.IsHVM() && vm.IsDefaultBootModeUefi()))
|
||||||
return Messages.COMMAND_VTPM_DISABLED_NON_UEFI;
|
return Messages.COMMAND_VTPM_DISABLED_NON_UEFI;
|
||||||
|
|
||||||
return base.GetCantRunReasonCore(item);
|
return base.GetCantRunReasonCore(item);
|
||||||
|
20
XenAdmin/Dialogs/VtpmManagementPage.Designer.cs
generated
20
XenAdmin/Dialogs/VtpmManagementPage.Designer.cs
generated
@ -43,6 +43,8 @@ namespace XenAdmin.Dialogs
|
|||||||
this.labelUniqueKey = new System.Windows.Forms.Label();
|
this.labelUniqueKey = new System.Windows.Forms.Label();
|
||||||
this.toolTipContainerRemove = new XenAdmin.Controls.ToolTipContainer();
|
this.toolTipContainerRemove = new XenAdmin.Controls.ToolTipContainer();
|
||||||
this.buttonRemove = new System.Windows.Forms.Button();
|
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.tableLayoutPanelBody.SuspendLayout();
|
||||||
this.groupBoxProperties.SuspendLayout();
|
this.groupBoxProperties.SuspendLayout();
|
||||||
this.tableLayoutPanel1.SuspendLayout();
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
@ -77,9 +79,11 @@ namespace XenAdmin.Dialogs
|
|||||||
//
|
//
|
||||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||||
this.tableLayoutPanel1.Controls.Add(this.labelProtectedKey, 0, 0);
|
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.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";
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
//
|
//
|
||||||
// labelProtectedKey
|
// labelProtectedKey
|
||||||
@ -117,6 +121,16 @@ namespace XenAdmin.Dialogs
|
|||||||
this.buttonRemove.UseVisualStyleBackColor = true;
|
this.buttonRemove.UseVisualStyleBackColor = true;
|
||||||
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
|
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
|
// VtpmManagementPage
|
||||||
//
|
//
|
||||||
this.BackColor = System.Drawing.Color.Transparent;
|
this.BackColor = System.Drawing.Color.Transparent;
|
||||||
@ -144,5 +158,7 @@ namespace XenAdmin.Dialogs
|
|||||||
private System.Windows.Forms.Label labelProtectedValue;
|
private System.Windows.Forms.Label labelProtectedValue;
|
||||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
private Controls.ToolTipContainer toolTipContainerRemove;
|
private Controls.ToolTipContainer toolTipContainerRemove;
|
||||||
|
private System.Windows.Forms.Label labelProtectedInfo;
|
||||||
|
private System.Windows.Forms.Label labelUniqueInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,11 +153,7 @@
|
|||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelProtectedKey.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="labelProtectedKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 5</value>
|
<value>3, 0</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>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="labelProtectedKey.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="labelProtectedKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>56, 13</value>
|
<value>56, 13</value>
|
||||||
@ -180,47 +176,17 @@
|
|||||||
<data name=">>labelProtectedKey.ZOrder" xml:space="preserve">
|
<data name=">>labelProtectedKey.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</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=">>labelUniqueValue.Name" xml:space="preserve">
|
|
||||||
<value>labelUniqueValue</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>labelUniqueValue.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanel1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>labelUniqueValue.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name="labelProtectedValue.AutoSize" type="System.Boolean, mscorlib">
|
<data name="labelProtectedValue.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelProtectedValue.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="labelProtectedValue.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
<value>61, 5</value>
|
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelProtectedValue.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
<data name="labelProtectedValue.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 5, 5, 5</value>
|
<value>65, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelProtectedValue.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="labelProtectedValue.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>102, 13</value>
|
<value>121, 13</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelProtectedValue.TabIndex" type="System.Int32, mscorlib">
|
<data name="labelProtectedValue.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@ -238,22 +204,50 @@
|
|||||||
<value>tableLayoutPanel1</value>
|
<value>tableLayoutPanel1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>labelProtectedValue.ZOrder" xml:space="preserve">
|
<data name=">>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=">>labelProtectedInfo.Name" xml:space="preserve">
|
||||||
|
<value>labelProtectedInfo</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelProtectedInfo.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanel1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>labelProtectedInfo.ZOrder" xml:space="preserve">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelUniqueKey.AutoSize" type="System.Boolean, mscorlib">
|
<data name="labelUniqueKey.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelUniqueKey.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="labelUniqueKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 28</value>
|
<value>3, 63</value>
|
||||||
</data>
|
|
||||||
<data name="labelUniqueKey.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>0, 5, 5, 5</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="labelUniqueKey.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="labelUniqueKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>44, 13</value>
|
<value>44, 13</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelUniqueKey.TabIndex" type="System.Int32, mscorlib">
|
<data name="labelUniqueKey.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelUniqueKey.Text" xml:space="preserve">
|
<data name="labelUniqueKey.Text" xml:space="preserve">
|
||||||
<value>Unique:</value>
|
<value>Unique:</value>
|
||||||
@ -270,20 +264,80 @@
|
|||||||
<data name=">>labelUniqueKey.ZOrder" xml:space="preserve">
|
<data name=">>labelUniqueKey.ZOrder" xml:space="preserve">
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
</data>
|
</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=">>labelUniqueValue.Name" xml:space="preserve">
|
||||||
|
<value>labelUniqueValue</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelUniqueValue.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanel1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelUniqueInfo.Name" xml:space="preserve">
|
||||||
|
<value>labelUniqueInfo</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelUniqueInfo.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanel1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>labelUniqueInfo.ZOrder" xml:space="preserve">
|
||||||
|
<value>5</value>
|
||||||
|
</data>
|
||||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 16</value>
|
<value>3, 19</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
<value>3, 0, 3, 0</value>
|
<value>3, 0, 3, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>393, 81</value>
|
<value>393, 138</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -301,7 +355,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelProtectedKey" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelUniqueValue" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelProtectedValue" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelUniqueKey" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,Percent,100" /></TableLayoutSettings></value>
|
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelProtectedKey" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelProtectedValue" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelProtectedInfo" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelUniqueKey" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelUniqueValue" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelUniqueInfo" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings></value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBoxProperties.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="groupBoxProperties.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
@ -309,8 +363,11 @@
|
|||||||
<data name="groupBoxProperties.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="groupBoxProperties.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 3</value>
|
<value>3, 3</value>
|
||||||
</data>
|
</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">
|
<data name="groupBoxProperties.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>399, 100</value>
|
<value>399, 160</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBoxProperties.TabIndex" type="System.Int32, mscorlib">
|
<data name="groupBoxProperties.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
|
@ -940,8 +940,28 @@ namespace XenAdmin.TabPages
|
|||||||
{
|
{
|
||||||
s.AddEntry(FriendlyName("VM.BootOrder"), HVMBootOrder(vm),
|
s.AddEntry(FriendlyName("VM.BootOrder"), HVMBootOrder(vm),
|
||||||
new PropertiesToolStripMenuItem(new VmEditStartupOptionsCommand(Program.MainWindow, vm)));
|
new PropertiesToolStripMenuItem(new VmEditStartupOptionsCommand(Program.MainWindow, vm)));
|
||||||
|
|
||||||
if (Helpers.NaplesOrGreater(vm.Connection))
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -1889,15 +1909,6 @@ namespace XenAdmin.TabPages
|
|||||||
return string.Join("\n", order.Select(c => new BootDevice(c).ToString()).ToArray());
|
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
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
112
XenAdmin/Wizards/BootModesControl.Designer.cs
generated
112
XenAdmin/Wizards/BootModesControl.Designer.cs
generated
@ -33,26 +33,30 @@ namespace XenAdmin.Wizards
|
|||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BootModesControl));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BootModesControl));
|
||||||
this.groupBoxBootMode = new System.Windows.Forms.GroupBox();
|
this.groupBoxBootMode = new System.Windows.Forms.GroupBox();
|
||||||
this.tableLayoutPanelBootMode = new System.Windows.Forms.TableLayoutPanel();
|
this.tableLayoutPanelBootMode = new System.Windows.Forms.TableLayoutPanel();
|
||||||
this.radioButtonUEFISecureBoot = new System.Windows.Forms.RadioButton();
|
|
||||||
this.radioButtonBIOSBoot = 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.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.tableVtpmWarning = new System.Windows.Forms.TableLayoutPanel();
|
||||||
this.labelTpm = new System.Windows.Forms.Label();
|
this.labelTpm = new System.Windows.Forms.Label();
|
||||||
this.imgTpm = new System.Windows.Forms.PictureBox();
|
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.groupBoxDevSecurity = new System.Windows.Forms.GroupBox();
|
||||||
this.checkBoxVtpm = new System.Windows.Forms.CheckBox();
|
this.checkBoxVtpm = new System.Windows.Forms.CheckBox();
|
||||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
this.tableBootModeWarning = new System.Windows.Forms.TableLayoutPanel();
|
|
||||||
this.groupBoxBootMode.SuspendLayout();
|
this.groupBoxBootMode.SuspendLayout();
|
||||||
this.tableLayoutPanelBootMode.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();
|
this.tableVtpmWarning.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.imgTpm)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.imgTpm)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.imgUnsupported)).BeginInit();
|
|
||||||
this.groupBoxDevSecurity.SuspendLayout();
|
this.groupBoxDevSecurity.SuspendLayout();
|
||||||
this.tableLayoutPanel1.SuspendLayout();
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
this.tableBootModeWarning.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupBoxBootMode
|
// groupBoxBootMode
|
||||||
@ -64,18 +68,18 @@ namespace XenAdmin.Wizards
|
|||||||
//
|
//
|
||||||
// tableLayoutPanelBootMode
|
// 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");
|
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";
|
this.tableLayoutPanelBootMode.Name = "tableLayoutPanelBootMode";
|
||||||
//
|
//
|
||||||
// radioButtonUEFISecureBoot
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.radioButtonUEFISecureBoot, "radioButtonUEFISecureBoot");
|
|
||||||
this.radioButtonUEFISecureBoot.Name = "radioButtonUEFISecureBoot";
|
|
||||||
this.radioButtonUEFISecureBoot.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// radioButtonBIOSBoot
|
// radioButtonBIOSBoot
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.radioButtonBIOSBoot, "radioButtonBIOSBoot");
|
resources.ApplyResources(this.radioButtonBIOSBoot, "radioButtonBIOSBoot");
|
||||||
@ -83,12 +87,55 @@ namespace XenAdmin.Wizards
|
|||||||
this.radioButtonBIOSBoot.UseVisualStyleBackColor = true;
|
this.radioButtonBIOSBoot.UseVisualStyleBackColor = true;
|
||||||
this.radioButtonBIOSBoot.CheckedChanged += new System.EventHandler(this.radioButtonBIOSBoot_CheckedChanged);
|
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
|
// radioButtonUEFIBoot
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.radioButtonUEFIBoot, "radioButtonUEFIBoot");
|
resources.ApplyResources(this.radioButtonUEFIBoot, "radioButtonUEFIBoot");
|
||||||
this.radioButtonUEFIBoot.Name = "radioButtonUEFIBoot";
|
this.radioButtonUEFIBoot.Name = "radioButtonUEFIBoot";
|
||||||
this.radioButtonUEFIBoot.UseVisualStyleBackColor = true;
|
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
|
// tableVtpmWarning
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tableVtpmWarning, "tableVtpmWarning");
|
resources.ApplyResources(this.tableVtpmWarning, "tableVtpmWarning");
|
||||||
@ -108,18 +155,6 @@ namespace XenAdmin.Wizards
|
|||||||
this.imgTpm.Name = "imgTpm";
|
this.imgTpm.Name = "imgTpm";
|
||||||
this.imgTpm.TabStop = false;
|
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
|
// groupBoxDevSecurity
|
||||||
//
|
//
|
||||||
this.groupBoxDevSecurity.Controls.Add(this.checkBoxVtpm);
|
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.groupBoxBootMode, 0, 0);
|
||||||
this.tableLayoutPanel1.Controls.Add(this.groupBoxDevSecurity, 0, 2);
|
this.tableLayoutPanel1.Controls.Add(this.groupBoxDevSecurity, 0, 2);
|
||||||
this.tableLayoutPanel1.Controls.Add(this.tableVtpmWarning, 0, 4);
|
this.tableLayoutPanel1.Controls.Add(this.tableVtpmWarning, 0, 4);
|
||||||
this.tableLayoutPanel1.Controls.Add(this.tableBootModeWarning, 0, 1);
|
|
||||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
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
|
// BootModesControl
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
@ -160,16 +187,16 @@ namespace XenAdmin.Wizards
|
|||||||
this.groupBoxBootMode.ResumeLayout(false);
|
this.groupBoxBootMode.ResumeLayout(false);
|
||||||
this.tableLayoutPanelBootMode.ResumeLayout(false);
|
this.tableLayoutPanelBootMode.ResumeLayout(false);
|
||||||
this.tableLayoutPanelBootMode.PerformLayout();
|
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.ResumeLayout(false);
|
||||||
this.tableVtpmWarning.PerformLayout();
|
this.tableVtpmWarning.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.imgTpm)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.imgTpm)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.imgUnsupported)).EndInit();
|
|
||||||
this.groupBoxDevSecurity.ResumeLayout(false);
|
this.groupBoxDevSecurity.ResumeLayout(false);
|
||||||
this.groupBoxDevSecurity.PerformLayout();
|
this.groupBoxDevSecurity.PerformLayout();
|
||||||
this.tableLayoutPanel1.ResumeLayout(false);
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
this.tableLayoutPanel1.PerformLayout();
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
this.tableBootModeWarning.ResumeLayout(false);
|
|
||||||
this.tableBootModeWarning.PerformLayout();
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -182,13 +209,16 @@ namespace XenAdmin.Wizards
|
|||||||
private System.Windows.Forms.RadioButton radioButtonBIOSBoot;
|
private System.Windows.Forms.RadioButton radioButtonBIOSBoot;
|
||||||
private System.Windows.Forms.RadioButton radioButtonUEFIBoot;
|
private System.Windows.Forms.RadioButton radioButtonUEFIBoot;
|
||||||
private System.Windows.Forms.TableLayoutPanel tableVtpmWarning;
|
private System.Windows.Forms.TableLayoutPanel tableVtpmWarning;
|
||||||
private System.Windows.Forms.PictureBox imgUnsupported;
|
private System.Windows.Forms.PictureBox imgUefi;
|
||||||
private System.Windows.Forms.Label labelUnsupported;
|
private System.Windows.Forms.Label labelBios;
|
||||||
private System.Windows.Forms.GroupBox groupBoxDevSecurity;
|
private System.Windows.Forms.GroupBox groupBoxDevSecurity;
|
||||||
private System.Windows.Forms.CheckBox checkBoxVtpm;
|
private System.Windows.Forms.CheckBox checkBoxVtpm;
|
||||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
private System.Windows.Forms.Label labelTpm;
|
private System.Windows.Forms.Label labelTpm;
|
||||||
private System.Windows.Forms.PictureBox imgTpm;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ using System.Windows.Forms;
|
|||||||
using XenAdmin.Core;
|
using XenAdmin.Core;
|
||||||
using XenAdmin.Network;
|
using XenAdmin.Network;
|
||||||
using XenAPI;
|
using XenAPI;
|
||||||
using BootMode = XenAdmin.Actions.VMActions.BootMode;
|
|
||||||
|
|
||||||
namespace XenAdmin.Wizards
|
namespace XenAdmin.Wizards
|
||||||
{
|
{
|
||||||
@ -42,6 +42,7 @@ namespace XenAdmin.Wizards
|
|||||||
{
|
{
|
||||||
private VM _templateVM;
|
private VM _templateVM;
|
||||||
private IXenConnection _connection;
|
private IXenConnection _connection;
|
||||||
|
private bool _poolHasCertificates;
|
||||||
|
|
||||||
public BootModesControl()
|
public BootModesControl()
|
||||||
{
|
{
|
||||||
@ -60,7 +61,11 @@ namespace XenAdmin.Wizards
|
|||||||
_templateVM = value;
|
_templateVM = value;
|
||||||
|
|
||||||
if (_templateVM != null)
|
if (_templateVM != null)
|
||||||
|
{
|
||||||
_connection = _templateVM.Connection;
|
_connection = _templateVM.Connection;
|
||||||
|
var pool = Helpers.GetPoolOfOne(_connection);
|
||||||
|
_poolHasCertificates = !string.IsNullOrEmpty(pool?.uefi_certificates);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
UpdateTpmControls();
|
UpdateTpmControls();
|
||||||
@ -78,17 +83,20 @@ namespace XenAdmin.Wizards
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_connection = value;
|
_connection = value;
|
||||||
|
var pool = Helpers.GetPoolOfOne(_connection);
|
||||||
|
_poolHasCertificates = !string.IsNullOrEmpty(pool?.uefi_certificates);
|
||||||
|
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
UpdateTpmControls();
|
UpdateTpmControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BootMode SelectedOption =>
|
public VmBootMode SelectedBootMode =>
|
||||||
radioButtonUEFISecureBoot.Checked
|
radioButtonUEFISecureBoot.Checked
|
||||||
? BootMode.UEFI_SECURE_BOOT
|
? VmBootMode.SecureUefi
|
||||||
: radioButtonUEFIBoot.Checked
|
: radioButtonUEFIBoot.Checked
|
||||||
? BootMode.UEFI_BOOT
|
? VmBootMode.Uefi
|
||||||
: BootMode.BIOS_BOOT;
|
: VmBootMode.Bios;
|
||||||
|
|
||||||
public bool AssignVtpm => !IsVtpmTemplate && checkBoxVtpm.Checked;
|
public bool AssignVtpm => !IsVtpmTemplate && checkBoxVtpm.Checked;
|
||||||
|
|
||||||
@ -101,50 +109,94 @@ namespace XenAdmin.Wizards
|
|||||||
radioButtonBIOSBoot.Checked = true;
|
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()
|
private void UpdateControls()
|
||||||
{
|
{
|
||||||
radioButtonBIOSBoot.Enabled = true;
|
UpdateBiosWarning(null);
|
||||||
|
UpdateUefiWarning(null);
|
||||||
|
UpdateSecureUefiWarning(null);
|
||||||
|
|
||||||
radioButtonUEFIBoot.Visible = !Helpers.FeatureForbidden(_connection, Host.UefiBootDisabled);
|
radioButtonUEFIBoot.Visible = !Helpers.FeatureForbidden(_connection, Host.UefiBootDisabled);
|
||||||
radioButtonUEFISecureBoot.Visible = !Helpers.FeatureForbidden(_connection, Host.UefiSecureBootDisabled);
|
radioButtonUEFISecureBoot.Visible = !Helpers.FeatureForbidden(_connection, Host.UefiSecureBootDisabled);
|
||||||
|
|
||||||
// ensure that a visible option is selected
|
if (_templateVM == null)
|
||||||
if (radioButtonUEFIBoot.Checked && !radioButtonUEFIBoot.Visible)
|
|
||||||
radioButtonBIOSBoot.Checked = true;
|
|
||||||
|
|
||||||
if (radioButtonUEFISecureBoot.Checked && !radioButtonUEFISecureBoot.Visible)
|
|
||||||
radioButtonBIOSBoot.Checked = true;
|
|
||||||
|
|
||||||
if (_templateVM != null)
|
|
||||||
{
|
{
|
||||||
radioButtonUEFIBoot.Enabled = _templateVM.CanSupportUEFIBoot();
|
radioButtonBIOSBoot.Enabled = radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = true;
|
||||||
radioButtonUEFISecureBoot.Enabled = _templateVM.CanSupportUEFISecureBoot();
|
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())
|
radioButtonBIOSBoot.Enabled = false;
|
||||||
radioButtonUEFISecureBoot.Checked = true;
|
UpdateBiosWarning(Messages.BOOT_MODE_UNSUPPORTED_WARNING);
|
||||||
else
|
|
||||||
radioButtonUEFIBoot.Checked = true;
|
|
||||||
|
|
||||||
if (!_templateVM.CanChangeBootMode() || IsVtpmTemplate)
|
|
||||||
radioButtonBIOSBoot.Enabled = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var secureBoot = _templateVM.GetSecureBootMode();
|
||||||
|
|
||||||
|
if (secureBoot == "true" || secureBoot == "auto" && _poolHasCertificates)
|
||||||
|
radioButtonUEFISecureBoot.Checked = true;
|
||||||
else
|
else
|
||||||
{
|
radioButtonUEFIBoot.Checked = true;
|
||||||
radioButtonBIOSBoot.Checked = true;
|
|
||||||
|
|
||||||
if (!_templateVM.CanChangeBootMode())
|
if (radioButtonUEFISecureBoot.Enabled && radioButtonUEFISecureBoot.Checked && !_poolHasCertificates)
|
||||||
radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = false;
|
UpdateSecureUefiWarning(Messages.GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES, false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
radioButtonBIOSBoot.Checked = true;
|
if (!_templateVM.CanChangeBootMode())
|
||||||
radioButtonUEFIBoot.Checked = false;
|
radioButtonUEFIBoot.Enabled = radioButtonUEFISecureBoot.Enabled = false;
|
||||||
radioButtonUEFISecureBoot.Checked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ShowTemplateWarning();
|
radioButtonBIOSBoot.Checked = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateTpmControls()
|
private void UpdateTpmControls()
|
||||||
@ -179,38 +231,6 @@ namespace XenAdmin.Wizards
|
|||||||
labelTpm.Visible = imgTpm.Visible = groupBoxDevSecurity.Visible && !checkBoxVtpm.Enabled && !checkBoxVtpm.Checked;
|
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)
|
public static bool ShowBootModeOptions(IXenConnection connection)
|
||||||
{
|
{
|
||||||
return Helpers.NaplesOrGreater(connection) &&
|
return Helpers.NaplesOrGreater(connection) &&
|
||||||
@ -221,5 +241,13 @@ namespace XenAdmin.Wizards
|
|||||||
{
|
{
|
||||||
UpdateTpmControls();
|
UpdateTpmControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void radioButtonUEFISecureBoot_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (radioButtonUEFISecureBoot.Checked && !_poolHasCertificates)
|
||||||
|
UpdateSecureUefiWarning(Messages.GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES, false);
|
||||||
|
else
|
||||||
|
UpdateSecureUefiWarning(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,149 +117,13 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name=">>tableLayoutPanelBootMode.Name" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanelBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tableLayoutPanelBootMode.Parent" xml:space="preserve">
|
|
||||||
<value>groupBoxBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings></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" />
|
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
|
<data name="tableLayoutPanelBootMode.ColumnCount" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name="groupBoxBootMode.Text" xml:space="preserve">
|
|
||||||
<value>Boot Mode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>groupBoxBootMode.Name" xml:space="preserve">
|
|
||||||
<value>groupBoxBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>groupBoxBootMode.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanel1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>groupBoxBootMode.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonUEFISecureBoot.Name" xml:space="preserve">
|
|
||||||
<value>radioButtonUEFISecureBoot</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>radioButtonUEFISecureBoot.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanelBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonBIOSBoot.Name" xml:space="preserve">
|
|
||||||
<value>radioButtonBIOSBoot</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>radioButtonBIOSBoot.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanelBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonBIOSBoot.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonUEFIBoot.Name" xml:space="preserve">
|
|
||||||
<value>radioButtonUEFIBoot</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>radioButtonUEFIBoot.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanelBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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">
|
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<value>459, 79</value>
|
<data name="radioButtonBIOSBoot.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
</data>
|
<value>Left</value>
|
||||||
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>tableLayoutPanelBootMode.Name" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanelBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tableLayoutPanelBootMode.Parent" xml:space="preserve">
|
|
||||||
<value>groupBoxBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
|
||||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings></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 &Secure Boot</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonUEFISecureBoot.Name" xml:space="preserve">
|
|
||||||
<value>radioButtonUEFISecureBoot</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>radioButtonUEFISecureBoot.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanelBootMode</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
|
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@ -267,6 +131,7 @@
|
|||||||
<data name="radioButtonBIOSBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
<data name="radioButtonBIOSBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
<value>NoControl</value>
|
<value>NoControl</value>
|
||||||
</data>
|
</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">
|
<data name="radioButtonBIOSBoot.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>6, 3</value>
|
<value>6, 3</value>
|
||||||
</data>
|
</data>
|
||||||
@ -289,8 +154,80 @@
|
|||||||
<value>tableLayoutPanelBootMode</value>
|
<value>tableLayoutPanelBootMode</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>radioButtonBIOSBoot.ZOrder" xml:space="preserve">
|
<data name=">>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=">>imgBios.Name" xml:space="preserve">
|
||||||
|
<value>imgBios</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>imgBios.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>imgBios.ZOrder" xml:space="preserve">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</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=">>labelBios.Name" xml:space="preserve">
|
||||||
|
<value>labelBios</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelBios.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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">
|
<data name="radioButtonUEFIBoot.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
@ -304,7 +241,7 @@
|
|||||||
<value>74, 17</value>
|
<value>74, 17</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
|
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
|
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
|
||||||
<value>&UEFI Boot</value>
|
<value>&UEFI Boot</value>
|
||||||
@ -319,7 +256,238 @@
|
|||||||
<value>tableLayoutPanelBootMode</value>
|
<value>tableLayoutPanelBootMode</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>radioButtonUEFIBoot.ZOrder" xml:space="preserve">
|
<data name=">>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=">>imgUefi.Name" xml:space="preserve">
|
||||||
|
<value>imgUefi</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>imgUefi.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelUefi.Name" xml:space="preserve">
|
||||||
|
<value>labelUefi</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelUefi.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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 &Secure Boot</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>radioButtonUEFISecureBoot.Name" xml:space="preserve">
|
||||||
|
<value>radioButtonUEFISecureBoot</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>radioButtonUEFISecureBoot.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>imgSecureUefi.Name" xml:space="preserve">
|
||||||
|
<value>imgSecureUefi</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>imgSecureUefi.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelSecureUefi.Name" xml:space="preserve">
|
||||||
|
<value>labelSecureUefi</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>labelSecureUefi.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>tableLayoutPanelBootMode.Name" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanelBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>tableLayoutPanelBootMode.Parent" xml:space="preserve">
|
||||||
|
<value>groupBoxBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||||
|
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="imgBios" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelBios" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="imgUefi" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelUefi" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="imgSecureUefi" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelSecureUefi" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /></TableLayoutSettings></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=">>groupBoxBootMode.Name" xml:space="preserve">
|
||||||
|
<value>groupBoxBootMode</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>groupBoxBootMode.Parent" xml:space="preserve">
|
||||||
|
<value>tableLayoutPanel1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>groupBoxBootMode.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableVtpmWarning.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
<data name="tableVtpmWarning.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>Top, Left, Right</value>
|
<value>Top, Left, Right</value>
|
||||||
@ -382,7 +550,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableVtpmWarning.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="tableVtpmWarning.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 197</value>
|
<value>3, 189</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableVtpmWarning.RowCount" type="System.Int32, mscorlib">
|
<data name="tableVtpmWarning.RowCount" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@ -391,7 +559,7 @@
|
|||||||
<value>465, 22</value>
|
<value>465, 22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableVtpmWarning.TabIndex" type="System.Int32, mscorlib">
|
<data name="tableVtpmWarning.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>3</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>tableVtpmWarning.Name" xml:space="preserve">
|
<data name=">>tableVtpmWarning.Name" xml:space="preserve">
|
||||||
<value>tableVtpmWarning</value>
|
<value>tableVtpmWarning</value>
|
||||||
@ -406,70 +574,7 @@
|
|||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableVtpmWarning.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
<data name="tableVtpmWarning.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelTpm" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="imgTpm" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelTpm" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="imgTpm" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,Absolute,22" /></TableLayoutSettings></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=">>labelUnsupported.Name" xml:space="preserve">
|
|
||||||
<value>labelUnsupported</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>labelUnsupported.Parent" xml:space="preserve">
|
|
||||||
<value>tableBootModeWarning</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>imgUnsupported.Name" xml:space="preserve">
|
|
||||||
<value>imgUnsupported</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>imgUnsupported.Parent" xml:space="preserve">
|
|
||||||
<value>tableBootModeWarning</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>imgUnsupported.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="checkBoxVtpm.AutoSize" type="System.Boolean, mscorlib">
|
<data name="checkBoxVtpm.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@ -502,7 +607,7 @@
|
|||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBoxDevSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="groupBoxDevSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 144</value>
|
<value>3, 136</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBoxDevSecurity.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
<data name="groupBoxDevSecurity.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
<value>3, 10, 3, 3</value>
|
<value>3, 10, 3, 3</value>
|
||||||
@ -514,7 +619,7 @@
|
|||||||
<value>465, 47</value>
|
<value>465, 47</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBoxDevSecurity.TabIndex" type="System.Int32, mscorlib">
|
<data name="groupBoxDevSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBoxDevSecurity.Text" xml:space="preserve">
|
<data name="groupBoxDevSecurity.Text" xml:space="preserve">
|
||||||
<value>Device Security</value>
|
<value>Device Security</value>
|
||||||
@ -534,45 +639,6 @@
|
|||||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</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=">>tableBootModeWarning.Name" xml:space="preserve">
|
|
||||||
<value>tableBootModeWarning</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tableBootModeWarning.Parent" xml:space="preserve">
|
|
||||||
<value>tableLayoutPanel1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>tableBootModeWarning.ZOrder" xml:space="preserve">
|
|
||||||
<value>3</value>
|
|
||||||
</data>
|
|
||||||
<data name="tableBootModeWarning.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
|
||||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="imgUnsupported" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelUnsupported" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="Percent,100" /></TableLayoutSettings></value>
|
|
||||||
</data>
|
|
||||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
@ -601,7 +667,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBoxBootMode" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="groupBoxDevSecurity" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableVtpmWarning" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableBootModeWarning" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,Absolute,30,AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings></value>
|
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBoxBootMode" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="groupBoxDevSecurity" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableVtpmWarning" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,Absolute,20,AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings></value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
using XenAdmin.Controls;
|
using XenAdmin.Controls;
|
||||||
using XenAdmin.Actions.VMActions;
|
using XenAPI;
|
||||||
|
|
||||||
namespace XenAdmin.Wizards.ImportWizard
|
namespace XenAdmin.Wizards.ImportWizard
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@ namespace XenAdmin.Wizards.ImportWizard
|
|||||||
|
|
||||||
#region Accessors
|
#region Accessors
|
||||||
|
|
||||||
public BootMode SelectedBootMode => bootModesControl1.SelectedOption;
|
public VmBootMode SelectedBootMode => bootModesControl1.SelectedBootMode;
|
||||||
|
|
||||||
public bool AssignVtpm => bootModesControl1.AssignVtpm;
|
public bool AssignVtpm => bootModesControl1.AssignVtpm;
|
||||||
|
|
||||||
@ -87,8 +87,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
|||||||
{
|
{
|
||||||
switch (SelectedBootMode)
|
switch (SelectedBootMode)
|
||||||
{
|
{
|
||||||
case BootMode.UEFI_BOOT:
|
case VmBootMode.Uefi:
|
||||||
case BootMode.UEFI_SECURE_BOOT:
|
case VmBootMode.SecureUefi:
|
||||||
return "firmware=uefi;";
|
return "firmware=uefi;";
|
||||||
default:
|
default:
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
@ -102,7 +102,7 @@ namespace XenAdmin.Wizards.ImportWizard
|
|||||||
{
|
{
|
||||||
switch (SelectedBootMode)
|
switch (SelectedBootMode)
|
||||||
{
|
{
|
||||||
case BootMode.UEFI_SECURE_BOOT:
|
case VmBootMode.SecureUefi:
|
||||||
return "secureboot=true;";
|
return "secureboot=true;";
|
||||||
default:
|
default:
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
@ -35,7 +35,6 @@ using System.Linq;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using XenAdmin.Actions;
|
using XenAdmin.Actions;
|
||||||
using XenAdmin.Actions.OvfActions;
|
using XenAdmin.Actions.OvfActions;
|
||||||
using XenAdmin.Actions.VMActions;
|
|
||||||
using XenAdmin.Commands;
|
using XenAdmin.Commands;
|
||||||
using XenAdmin.Controls;
|
using XenAdmin.Controls;
|
||||||
using XenAdmin.Core;
|
using XenAdmin.Core;
|
||||||
|
@ -38,7 +38,6 @@ using XenAdmin.Core;
|
|||||||
using XenCenterLib;
|
using XenCenterLib;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using BootMode = XenAdmin.Actions.VMActions.BootMode;
|
|
||||||
|
|
||||||
namespace XenAdmin.Wizards.NewVMWizard
|
namespace XenAdmin.Wizards.NewVMWizard
|
||||||
{
|
{
|
||||||
@ -59,9 +58,7 @@ namespace XenAdmin.Wizards.NewVMWizard
|
|||||||
|
|
||||||
public bool AssignVtpm => bootModesControl1.AssignVtpm;
|
public bool AssignVtpm => bootModesControl1.AssignVtpm;
|
||||||
|
|
||||||
public BootMode SelectedBootMode => SelectedTemplate.IsHVM()
|
public VmBootMode SelectedBootMode => bootModesControl1.SelectedBootMode;
|
||||||
? bootModesControl1.SelectedOption
|
|
||||||
: BootMode.NOT_AVAILABLE;
|
|
||||||
|
|
||||||
public InstallMethod SelectedInstallMethod
|
public InstallMethod SelectedInstallMethod
|
||||||
{
|
{
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Xml;
|
||||||
|
using XenAdmin.Core;
|
||||||
using XenAdmin.Network;
|
using XenAdmin.Network;
|
||||||
using XenAPI;
|
using XenAPI;
|
||||||
using XenAdmin.Core;
|
|
||||||
using System.Xml;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XenAdmin.Actions.VMActions
|
namespace XenAdmin.Actions.VMActions
|
||||||
@ -45,26 +46,6 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
Network
|
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
|
public class CreateVMAction : AsyncAction
|
||||||
{
|
{
|
||||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
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 string _pvArgs;
|
||||||
private readonly VDI _cd;
|
private readonly VDI _cd;
|
||||||
private readonly string _url;
|
private readonly string _url;
|
||||||
private readonly BootMode _bootMode;
|
private readonly VmBootMode _bootMode;
|
||||||
private readonly Host _homeServer;
|
private readonly Host _homeServer;
|
||||||
private readonly long _vcpusMax;
|
private readonly long _vcpusMax;
|
||||||
private readonly long _vcpusAtStartup;
|
private readonly long _vcpusAtStartup;
|
||||||
@ -134,7 +115,7 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
|
|
||||||
public CreateVMAction(IXenConnection connection, VM template, Host copyBiosStringsFrom,
|
public CreateVMAction(IXenConnection connection, VM template, Host copyBiosStringsFrom,
|
||||||
string name, string description, InstallMethod installMethod,
|
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,
|
long memoryDynamicMin, long memoryDynamicMax, long memoryStaticMax,
|
||||||
List<DiskDescription> disks, SR fullCopySR, List<VIF> vifs, bool startAfter,
|
List<DiskDescription> disks, SR fullCopySR, List<VIF> vifs, bool startAfter,
|
||||||
bool assignVtpm, Action<VM, bool> warningDialogHAInvalidConfig,
|
bool assignVtpm, Action<VM, bool> warningDialogHAInvalidConfig,
|
||||||
@ -321,7 +302,7 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
{
|
{
|
||||||
if (_copyBiosStringsFrom != null && Template.DefaultTemplate())
|
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()
|
private void SetVMParams()
|
||||||
{
|
{
|
||||||
Description = Messages.SETTING_VM_PROPERTIES;
|
Description = Messages.SETTING_VM_PROPERTIES;
|
||||||
XenAPI.VM.set_name_label(Session, VM.opaque_ref, _nameLabel);
|
VM.set_name_label(Session, VM.opaque_ref, _nameLabel);
|
||||||
XenAPI.VM.set_name_description(Session, VM.opaque_ref, _nameDescription);
|
VM.set_name_description(Session, VM.opaque_ref, _nameDescription);
|
||||||
ChangeVCPUSettingsAction vcpuAction = new ChangeVCPUSettingsAction(VM, _vcpusMax, _vcpusAtStartup);
|
ChangeVCPUSettingsAction vcpuAction = new ChangeVCPUSettingsAction(VM, _vcpusMax, _vcpusAtStartup);
|
||||||
vcpuAction.RunSync(Session);
|
vcpuAction.RunSync(Session);
|
||||||
|
|
||||||
@ -349,10 +330,10 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
|
|
||||||
// Check these values have changed before setting them, as they are RBAC protected
|
// Check these values have changed before setting them, as they are RBAC protected
|
||||||
if (HomeServerChanged())
|
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)
|
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()
|
private bool HomeServerChanged()
|
||||||
@ -371,35 +352,35 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
// boot from network
|
// boot from network
|
||||||
Dictionary<string, string> hvm_params = VM.HVM_boot_params;
|
Dictionary<string, string> hvm_params = VM.HVM_boot_params;
|
||||||
hvm_params["order"] = GetBootOrderNetworkFirst();
|
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)
|
else if (IsEli() && _installMethod == InstallMethod.Network)
|
||||||
{
|
{
|
||||||
Dictionary<string, string> other_config = VM.other_config;
|
Dictionary<string, string> other_config = VM.other_config;
|
||||||
string normal_url = IsRhel() ? NormalizeRepoUrlForRHEL(_url) : _url;
|
string normal_url = IsRhel() ? NormalizeRepoUrlForRHEL(_url) : _url;
|
||||||
other_config["install-repository"] = normal_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)
|
else if (IsEli() && _installMethod == InstallMethod.CD)
|
||||||
{
|
{
|
||||||
Dictionary<string, string> other_config = VM.other_config;
|
Dictionary<string, string> other_config = VM.other_config;
|
||||||
other_config["install-repository"] = "cdrom";
|
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())
|
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;
|
var hvmParams = VM.HVM_boot_params;
|
||||||
hvm_params["firmware"] = _bootMode != BootMode.BIOS_BOOT ? "uefi" : "bios";
|
hvmParams["firmware"] = _bootMode == VmBootMode.Bios ? "bios" : "uefi";
|
||||||
XenAPI.VM.set_HVM_boot_params(Session, VM.opaque_ref, hvm_params);
|
VM.set_HVM_boot_params(Session, VM.opaque_ref, hvmParams);
|
||||||
|
|
||||||
var platform = VM.platform;
|
var platform = VM.platform;
|
||||||
platform["secureboot"] = _bootMode == BootMode.UEFI_SECURE_BOOT ? "true" : "false";
|
platform["secureboot"] = _bootMode == VmBootMode.SecureUefi ? "true" : "false";
|
||||||
XenAPI.VM.set_platform(Session, VM.opaque_ref, platform);
|
VM.set_platform(Session, VM.opaque_ref, platform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +405,7 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
{
|
{
|
||||||
Description = Messages.PROVISIONING_VM;
|
Description = Messages.PROVISIONING_VM;
|
||||||
RewriteProvisionXML();
|
RewriteProvisionXML();
|
||||||
RelatedTask = XenAPI.VM.async_provision(Session, VM.opaque_ref);
|
RelatedTask = VM.async_provision(Session, VM.opaque_ref);
|
||||||
|
|
||||||
PollToCompletion(10, 60);
|
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
|
// 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;
|
Dictionary<string, string> other_config = VM.other_config;
|
||||||
other_config.Remove("disks");
|
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()
|
private void AddCdDrive()
|
||||||
{
|
{
|
||||||
if (Helpers.CustomWithNoDVD(Template))
|
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;
|
Description = Messages.CREATE_CD_DRIVE;
|
||||||
VBD cd_drive = null;
|
VBD cd_drive = null;
|
||||||
@ -481,9 +462,10 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
|
|
||||||
private VBD CreateCdDrive()
|
private VBD CreateCdDrive()
|
||||||
{
|
{
|
||||||
List<string> devices = AllowedVBDs;
|
var devices = VM.get_allowed_VBD_devices(Session, VM.opaque_ref);
|
||||||
if (devices.Count == 0)
|
if (devices.Length == 0)
|
||||||
throw new Exception(Messages.NO_MORE_USERDEVICES);
|
throw new Exception(Messages.NO_MORE_USERDEVICES);
|
||||||
|
|
||||||
VBD vbd = new VBD
|
VBD vbd = new VBD
|
||||||
{
|
{
|
||||||
bootable = _installMethod == InstallMethod.CD,
|
bootable = _installMethod == InstallMethod.CD,
|
||||||
@ -510,7 +492,7 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
string suspendSr = null;
|
string suspendSr = null;
|
||||||
|
|
||||||
double progress = 70;
|
double progress = 70;
|
||||||
double step = 20.0 / (double)_disks.Count;
|
double step = 20.0 / _disks.Count;
|
||||||
foreach (DiskDescription disk in _disks)
|
foreach (DiskDescription disk in _disks)
|
||||||
{
|
{
|
||||||
VBD vbd = GetDiskVBD(disk, vbds);
|
VBD vbd = GetDiskVBD(disk, vbds);
|
||||||
@ -575,17 +557,16 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
{
|
{
|
||||||
string old_vdi_ref = vbd.VDI.opaque_ref;
|
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);
|
PollToCompletion(progress, progress + 0.25 * step);
|
||||||
AddVMHint(Connection.WaitForCache(new XenRef<VDI>(Result)));
|
AddVMHint(Connection.WaitForCache(new XenRef<VDI>(Result)));
|
||||||
|
|
||||||
|
|
||||||
VDI new_vdi = Connection.Resolve(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);
|
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);
|
PollToCompletion(progress + 0.5 * step, progress + 0.75 * step);
|
||||||
|
|
||||||
CreateVbd(disk, new_vdi, progress + 0.75 * step, progress + step, IsDeviceAtPositionZero(disk));
|
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.virtual_size = disk.Disk.virtual_size;
|
||||||
vdi.sm_config = disk.Disk.sm_config;
|
vdi.sm_config = disk.Disk.sm_config;
|
||||||
|
|
||||||
RelatedTask = XenAPI.VDI.async_create(Session, vdi);
|
RelatedTask = VDI.async_create(Session, vdi);
|
||||||
PollToCompletion(progress1, progress2);
|
PollToCompletion(progress1, progress2);
|
||||||
return Connection.WaitForCache(new XenRef<VDI>(Result));
|
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>
|
/// <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)
|
private void CreateVbd(DiskDescription disk, VDI vdi, double progress1, double progress2, bool bootable)
|
||||||
{
|
{
|
||||||
List<string> devices = AllowedVBDs;
|
var devices = VM.get_allowed_VBD_devices(Session, VM.opaque_ref);
|
||||||
if (devices.Count == 0)
|
if (devices.Length == 0)
|
||||||
throw new Exception(Messages.NO_MORE_USERDEVICES);
|
throw new Exception(Messages.NO_MORE_USERDEVICES);
|
||||||
|
|
||||||
VBD vbd = new VBD();
|
VBD vbd = new VBD();
|
||||||
vbd.SetIsOwner(true);
|
vbd.SetIsOwner(true);
|
||||||
vbd.bootable = bootable;
|
vbd.bootable = bootable;
|
||||||
@ -691,37 +673,38 @@ namespace XenAdmin.Actions.VMActions
|
|||||||
double progress = 90;
|
double progress = 90;
|
||||||
VIF vif;
|
VIF vif;
|
||||||
List<VIF> existingTemplateVifs = Connection.ResolveAll(VM.VIFs);
|
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++)
|
for (int i = 0; i < existingTemplateVifs.Count; i++)
|
||||||
{
|
{
|
||||||
vif = existingTemplateVifs[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);
|
PollToCompletion(progress, progress + step);
|
||||||
progress += step;
|
progress += step;
|
||||||
}
|
}
|
||||||
|
|
||||||
// then we add the ones the user has specified
|
// 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++)
|
for (int i = 0; i < _vifs.Count; i++)
|
||||||
{
|
{
|
||||||
vif = _vifs[i];
|
vif = _vifs[i];
|
||||||
List<string> devices = AllowedVIFs;
|
var devices = VM.get_allowed_VIF_devices(Session, VM.opaque_ref);
|
||||||
VIF new_vif = new VIF();
|
|
||||||
|
|
||||||
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
|
// 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");
|
log.Warn("Tried to create more VIFs than the server allows. Ignoring remaining vifs");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VIF new_vif = new VIF();
|
||||||
new_vif.device = devices.Contains(vif.device) ? vif.device : devices[0];
|
new_vif.device = devices.Contains(vif.device) ? vif.device : devices[0];
|
||||||
new_vif.MAC = vif.MAC;
|
new_vif.MAC = vif.MAC;
|
||||||
new_vif.network = vif.network;
|
new_vif.network = vif.network;
|
||||||
new_vif.VM = new XenRef<VM>(VM.opaque_ref);
|
new_vif.VM = new XenRef<VM>(VM.opaque_ref);
|
||||||
new_vif.qos_algorithm_type = vif.qos_algorithm_type;
|
new_vif.qos_algorithm_type = vif.qos_algorithm_type;
|
||||||
new_vif.qos_algorithm_params = vif.qos_algorithm_params;
|
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);
|
PollToCompletion(progress, progress + step);
|
||||||
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()
|
protected override void CleanOnError()
|
||||||
{
|
{
|
||||||
if (VM != null && !_pointOfNoReturn && Connection.IsConnected)
|
if (VM != null && !_pointOfNoReturn && Connection.IsConnected)
|
||||||
|
42
XenModel/Messages.Designer.cs
generated
42
XenModel/Messages.Designer.cs
generated
@ -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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to BIOS strings copied.
|
/// Looks up a localized string similar to BIOS strings copied.
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Boot order: {0}.
|
/// Looks up a localized string similar to Boot order: {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -18466,29 +18466,11 @@ namespace XenAdmin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public static string GUEFI_BOOT_MODE_UNSUPPORTED_WARNING {
|
public static string GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("GUEFI_BOOT_MODE_UNSUPPORTED_WARNING", resourceCulture);
|
return ResourceManager.GetString("GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES", 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2204,9 +2204,6 @@ This is a potentially dangerous operation and is not allowed.</value>
|
|||||||
<data name="BIOS_BOOT" xml:space="preserve">
|
<data name="BIOS_BOOT" xml:space="preserve">
|
||||||
<value>BIOS Boot</value>
|
<value>BIOS Boot</value>
|
||||||
</data>
|
</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">
|
<data name="BIOS_STRINGS_COPIED" xml:space="preserve">
|
||||||
<value>BIOS strings copied</value>
|
<value>BIOS strings copied</value>
|
||||||
</data>
|
</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">
|
<data name="BOOT_MODE" xml:space="preserve">
|
||||||
<value>Boot Mode</value>
|
<value>Boot Mode</value>
|
||||||
</data>
|
</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">
|
<data name="BOOTORDER" xml:space="preserve">
|
||||||
<value>Boot order: {0}</value>
|
<value>Boot order: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
@ -6452,14 +6452,8 @@ Note: Any custom color selections will remain unchanged</value>
|
|||||||
<data name="GROUP_ROLES" xml:space="preserve">
|
<data name="GROUP_ROLES" xml:space="preserve">
|
||||||
<value>Group Roles</value>
|
<value>Group Roles</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GUEFI_BOOT_MODE_UNSUPPORTED_WARNING" xml:space="preserve">
|
<data name="GUEFI_SECUREBOOT_MODE_MISSING_CERTIFICATES" xml:space="preserve">
|
||||||
<value>The UEFI boot mode is not supported with the selected template.</value>
|
<value>UEFI certificates are missing from your system</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>
|
</data>
|
||||||
<data name="GUI_NOT_COMPATIBLE" xml:space="preserve">
|
<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}.
|
<value>This version of {0} can only connect to {1} and greater versions. It cannot connect to {2}.
|
||||||
|
@ -277,24 +277,6 @@ namespace XenAPI
|
|||||||
return IsRealVm() && !IsHVM() && !other_config.ContainsKey("pvcheckpass");
|
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()
|
public int GetVcpuWeight()
|
||||||
{
|
{
|
||||||
if (VCPUs_params != null && VCPUs_params.ContainsKey("weight"))
|
if (VCPUs_params != null && VCPUs_params.ContainsKey("weight"))
|
||||||
@ -448,14 +430,25 @@ namespace XenAPI
|
|||||||
return true;
|
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";
|
return GetRecommendationByField("supports-uefi") == "yes";
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanSupportUEFISecureBoot()
|
public bool SupportsSecureUefiBoot()
|
||||||
{
|
{
|
||||||
return GetRecommendationByField("supports-secure-boot") == "yes";
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user