mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-27 02:56:01 +01:00
CP-8120 Set cores per socket through XenCenter: Added 'Topology' field to the New VM Wizard.
- Text on CPU page - changed to include topology. - Summary page on the New VM Wizard – changed to include topology Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
17527eebe4
commit
8f1eb99e76
@ -181,7 +181,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
VMOperationCommand.WarningDialogHAInvalidConfig,
|
||||
VMOperationCommand.StartDiagnosisForm,
|
||||
vgpuCapability ? pageVgpu.GpuGroup : null,
|
||||
vgpuCapability ? pageVgpu.VgpuType : null);
|
||||
vgpuCapability ? pageVgpu.VgpuType : null,
|
||||
page_5_CpuMem.SelectedCoresPerSocket);
|
||||
Action.RunAsync();
|
||||
|
||||
base.FinishWizard();
|
||||
|
44
XenAdmin/Wizards/NewVMWizard/Page_CpuMem.Designer.cs
generated
44
XenAdmin/Wizards/NewVMWizard/Page_CpuMem.Designer.cs
generated
@ -38,9 +38,13 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
this.spinnerDynMin = new XenAdmin.Controls.Ballooning.MemorySpinner();
|
||||
this.spinnerDynMax = new XenAdmin.Controls.Ballooning.MemorySpinner();
|
||||
this.spinnerStatMax = new XenAdmin.Controls.Ballooning.MemorySpinner();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.comboBoxTopology = new XenAdmin.Controls.CPUTopologyComboBox();
|
||||
this.labelTopology = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.VcpuSpinner)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.ErrorPanel.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// VcpuSpinner
|
||||
@ -57,6 +61,7 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.label5, 3);
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
@ -81,38 +86,62 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
//
|
||||
// spinnerDynMin
|
||||
//
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.spinnerDynMin, 2);
|
||||
resources.ApplyResources(this.spinnerDynMin, "spinnerDynMin");
|
||||
this.spinnerDynMin.Name = "spinnerDynMin";
|
||||
this.spinnerDynMin.SpinnerValueChanged += new System.EventHandler(this.memory_ValueChanged);
|
||||
//
|
||||
// spinnerDynMax
|
||||
//
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.spinnerDynMax, 2);
|
||||
resources.ApplyResources(this.spinnerDynMax, "spinnerDynMax");
|
||||
this.spinnerDynMax.Name = "spinnerDynMax";
|
||||
this.spinnerDynMax.SpinnerValueChanged += new System.EventHandler(this.memory_ValueChanged);
|
||||
//
|
||||
// spinnerStatMax
|
||||
//
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.spinnerStatMax, 2);
|
||||
resources.ApplyResources(this.spinnerStatMax, "spinnerStatMax");
|
||||
this.spinnerStatMax.Name = "spinnerStatMax";
|
||||
this.spinnerStatMax.SpinnerValueChanged += new System.EventHandler(this.memory_ValueChanged);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.Controls.Add(this.comboBoxTopology, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelTopology, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.spinnerStatMax, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelVCPUs, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.spinnerDynMax, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.spinnerDynMin, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.VcpuSpinner, 1, 1);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// comboBoxTopology
|
||||
//
|
||||
this.comboBoxTopology.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
resources.ApplyResources(this.comboBoxTopology, "comboBoxTopology");
|
||||
this.comboBoxTopology.FormattingEnabled = true;
|
||||
this.comboBoxTopology.Name = "comboBoxTopology";
|
||||
//
|
||||
// labelTopology
|
||||
//
|
||||
resources.ApplyResources(this.labelTopology, "labelTopology");
|
||||
this.labelTopology.Name = "labelTopology";
|
||||
//
|
||||
// Page_CpuMem
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.Controls.Add(this.spinnerStatMax);
|
||||
this.Controls.Add(this.spinnerDynMax);
|
||||
this.Controls.Add(this.spinnerDynMin);
|
||||
this.Controls.Add(this.labelVCPUs);
|
||||
this.Controls.Add(this.VcpuSpinner);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.ErrorPanel);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Name = "Page_CpuMem";
|
||||
((System.ComponentModel.ISupportInitialize)(this.VcpuSpinner)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ErrorPanel.ResumeLayout(false);
|
||||
this.ErrorPanel.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -128,5 +157,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
private XenAdmin.Controls.Ballooning.MemorySpinner spinnerDynMin;
|
||||
private XenAdmin.Controls.Ballooning.MemorySpinner spinnerDynMax;
|
||||
private XenAdmin.Controls.Ballooning.MemorySpinner spinnerStatMax;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label labelTopology;
|
||||
private Controls.CPUTopologyComboBox comboBoxTopology;
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
spinnerStatMax.Visible = false;
|
||||
}
|
||||
|
||||
comboBoxTopology.Populate(Template.VCPUs_at_startup, Template.VCPUs_max, Template.CoresPerSocket, Template.MaxCoresPerSocket);
|
||||
|
||||
SetSpinnerLimits();
|
||||
|
||||
VcpuSpinner.Select();
|
||||
@ -203,12 +205,21 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
}
|
||||
}
|
||||
|
||||
public long SelectedCoresPerSocket
|
||||
{
|
||||
get
|
||||
{
|
||||
return comboBoxTopology.CoresPerSocket;
|
||||
}
|
||||
}
|
||||
|
||||
public override List<KeyValuePair<string, string>> PageSummary
|
||||
{
|
||||
get
|
||||
{
|
||||
List<KeyValuePair<string, string>> sum = new List<KeyValuePair<string, string>>();
|
||||
sum.Add(new KeyValuePair<string, string>(Messages.NEWVMWIZARD_CPUMEMPAGE_VCPUS, SelectedVcpus.ToString()));
|
||||
sum.Add(new KeyValuePair<string, string>(Messages.NEWVMWIZARD_CPUMEMPAGE_TOPOLOGY, comboBoxTopology.Text));
|
||||
if (memoryMode == 1)
|
||||
sum.Add(new KeyValuePair<string, string>(Messages.MEMORY, Util.MemorySizeString(SelectedMemoryStaticMax)));
|
||||
else
|
||||
@ -297,6 +308,7 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
|
||||
private void vCPU_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
comboBoxTopology.Update((long)(VcpuSpinner.Value));
|
||||
ValuesUpdated();
|
||||
}
|
||||
|
||||
|
@ -112,23 +112,26 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="VcpuSpinner.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>170, 42</value>
|
||||
<value>170, 43</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="VcpuSpinner.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 3, 0, 3</value>
|
||||
</data>
|
||||
<data name="VcpuSpinner.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 20</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="VcpuSpinner.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="VcpuSpinner.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
</data>
|
||||
@ -136,19 +139,19 @@
|
||||
<value>VcpuSpinner</value>
|
||||
</data>
|
||||
<data name=">>VcpuSpinner.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VcpuSpinner.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>VcpuSpinner.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="labelVCPUs.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 40</value>
|
||||
</data>
|
||||
<data name="labelVCPUs.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
<value>10, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="labelVCPUs.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>111, 25</value>
|
||||
@ -166,40 +169,205 @@
|
||||
<value>labelVCPUs</value>
|
||||
</data>
|
||||
<data name=">>labelVCPUs.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelVCPUs.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelVCPUs.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="comboBoxTopology.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="comboBoxTopology.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>170, 69</value>
|
||||
</data>
|
||||
<data name="comboBoxTopology.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 3, 0, 6</value>
|
||||
</data>
|
||||
<data name="comboBoxTopology.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>250, 21</value>
|
||||
</data>
|
||||
<data name="comboBoxTopology.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>comboBoxTopology.Name" xml:space="preserve">
|
||||
<value>comboBoxTopology</value>
|
||||
</data>
|
||||
<data name=">>comboBoxTopology.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.CPUTopologyComboBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>comboBoxTopology.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>comboBoxTopology.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelTopology.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelTopology.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 66</value>
|
||||
</data>
|
||||
<data name="labelTopology.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>10, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="labelTopology.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>111, 25</value>
|
||||
</data>
|
||||
<data name="labelTopology.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="labelTopology.Text" xml:space="preserve">
|
||||
<value>&Topology::</value>
|
||||
</data>
|
||||
<data name="labelTopology.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name=">>labelTopology.Name" xml:space="preserve">
|
||||
<value>labelTopology</value>
|
||||
</data>
|
||||
<data name=">>labelTopology.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=">>labelTopology.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelTopology.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 146</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 25</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.Name" xml:space="preserve">
|
||||
<value>spinnerStatMax</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.Ballooning.MemorySpinner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 121</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 25</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.Name" xml:space="preserve">
|
||||
<value>spinnerDynMax</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.Ballooning.MemorySpinner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 96</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 25</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.Name" xml:space="preserve">
|
||||
<value>spinnerDynMin</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.Ballooning.MemorySpinner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>515, 193</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.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=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="comboBoxTopology" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelTopology" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label5" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="spinnerStatMax" Row="5" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="labelVCPUs" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="spinnerDynMax" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="spinnerDynMin" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="VcpuSpinner" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Absolute,170,Percent,100" /><Rows Styles="AutoSize,50,AutoSize,50,AutoSize,0,AutoSize,20,AutoSize,20,AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="label5.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
<value>3, 0</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>466, 40</value>
|
||||
<value>509, 40</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Specify the number of virtual CPUs and the amount of memory that will be initially allocated to the new virtual machine.</value>
|
||||
<value>Specify the number of virtual CPUs, their topology and the amount of memory that will be initially allocated to the new virtual machine.</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="pictureBox1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -220,7 +388,7 @@
|
||||
<value>pictureBox1</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Parent" xml:space="preserve">
|
||||
<value>ErrorPanel</value>
|
||||
@ -238,7 +406,7 @@
|
||||
<value>25, 6</value>
|
||||
</data>
|
||||
<data name="ErrorLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>438, 113</value>
|
||||
<value>487, 106</value>
|
||||
</data>
|
||||
<data name="ErrorLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -247,7 +415,7 @@
|
||||
<value>ErrorLabel</value>
|
||||
</data>
|
||||
<data name=">>ErrorLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>ErrorLabel.Parent" xml:space="preserve">
|
||||
<value>ErrorPanel</value>
|
||||
@ -259,10 +427,10 @@
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="ErrorPanel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 150</value>
|
||||
<value>0, 193</value>
|
||||
</data>
|
||||
<data name="ErrorPanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>466, 119</value>
|
||||
<value>515, 112</value>
|
||||
</data>
|
||||
<data name="ErrorPanel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
@ -274,94 +442,22 @@
|
||||
<value>ErrorPanel</value>
|
||||
</data>
|
||||
<data name=">>ErrorPanel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>ErrorPanel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>ErrorPanel.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 65</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 25</value>
|
||||
</data>
|
||||
<data name="spinnerDynMin.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.Name" xml:space="preserve">
|
||||
<value>spinnerDynMin</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.Ballooning.MemorySpinner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMin.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 90</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 25</value>
|
||||
</data>
|
||||
<data name="spinnerDynMax.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.Name" xml:space="preserve">
|
||||
<value>spinnerDynMax</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.Ballooning.MemorySpinner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>spinnerDynMax.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 115</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 25</value>
|
||||
</data>
|
||||
<data name="spinnerStatMax.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.Name" xml:space="preserve">
|
||||
<value>spinnerStatMax</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.Ballooning.MemorySpinner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>spinnerStatMax.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.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>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>96, 96</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>466, 269</value>
|
||||
<value>515, 305</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>Page_CpuMem</value>
|
||||
|
@ -66,6 +66,7 @@ namespace XenAdmin.Actions.VMActions
|
||||
private readonly SR FullCopySR;
|
||||
private readonly GPU_group GpuGroup;
|
||||
private readonly VGPU_type VgpuType;
|
||||
private readonly long CoresPerSocket;
|
||||
|
||||
private Action<VMStartAbstractAction, Failure> _startDiagnosisForm;
|
||||
private Action<VM, bool> _warningDialogHAInvalidConfig;
|
||||
@ -101,7 +102,8 @@ namespace XenAdmin.Actions.VMActions
|
||||
"vbd.destroy",
|
||||
"vdi.copy",
|
||||
// Add networks
|
||||
"vif.create"
|
||||
"vif.create",
|
||||
"vm.set_platform"
|
||||
);
|
||||
|
||||
public CreateVMAction(IXenConnection connection, VM template, Host copyBiosStringsFrom,
|
||||
@ -111,7 +113,7 @@ namespace XenAdmin.Actions.VMActions
|
||||
List<DiskDescription> disks, SR fullCopySR, List<VIF> vifs, bool startAfter,
|
||||
Action<VM, bool> warningDialogHAInvalidConfig,
|
||||
Action<VMStartAbstractAction, Failure> startDiagnosisForm,
|
||||
GPU_group gpuGroup, VGPU_type vgpuType)
|
||||
GPU_group gpuGroup, VGPU_type vgpuType, long coresPerSocket)
|
||||
: base(connection, string.Format(Messages.CREATE_VM, name),
|
||||
string.Format(Messages.CREATE_VM_FROM_TEMPLATE, name, Helpers.GetName(template)))
|
||||
{
|
||||
@ -136,6 +138,7 @@ namespace XenAdmin.Actions.VMActions
|
||||
_startDiagnosisForm = startDiagnosisForm;
|
||||
GpuGroup = gpuGroup;
|
||||
VgpuType = vgpuType;
|
||||
CoresPerSocket = coresPerSocket;
|
||||
|
||||
Pool pool_of_one = Helpers.GetPoolOfOne(Connection);
|
||||
if (HomeServer != null || pool_of_one != null) // otherwise we have no where to put the action
|
||||
@ -242,6 +245,13 @@ namespace XenAdmin.Actions.VMActions
|
||||
ChangeVCPUSettingsAction vcpuAction = new ChangeVCPUSettingsAction(VM, Vcpus);
|
||||
vcpuAction.RunExternal(Session);
|
||||
|
||||
// set cores-per-socket
|
||||
Dictionary<string, string> platform = VM.platform == null ?
|
||||
new Dictionary<string, string>() :
|
||||
new Dictionary<string, string>(VM.platform);
|
||||
platform["cores-per-socket"] = CoresPerSocket.ToString();
|
||||
VM.set_platform(Session, VM.opaque_ref, platform);
|
||||
|
||||
// Check these values have changed before setting them, as they are RBAC protected
|
||||
if (HomeServerChanged())
|
||||
XenAPI.VM.set_affinity(Session, VM.opaque_ref, HomeServer != null ? HomeServer.opaque_ref : Helper.NullOpaqueRef);
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -22159,6 +22159,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Topology.
|
||||
/// </summary>
|
||||
public static string NEWVMWIZARD_CPUMEMPAGE_TOPOLOGY {
|
||||
get {
|
||||
return ResourceManager.GetString("NEWVMWIZARD_CPUMEMPAGE_TOPOLOGY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to vCPUs.
|
||||
/// </summary>
|
||||
|
@ -7572,6 +7572,9 @@ You will not be able to start this VM without freeing some space on one of the s
|
||||
<data name="NEWVMWIZARD_CPUMEMPAGE_TITLE" xml:space="preserve">
|
||||
<value>Allocate processor and memory resources</value>
|
||||
</data>
|
||||
<data name="NEWVMWIZARD_CPUMEMPAGE_TOPOLOGY" xml:space="preserve">
|
||||
<value>Topology</value>
|
||||
</data>
|
||||
<data name="NEWVMWIZARD_CPUMEMPAGE_VCPUS" xml:space="preserve">
|
||||
<value>vCPUs</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user