Posts

Horizon View with Unidesk Network Flows and Operations

One of my customers recently asked me a question about his VDI environment.  I had given him a copy of my View 5 network flows diagram , but he was curious about what those flows actually do during day to day operations.  This struck me as a pretty important question, as the diagram is useful by itself when planning a new deployment, but when troubleshooting a problem it doesn't really help you to know where to look.  So, I typed up some explanations of what the system is doing on the back end during some common front end operations.  Since that's useful info, I figured that I should probably post it here in case it can help anyone else. External User Connections The External View Client initiates the TCP 443 connection to the Security Server.  This connection is used until the user selects the desktop to which they want to connect After the user initiates the TCP 443 connection, the Security Server connects to the Connection Server The Connection S...

Shutdown vs. Power Off in vCloud Director vApps.

vCloud Director is a great tool, but I feel like some people aren’t always using it in the precise way that it was designed.  When you want to perform maintenance on a VM that vCD manages, you’re probably going to have to have that VM powered down.  So, what do you do?  You open your vApp, right click on your VM and select Power Off, right?  Well, I’ve seen a lot of people do just that, but it’s not really what I’d recommend.  Remember, Power Off is not Shutdown; it’s just going to perform a hard power off and your VM might have some issues after that. So, what do you do?  There’s no “Shutdown” option on that Right Click menu in vCD.  Since you want to keep your servers in tip-top shape, you open the VM console and then issue a command inside the guest OS (good ole “shutdown /s” anyone?).  The VM goes down gracefully and you can now manage it… but the vApp might be in an interesting state: “partially running” which can prevent you from changi...

Running PowerShell Scripts from Windows Task Scheduler

Sometimes, we write scripts that we want to schedule.  For example, I recently put together a small script that checks an environment for Snapshots that are older than 7 days and then emails the sys admins a report if it finds any.  Alan Renouf put together a quick guide on how to run PowerShell scripts with Windows Task Scheduler back in 2009, but I ran into a hiccup while trying to use that procedure the other day. Alan suggests two possible methods for accomplishing this task.  One involves editing your scripts to add the required PS Snapins and the other involves launching the PowerShell session from a pre-configured Console File.  I decided that I’d had enough of messing around with Add-PSSnapin, so I decided to experiment with the PowerShell Console option.  The example syntax that he provides is basically: Powershell.exe –PSConsoleFile myConsole.psc1 & myScript.ps1 Which didn’t exactly work for me.  When I executed this at a command li...

Network Troubleshooting Tools - How to Ping a Specific Port from Windows

How often do we, as system admins, find ourselves with a strange error that might be due to network connectivity?  Pretty often, in my experience.  While Ping is a great tool for validating basic routing, we live in a world of firewalls – be they physically on the network, virtually on the network, or software installed on the server.  When diagnosing network connectivity issues, Ping is not good enough, as that only tests the ICMP network flow.  You can’t ping a specific port in Windows, so if you’re looking to test something like HTTPS (TCP 443), with Ping you’re out of luck.  Fortunately, there are many other tools available. My favorite tool is PortQry  (that link will work as long as Microsoft graces us with a consistent URL… so until tomorrow, probably).  PortQry was originally a SysInternals tool (developed for Windows 2000!) and is still one of the best.  You’ll have to download it, but it’s a simple executable that you can invoke fro...

Unidesk 2.6 Upgrade Problem

One of my customers was upgrading their Unidesk environment to 2.6 and we ran into a problem.  It proved to be an incredibly specific problem and not at all tied to Unidesk (just tied to the way they push this particular upgrade), but the troubleshooting process was very interesting and so I think it's worth putting this knowledge out there. As part of the upgrade, the Unidesk Management Appliance needs to install an OVF of itself (which is an uncommon but not unprecedented behavior for virtual appliances).  That is the step that was failing.  The most common source of that failure is a firewall; if port 443 is blocked between the Management Appliance and the ESXi host, that deployment will fail.  We went round and round with the network team, checking firewalls and couldn’t find any records of ports being blocked, but we couldn’t communicate with the ESXi hosts (although we could communicate with the vCenter server just fine). Eventually, we did a TCPDump ...

Finding a VM with a Particular MAC Address

One of my customers was recently troubleshooting a network issue and had tracked it down to a single VMware MAC Address.  They tasked me with finding that VM that had that MAC address assigned, which is not a simple process through the GUI.  Fortunately, it's a very easy problem to solve with a script, and so PowerCLI to the rescue. All that I did with this script was get all of the VMs from vCenter, then loop through each one getting all of their NICs.  I then compared the MAC of that NIC against the MAC that the customer had identified, and we very swiftly had identified the problem VM. $MacOfInterest = "00:50:56:7b:00:00" $allVMs = Get-VM foreach ($thisVM in $allVMs) { foreach ($thisAdapter in ($thisVM | Get-NetworkAdapter)) { if ($thisAdapter.MacAddress -eq $MacOfInterest) { echo $thisVM.name } } }

VMware Horizon and RDSH Applications

One of the big new features of View 6 is the ability to use Terminal Server… err… I mean Remote Desktop Session Host RemoteApp applications .  As you’ve probably seen, the application presentation is pretty slick, behaving very much like natively installed applications even though they’re running on a server in the datacenter.  This allows for neat little tricks like launching Windows applications on an Android device.  In the demonstrations, this feature is just about always paired with Workspace 2.0, showing those RDSH applications in the Workspace 2.0 launchpad. It isn’t really clear from the marketing that’s going on, but RDSH application support is a View 6 feature, not a Workspace 2 feature.  When you want to present a RemoteApp, you must register the RDSH server in View and create an Application Pool.  From there, you can optionally tie it into Workspace or you can just launch it directly from the View Client – your choice.  So, how do you insta...