VM Junkie

February 2, 2010

How to fix PCoIP VRAM issue with PowerShell, t5545 supports PCoIP now

Filed under: hp, powershell, thinclients, vdi, view, vmware — ermac318 @ 4:46 pm

Hi folks! Been a while, but I have a couple nifty tidbits here for you all:

A lot of folks have been having trouble with getting VMware View’s PCoIP to work in higher resolutions. This is caused by your Virtual Machine not having enough VRAM to power higher resolutions (since unlike RDP, PCoIP is using the “physical” video card of your Virtual Machine, as opposed to a virtual video device like RDP). There have been several workarounds:

  • Reset (not reboot) each VM once after it’s deployed. This is because when View clones your template, it fixes the VRAM issue but the VM is already powered on so the setting change won’t take effect until you restart the VM Monitor process. Reset does this. This was outlined in this XTRAVIRT KB article.
  • The better fix is to set your template’s VRAM properly. This is easier said than done, because there are bugs in the vSphere Client’s video settings dialog box that causes some settings (like the number of monitors) not to be written to the VMX file. So the only way to do this reliably has been to add the VM has an Individual Desktop in View Manager and have it do the settings properly. This was outlined at this That’s my View blog post.

That last one is obviously ideal, but it’s a pain and a waste of time to go through creating the pool. Even worse, if you made the mistake of building a pool out of the VM already, the View Manager prevents you from using the template VM as the source for an Individual Desktop!

So I wrote this PowerShell function that, when you feed it a VM object, will correctly set the VM to have enough Video RAM and display ports for 2 Monitors, each running at the max resolution of 1920×1200.

function Set-VRamSize ($vms)
	$vmviews = $vms | Get-View

    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec

    $line1 = New-Object VMware.Vim.optionvalue
    $line2 = New-Object VMware.Vim.optionvalue
    $line3 = New-Object VMware.Vim.optionvalue
    $line4 = New-Object VMware.Vim.optionvalue

    $vmConfigSpec.extraconfig += $line1
	$vmConfigSpec.extraconfig += $line2
	$vmConfigSpec.extraconfig += $line3
	$vmConfigSpec.extraconfig += $line4

	$deviceSpec = New-Object VMware.Vim.VirtualDeviceConfigSpec
	$videoCard = New-Object VMware.Vim.VirtualMachineVideoCard
	$videoCard.numDisplays = 2
	$videoCard.videoRamSizeInKB = 36000
	$videoCard.Key = 500
	$deviceSpec.device += $videoCard
	$deviceSpec.operation = "edit"

	$vmConfigSpec.deviceChange += $deviceSpec
	foreach($vm in $vmviews){

The script is also available on my Sky Drive.

In related news, the HP t5545 (along with a slew of other Linux-based Thin Clients) now supports PCoIP using the new client that you can download here.

Create a free website or blog at WordPress.com.