Posts

Showing posts from March, 2019

VDI by Day, Compute by Night - XenServer

Tony Foster posted this article earlier today about running computer on unused GPUs at night and running VDI during the day on VMware.  I have been using a rudimentary batch script to do the same for XenServer for almost a year now, so I thought I'd formalize it with his inspiration! As always, I'm sure I stole some of this code from someone else, but I have no record of it at this point. The first step to any problem is to define the problem and the steps required to solve it... Problem: During the day our VDI instances use a P4-2Q profile and are spread across 3 hosts.  The off hours workload ideally would have a P4-8Q profile. For this solution we will aim to evacuate 2 hosts of all VDI workloads after hours and restore them before workers return in the morning.  There could be more logic here, including checking to make sure we don't see a spike in after hours usage and need to power down compute workloads to accommodate. Basic steps to solve: 1.) In order

Issues after forcibly shutting down a vGPU enabled Machine - Reset GPU on Xenserver

Image
Had an odd scenario today where a VM with vGPU enabled on XenServer became unresponsive and would not restart/shutdown, force shutdown/reset, or really do anything.  So I had to reference a handful of Citrix articles to remember how to force it, but then came to another issue that it didn't kill the GPU portion...  So here we go! First we have to kill the VM on XenServer: ( https://support.citrix.com/article/CTX220777  &  https://support.citrix.com/article/CTX215974 ) Disable High Availability (HA) so you don’t run into issues Log into the Xenserver host that is running your VM with issues via ssh or console via XenCenter Run the following command to list VMs and their UUIDs xe vm-list resident-on=<uuid_of_host> First you can try just the normal shutdown command with force xe vm-shutdown uuid=<UUID from step 3> force=true If that just hangs, use CONTROL+C to kill it off and try to reset the power state.  The force is required on this command xe vm-reset-powe