4 Steps to Find and Remove Orphaned Disks in VMware Vcenter

Disk space can seem like an ongoing battle in many virtual environments. In this post I’m going to be showing you one way of dealing with orphaned disks within VMWare’s Vcenter in order to free up any “lost” storage.

First off, what is an orphaned disk? Well it’s fairly simple, ever deleted a disk from a virtual machine (VM) and not removed it from the datastore? Well congratulations, you have just created an orphaned disk! Orphaned disks are not attached to any VM within the Vcenter environment. In most cases that means we don’t want the disk, however there may be exceptions so before you run ahead and delete everything check that your orphaned disks aren’t shall we say, applying for adoption!

Pre Requisites:

  • PowerGUI – Download Here
  • PowerGUI – VMWare PowerPack (Included with PowerGUI)
  • VMware vCenter

To search our environment for orphaned disks we will be using the PowerGUI Administrative Console. Open the console from the start menu. We will be using the VMWare PowerPack. In the navigation tree window on the left hand side if you don’t see a “VMWare” tree then we need to enable the PowerPack, if you do the skip the next section.

1 – Enable the VMWare PowerPack

In the PowerGUI administration console browse to “File” > and click “PowerPack Management” Click “Import” and browse to “C:\Program Files (x86)\PowerGUI\PowerPacks” Select “VMware.VIToolkit.powerpack” click “Open” that’s it! Close the PowerPack Management window.

2 – Connect PowerGUI to vCenter

Expand the “VMware” tree and select “Managed Hosts” On the right hand menu click “Add Managed Host…” you are presented with the parameter window, here enter the FQDN name (or IP Address) of your vCenter server. Configure your account details and click “OK”

Your newly added vCenter host appears in the managed window, highlight your host and from the actions pane click “Connect”

3 – Run the Report

In the Navigation Tree (left hand pane of PowerGUI) Under VMWare\DBest Practice Queries \Disk Queries select “Orphaned VMDK files. Depending on the size and perfomrance of your environment the query will take some time to complete. You will notice at least one esxconsole-<hashed Number>.vmdk DO NOT DELETE THESE FILES.PowerGUI and the VMware PowerPack

4. Remove the Disks

After you have verified that the orphaned disks are genuinely no longer required it’s time to reclaim that disk space.

You could do this via Powershell and PowerCLI or even using PowerGUI but for the purpose of this article we will fire up vCenter and navigate to our datastore. From the “Home” page click “Datastores” .

Open the datastore containing the orphaned .vmdk file you wish to remove. Browse the contents of the datastore by right-clicking the datastore and selecting “Browse Datastore…”

In the datastore browser window navigate to the correct disk and select it in the main window. Check the name carefully, now is not a good time to delete the wrong disk! Select the disk and clik the red X on the menu bar of the datastore browser. You will be promted to confirm your actions! Congratulations you just removed an orphaned disk, now on to the next!

 

 

 

 

 

 

PowerShell just got bigger!

If you are not familiar with PowerShell and its ability to simplify your working life then now is the time to harness the power of the command line. Like many windows admins I grew up using a GUI and until working for an ISP using mainly Linux and Cisco devices I’d only ever used the command line for automating a few tasks. Once you get through the pain of learning how to use the command line life just gets easier!

Too Much time in the shell can lead to unexpected outcomes!

 

PowerShell is clearly the future for Microsoft, the current version is V2 however V3 beta is already available and adds some really cool features that underline MS’s commitment to PowerShell moving forward.

If you have been using PowerShell for a while you may have heard of the Quest PowerShell commands and if you haven’t already used them now is the time to get involved!

The Quest commands allow for much simpler scripting tasks and have saved me hours in managing various environments.

Here is the blurb from Quest:

ActiveRoles Management Shell for Active Directory is a set of free, predefined commands for Windows PowerShell, the powerful command line and scripting language developed by Microsoft. These commands are designed to help administrators automate common, repetitive and bulk management tasks for Active Directory, such as creating, removing or updating objects in AD.

 

By using the ActiveRoles Management Shell for Active Directory to build your scripts, you can harness Quest ActiveRoles Server to leverage proven rules, roles, workflow and attestation features giving you a robust management option for Windows PowerShell and Active Directory.

Download the commands here

Lync Mobility Workloads Bitesize…

Welcome to the first of my bite-size sessions, over the comming weeks I will be breaking down various subjects into small concise dare I say bite size pieces, to kick us off I’m looking at Lync Mobility Workloads.

A quick read of the Lync Mobility guide will probably do little to inspire confidence in deploying Mobility in your organisation. the document requires careful reading and analysis to ensure your deployment goes smoothly.

One of the concepts many find particularly challenging are the workloads involved, so I  thought I’d discuss them here!

Sessions what’s all this talk about sessions!

The first challenge when planning for Mobility is well, mobility! The very fact that a mobile user may change networks from one wifi hot-spot to another or even flip to a 3G network mid conversation pose an extra challenge to ensuring traffic is handled appropriately. The answer is quite simple at some point during our design we need to track sessions by something other than an IP address. Enter cookie based persistence, by using cookie based persistence on the hardware load balancer (HLB) we can ensure that regardless which network the handset is participating with the session is recognised and handled appropriately.

(Note: if you have more than one Threat management Gateway (TMG)  or Front End(FE) Server you will need to use a HLB both externally before the TMG and Internally in front of the FE pool, using DNS load balancing for web services is not supported and publishing a FE Farm from TMG, even with cookie persistence, will result in a round robin load balancing to the FE’s)

Another key concept to understand is that the Mobile clients will hairpin traffic out of the environment and back in through the reverse proxy to the external web services on the FE pool. To enable this we need different FQDNs when accessing the internal website and external websites.

 

The routing for Mobility can be seen below:

Lync Mobility Workload

Diagnose Lync and OCS connectivity with the RUCT Tool

The guys over at Inside OCS have released an updated version of their great RUCT tool. I highly recommend you head over and check it out!

The new version now supports the Lync Mobile DNS records specifically:

  • Lyncdiscover.<domain.com>   (both CNAME or A record)
  • Lyncdiscoverinternal.<domain.com>  (both CNAME or A record)

 

The tool offers 4 primary features:

Easily Query Important DNS Records used by Microsoft Lync Server and OCS.   DNS queries for the following Lync and OCS records are issued:

  • All Lync and Communicator internal and external records used for automatic sign-in.
  • Lync sign-in records used for Lync Online (in Office 365).
  • Lync simple URL records used for Dial-In, Meetings, and Administration.
  • Home registrar location records used by Lync devices.
  • The automatic partner discovery record used in an Open Federation configuration.

Test Network Availability.

  • The hostname and port belonging to any matching DNS SRV record, or IP address belonging to an A record, can easily be tested for network connectivity.
  • A TCP connection is attempted for hostname’s and ports, and a ping is attempted for IP addresses.

Certificate Retrieval, Installation, and Export.

  • The tool can remotely retrieve X509 Certificate information on any Lync or OCS port that is secured using TLS (or SSL).  Certificate information returned includes the Common Name (CN), Subject Name, Issuer, Certificate Authority, Expiry Date, Creation Date, and Subject Alternative Names (SANs), and the complete certificate chain.
  • The remote certificate can also be installed locally or exported to a file.

Easily Retrieve Important Client-Side Troubleshooting Information.

  • Important client-side environment settings such as O/S version, 32-bit or 64-bit, current domain credentials, and Lync/Communicator sign-on settings are automatically retrieved and consolidated in one place.
  • Recent Lync and Communicator specific event log errors and warnings can be retrieved with one-click.

Definately one to add to your Swiss Lync Knife!

Lync MCITP Certification

Today I passed the second Microsoft Lync 2010 exam 070-665 and upgraded my MCTS to a MCITP (Microsoft Certified IT Professional) . I hadn’t used Lync since 2005 when it was known as Live Communications Server 2005 (LCS) , I missed the whole generation of of Office Communications Server (OCS) products and had to work hard to bridge the gap in my knowledge.

Those of you that have had the pleasure of using Lync will know what an amazing product LCS has grown up to be. LCS used to require allot of effort to enable federated services, OCS was better but hardware requirements were often off-putting and there were , rightly placed, concerns over its use as a mission critical voice platform. Lync 2010 has seen those concerns disappear, not only is the platform more scalable, it requires less hardware and provides a much better user interface. Microsoft have once excelled in creating a unified communications platform that integrates perfectly within any organisation.