XenServer Plugins Collection v6
When I talk to developers, my favorite questions to ask them are “How are you using your own product?” or “Have you ever used it in a production environment?”
experience, if the answer is “yes,” the final software is usually much better — it’s more useful, contains the right set of features, and it keeps the number of head-smacking-against-table moments to a minimum. You should be invested in your creation and be the biggest fan of your own tools.
That is the way we have designed Citrix Optimizer (and that’s how we know which features we want to add in the next iteration). And it’s also the way I designed the first release of XenServer plugins almost 6 years ago.
So, why do I keep coming back to a piece of code that is older than both of my kids put together? It’s because it makes my daily life easier and contains features that make me more productive. And two years after the last release, it’s time to release a new version. Today, I’m proud to introduce the XenServer Plugins Collection v6!
My XenServer plugins collection adds the most common operations I perform on virtual machines or XenServer hosts and makes them easily available through new context-menu options. These options include integration with some popular third-party tools (e.g. Putty or WinSCP for XS host), but also traditional Windows functionality (viewing an event viewer of a remote machine or opening an RDP connection).
Below is a list of features available in the latest version.
Universal functionality (any VM, host, pool or storage repository)
“Copy UUID to clipboard” — copy the UUID of the selected object to the clipboard. While today, this functionality is natively supported by XenCenter, at the time of original release of plugins, this was not possible. I decided to keep this option, as it allows you to copy the UUID from any currently opened tab (XenCenter itself requires right-click on UUID field on General tab).
- Disk Drives → C, D & E” – this option will open specific drive from selected virtual machine in Explorer.
- “Connect using… → RDP” – this option opens fullscreen RDP connection to selected virtual machine.
- “Connect using… → SSH” – this option opens SSH connection to selected virtual machine using Putty. Requires Putty.exe in plugins folder: “C:\Program Files(x86)\Citrix\XenCenter\Plugins\Citrix\ExtraTools\Scripts\putty.exe”
- “Connect using… → WinSCP” – this option connects to virtual machine using WinSCP (SFTP, SCP or FTP protocols). Requires WinSCP installation on machine running XenCenter.
- “Connect using… → HTTP” – this option opens default browser and connects using HTTP. It is not possible currently to specify port or custom URL – if you have a use case, please leave a comment.
- “Ping” — Ping selected virtual machine.
- “Services” — Opens remote Services.msc for selected virtual machine.
- “Event Viewer” — Opens remote Event Viewer for selected virtual machine.
- “SSH” – this option opens SSH connection to selected XenServer host using Putty. Requires Putty.exe in plugins folder: “C:\Program Files (x86)\Citrix\XenCenter\Plugins\Citrix\ExtraTools\Scripts\putty.exe”
- “WinSCP” – this option connects to XenServer host using WinSCP (SFTP, SCP or FTP protocols). Requires WinSCP installation on machine running XenCenter.
- “PowerShell” – this option will open PowerShell window and establish connection to remote XenServer host. This requires XenServer SDK installed on machine running XenCenter. When you select host that is not a pool master, current pool master is automatically selected.
New features in v6
If you have been using previous versions of XenServer plugins, you might recognize all or some of the previously described features. There are several new features in this release, most notably ability to hide/show objects in XenCenter and ability to automatically start selected virtual machines when host is booted up. All these new options are hidden under “Modify VM state” context menu.
Ability to hide/show objects in XenCenter — This option allows you to hide or show certain objects in XenCenter. This is usable either for background VMs that are automatically started, or for objects that you don’t want to see (e.g. CD/DVD drive storage repositories).
If you want to unhide these objects, you must first display them using “View → Hidden Objects” option.
Ability to automatically start virtual machines — This is one of the uncommon features of XenServer that I’m using in my home lab. My home servers don’t run constantly (my toddler is attracted to blinking lights and likes to play as a junior datacenter engineer). However, if I need to get remote access to my lab, I just to call my wife and tell her to turn on any of the servers. After boot, the XenServer host will automatically start the license server, domain controller, management server, and NetScaler RDP Gateway, which allows me to access the management server, from which I can start any other machines that I need.
These two new options have several requirements:
- Both options require installed XenServer PowerShell module on machine with XenCenter (part of XenServer SDK)
- Ability to auto-start VM requires pool configuration change to enable this feature (one time configuration change): xe pool-param-set uuid=<Pool_UUID> other-config:auto_poweron=true
- “Modify VM state → Hide VM in XenCenter” — Hide selected object from XenCenter.
- “Modify VM state → Show VM in XenCenter” — Show again hidden object from XenCenter.
- “Modify VM state → Enable auto-start of VM” — Automatically start selected virtual machine when XenServer host is started.
- “Modify VM state → Disable auto-start of VM” — Disable automatic start of selected virtual machine.
Installation is very simple — just extract the archive and run Install.cmd. This script needs to run elevated, and you can use it to upgrade an existing installation of plugins; just make sure that XenCenter is not running (all these and other prerequisites are included in the script).
There is only one configuration input that you need to select during installation — how you want to handle name/IP translations when passing selected objects to script. There are three options available (hybrid is new in this release):
1) By IP — Retrieve the IP address of selected virtual machine or XenServer host and pass it to selected context menu. For example, “Ping” plugin will receive address in format “192.168.1.10”, resulting in “Ping 192.168.1.10”. This is useful if VM names are not same as hostnames.
2) By Name — Use name of selected virtual machine or XenServer host and pass it to script. For example, “Ping” plugin will receive address in format “AD-001”, resulting in “Ping AD-001”. This requires that the virtual machine and XenServer host names are resolvable.
3) Hybrid — Combination of previous two methods. Name is used for virtual machines, but XenServer hosts are accessed through their IP addresses. Useful when virtual machines are using resolvable names, but XenServer hosts are not resolvable.
If possible, “By Name” or “Hybrid” mode is preferred, as these work with offline machines or in cases when XenTools is not installed or doesn’t report the correct IP address. This can also lead to complications if virtual machine/server has multiple network interfaces.
If you are using IP address resolution and your virtual machines have multiple network interfaces, you can modify script Shared\Resolve.cmd to define which IP address you want to use. This script contains RegEx definition of IP address that should be selected and you can customize it for your environment.
For WinSCP and Putty, you also need to download\install those external programs, as they’re not included in the installation.
After installation, plugins should be automatically loaded and available. If you want to confirm that plugins are successfully loaded, you can find details in XenCenter under Tools\Options\Plugins:
Of course, don’t download it until you will read our full disclaimer (download at the bottom):
This software application is provided to you “as is” with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.
Citrix TechBytes – Created by Citrix Experts, made for Citrix Technologists! Learn from passionate Citrix Experts and gain technical insights into the latest Citrix Technologies.