mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CP-6137: Work in Console tab for vGPU (PR-1675)
# HG changeset patch # User Mihaela Stoica <Mihaela.Stoica@citrix.com> # Date 1384179387 0 # Mon Nov 11 14:16:27 2013 +0000 # Node ID 4c0609731471aec95b153843469b00811c123c0b # Parent 6e77f45144cb01c9eba99be74ad9ffd056eeb110 - show the message about connecting with RDP only if is pass-through - changed the current message to say "pass-through GPU" instead of "dedicated GPU" Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
efc21f74bb
commit
ac35aa22bd
@ -1363,8 +1363,8 @@ namespace XenAdmin.ConsoleView
|
|||||||
|
|
||||||
internal void ShowGpuWarningIfRequired()
|
internal void ShowGpuWarningIfRequired()
|
||||||
{
|
{
|
||||||
dedicatedGpuWarning.Visible = vncScreen != null && (vncScreen.UseVNC || string.IsNullOrEmpty(vncScreen.rdpIP)) &&
|
dedicatedGpuWarning.Visible = vncScreen != null && (vncScreen.UseVNC || string.IsNullOrEmpty(vncScreen.rdpIP)) &&
|
||||||
vncScreen.Source.HasVGPUs && vncScreen.Source.power_state == vm_power_state.Running;
|
vncScreen.Source.HasGPUPassthrough && vncScreen.Source.power_state == vm_power_state.Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
|
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
|
||||||
<value>This VM has a dedicated GPU assigned. You must connect to it using Remote Desktop.</value>
|
<value>This VM has a pass-through GPU assigned. You must connect to it using Remote Desktop.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||||
<value>MiddleCenter</value>
|
<value>MiddleCenter</value>
|
||||||
|
14
XenModel/XenAPI-Extensions/VGPU.cs
Normal file
14
XenModel/XenAPI-Extensions/VGPU.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace XenAPI
|
||||||
|
{
|
||||||
|
partial class VGPU
|
||||||
|
{
|
||||||
|
public bool IsPassthrough
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var vGPUType = Connection.Resolve(type);
|
||||||
|
return vGPUType != null && vGPUType.max_heads == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1398,6 +1398,20 @@ namespace XenAPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasGPUPassthrough
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (VGPUs != null && VGPUs.Count > 0)
|
||||||
|
{
|
||||||
|
var vGPUs = Connection.ResolveAll(VGPUs);
|
||||||
|
return vGPUs.Any(vGPU => vGPU != null && vGPU.IsPassthrough);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual IEnumerable<SR> SRs
|
public virtual IEnumerable<SR> SRs
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -299,6 +299,7 @@
|
|||||||
<Compile Include="XenAPI-Extensions\Blob.cs" />
|
<Compile Include="XenAPI-Extensions\Blob.cs" />
|
||||||
<Compile Include="XenAPI-Extensions\GPU_group.cs" />
|
<Compile Include="XenAPI-Extensions\GPU_group.cs" />
|
||||||
<Compile Include="XenAPI-Extensions\PGPU.cs" />
|
<Compile Include="XenAPI-Extensions\PGPU.cs" />
|
||||||
|
<Compile Include="XenAPI-Extensions\VGPU.cs" />
|
||||||
<Compile Include="XenAPI-Extensions\VGPU_type.cs" />
|
<Compile Include="XenAPI-Extensions\VGPU_type.cs" />
|
||||||
<Compile Include="XenAPI-Extensions\VM_appliance.cs" />
|
<Compile Include="XenAPI-Extensions\VM_appliance.cs" />
|
||||||
<Compile Include="XenAPI-Extensions\vm_power_state.cs" />
|
<Compile Include="XenAPI-Extensions\vm_power_state.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user