-
PowerCLI-Man at VMworld Europe
Posted on October 5th, 2011 No commentsIf you are not already aware of the phenomenon that is PowerCLI-Man, well, where have you been? My sources tell me he may be making an appearance at VMworld Europe, so if you are not already going, I highly recommend you attend. In particular I would encourage you to attend VSP1882 or VSP1883 for your best chance to see him………
PowerCLI @ VMworld Europe from Alan Renouf on Vimeo.
-
Time for a change: Let’s go!
Posted on September 6th, 2011 1 commentI have really enjoyed my time at my current employer, there are some amazingly talented people who work / have worked there during the time I have spent there. However, for various reasons I have decided that it is time to move on and try something different by going freelance contracting. So while I work out my notice period I will be looking for a contract as my next opportunity.
Think about hiring me because of the following:
Achievements:
- VMware vExpert 2011
- Microsoft MVP for Windows PowerShell 2010 & 2011
- Co-author of the PowerCLI book (VMware VSphere PowerCLI Reference: Automating VSphere Administration)
Key Skills:
- VMware vSphere 4.1, 4.0 and ESX 3.5 – 4 years
- PowerShell / PowerCLI Scripting – 4 years
- Windows Server 2008 R2, 2008, 2003, 2000 and NT4(!) – 14 years
- Citrix XenApp 5.0, 4.5 and 4.0 – 3 years
- Active Directory and Exchange Migrations – 14 years
Highlight Projects:
- Virtualising Tier 1 Apps, including Citrix, Exchange, Sharepoint, Active Directory, SQL and SAP bringing significant cost savings and greater flexibility to the business.
- Automating virtualised environments with PowerCLI and PowerShell, saving time and money in operational costs.
- Moving virtualised environments to new datacentres with little or no downtime.
- Migrating through the versions of vSphere, from ESX 3.5 through ESXi 4.1.
- Implementing procedures around virtualisation to bring business benefits.
- Large scale P2V projects with subsequent big reductions in power, cooling and hardware requirements.
Certifications:
- VMware Certified Professional (VCP) 4.0 and 3.5
- Microsoft MCITP: Enterprise Administrator Windows Server 2008
- Microsoft MCSE – Windows 2003, 2000 and NT 4
- Citrix Certified Administrator (CCA) for Citrix XenApp5
So if you might be interested in taking me on for a contract based on these skills and experience, and the occasional ability to make people laugh, then you can contact me either via:
or
.
-
Download the PowerCLI 5.0 Poster
Posted on September 5th, 2011 No commentsThe PowerCLI team publish very handy reference posters that will sit nicely by your desk and usually release a new version to accompany each product release. vSphere 5 is no different and if you weren’t lucky enough to attend the recent VMworld and collect a tangible copy then you can now download one to print out yourself.
-
Using PowerCLI VIProperties and the VIProperty Module
Posted on August 18th, 2011 No commentsIn PowerShell it is possible to use custom properties for an object if the one you need does not exist by default – these are known as calculated properties.
For instance, in PowerCLI by default there is no ToolsVersion property for a VM, however we can create a calculated property named ToolsVersion and submit an expression to retrieve that data:
Get-VM TEST01 | Select-Object Name,@{Name="ToolsVersion";Expression={$_.ExtensionData.Config.Tools.ToolsVersion}}However, the ToolsVersion property does not persist after running this command, so if I now try:
Get-VM TEST01 | Select-Object Name,ToolsVersion
The ToolsVersion is not returned since PowerShell is not aware of that property. I would need to specify the expression again if I wanted to use it.
PowerCLI 4.1 introduced the new cmdlet New-VIProperty which allows you to create custom properties for an object. However, these properties will persist for the course of the current PowerShell session. Using the same example as above we can create a ToolsVersion property like this:
New-VIProperty -Name ToolsVersion -ObjectType VirtualMachine -ValueFromExtensionProperty 'config.tools.ToolsVersion’ -Force
So now I can run this query and this time I will get the results I was hoping for:
Get-VM TEST01 | Select-Object Name,ToolsVersion
The possibilities for using New-VIProperty are almost limitless. Luc Dekens has done a great job of collating a large set of community efforts of these on his VIProperties page . I have been using them a lot recently, either those already submitted, or creating my own, but was finding it frustrating copy / pasting each one in as and when required.
So instead I decided to put them all into a PowerShell module so that each of them would be potentially available at any time, simply by importing the module. A PowerShell module can be as simple as a collection of functions or scripts that are bundled up together and then imported to make them available for use.
I sent this to Luc, he thought it was a good idea too. So after tidying it up a bit, you can now download it from his site . Once downloaded and before unzipping the files, make sure to unblock the content before extracting it, otherwise you will have an issue when importing the module, dependent on your current PowerShell Execution policy:
Copy the extracted VIProperty folder to your PowerShell modules location – you can find this with:
$env:PSModulePath
Now you can make all of those VIProperties available by importing the module:
Import-Module -Name VIProperty
For instance I could combine some standard (Name, NumCPU) and custom properties (BootDelay,NumVirtualDisks) from the module in this query:
Get-VM Test01 | Select-Object Name,NumCPU,BootDelay,NumVirtualDisks
I highly recommend PowerCLI users check this out and please help make the module even more useful by submitting your own custom properties to Luc for inclusion.
-
Add Host to vCenter Fails With ‘The name “hostname” already exists.’
Posted on August 4th, 2011 No commentsRecently a colleague had an issue where they were unable to add a newly built ESXi 4.1 server to vCenter; it failed with the message ‘The name “hostname” already exists.’ However, at first glance in vCenter the hostname didn’t exist.
The vCenter vpxd log contained more info, an error below:
Found host with duplicate IP x.x.x.x: host-xxxxx
You can track down the hostname from the host-xxxxx info with PowerCLI
Get-VMHost | Where-Object {$_.id -eq 'HostSystem-host-xxxxx'} | Format-Table Name,IDOnce you have the hostname, track it down in the Host table in the vCenter database and examine the IP address recorded. In this case the IP address in the database did not match the IP address of the Management Network of the ESXi host in vCenter.
Turned out the host had been built from a DHCP address, given a static IP after being taken to a remote site, but not removed from vCenter before the IP change. Removing the host from vCenter and adding back in resolved the issue.
-
vSphere 5 vRAM Licensing: Working out what you will need
Posted on July 20th, 2011 No commentsThe release of vSphere 5 brings a new licensing model where existing CPU restrictions were removed and replaced with the concept of vRAM. This was a significant change and caused quite a kerfuffle during and after the launch event, to the extent that a lot of technology advancements were overshadowed. Full details of the new scheme are here.
OK, so there are already a ton of blog posts out there on this topic which cover the pros and cons of this change. A couple I found useful are below:
- Understanding vSphere Licensing – Barry Coombs
- vSphere Licensing – the good, the bad and the ugly – Ed Grigson
Initially I thought this licensing change might be a bit of a problem for us, but thought I would wait for the dust to settle and spend some time figuring out what the impact could be.
The day after the announcement there were already two PowerCLI solutions available to help calculate the impact:
I didn’t have much time to research these solutions too far before attending the London VMUG 2 days after the vSphere 5 launch. However, they were both showing that we would potentially need to increase our licensing significantly to be able to upgrade. Whilst at the VMUG I struggled to find anyone else in a similar scenario; most others seemed to be in one of the following two licensing positions:
- I’ve got enough, with some headroom to spare
- I haven’t quite got enough, so will either need to buy some more or upgrade some to Enterprise Plus
So this week I have spent some time properly researching the subject, during which time Luc has updated his function to split out the different license types and the below was also published:
A combination of the updated function from Luc, Alan’s script which produces a comprehensive HTML report and more time spent researching it has now confirmed that we are in the ‘I’ve got enough, with some headroom to spare’ camp, so a lot better position than I thought.
I am really pleased about this since it now means I can go back to focusing on the technology advancements rather than being concerned about whether it might be affordable or not.
PS When running Alan’s script watch out for a limit in the 32-bit version of PowerCLI which might trip you up.
-
PowerCLI: Exception of type ‘System.OutOfMemoryException’ was thrown
Posted on July 18th, 2011 1 commentWhen working with PowerCLI in a large environment and retrieving large amounts of data, particularly when using the Get-View cmdlet, you may receive the following error: Get-View Exception of type ‘System.OutOfMemoryException’ was thrown
Looking at the available memory on your system may cause you to wonder why you receive this error message. It may occur because you are running the 32-bit version of PowerCLI where the size of the heap is limited to 1.5 GB. Try running the same command or script on a 64-bit system, which should resolve the issue.
-
Save Time With PowerCLI, London VMUG July 2011
Posted on July 14th, 2011 1 commentThanks to everyone who came to my session today, always enjoy presenting here. Here are the slides:
Save Time With PowerCLIView more presentations from jonathanmedd -
Presenting at the July 2011 London VMUG
Posted on June 15th, 2011 2 commentsThe next London VMUG on 14th July 2011 is only a few weeks away and again looks like it will be a great event. This will be the second time it has been run as a full day event with split-track breakout sessions in the afternoon, so that there is more of a choice for those topics your are particularly interested in. There will also be a vCOPS focused lab and a Genius Bar staffed by VMware GSS to help deal with any issues you might bring along.
I have been very lucky to be asked to present one of the afternoon breakout sessions entitled ‘How to Save Your Time With PowerCLI’. I’ll be looking at some of the PowerCLI techniques you can use to become a more efficient and effective employee. I will also have a couple of copies of the PowerCLI book to give away
You can register for the event here.
Agenda
10:00 a.m. – 10:15 a.m. – Welcome, Alaric Davies, Chairman
10:15 a.m. – 11:00 a.m. – Cloudvision for the Virtualised Environment, John Peach, Arista Networks, Sention System Architect
11:00 a.m. – 11:45 a.m. – Private Cloud Management Made Simple, Martin Sajkowski, Embotics, EMEA Operations & Colin Jacks Senior Solutions Specialist
11:45 a.m. – 12:15 p.m. – Break in Sponsor Expo
12:15 p.m. – 13:00 p.m.– Double-Take by Vision Solutions – Christian Willis, Technical Director: Meeting the Availability Challenges of physical, Virtual and Geographically Dispersed Systems
13:00 p.m. – 14:00 p.m.– Lunch in Sponsor ExpoTrack 1
14:00 p.m. – 14:50 p.m. – vCOPS Advanced, Mark Stockham, VMware
15:00 p.m. – 15:50 p.m. – SRM Futures, Mike Laverick
16:00 p.m. – 16:50 p.m.- Cloud: Can You Compete? Mark CraddockTrack 2
14:00 p.m. – 14:50 p.m. – Thinking, Building & Scripting Globally, Julian Wood
15:00 p.m. – 15:50 p.m. – Managing IT as We Evolve to Cloud Computing, Colin Fernandez, VMware
16:00 p.m. – 16:50 p.m. – How to Save your Time With PowerCLI, Jonathan Medd17:00 p.m. – Close
17:00 p.m. – Onward Drinks at Pavilion End -
Issue Patching ESXi 4.1 U1 installed on USB / SD Media
Posted on June 6th, 2011 2 commentsWhilst attemping to install the Dell ESXi Agent and upgrade the ESXi revision on a new VMware host, I hit the following issue.
Dell Agent –
Error encountered:
Description - I/O Error (17) on file /var/tmp: [Errno 17] File exists: '/var/tmp'
Message - Unable to create, write or read a file as expected.I/O Error (17) on file /var/tmp: [Errno 17]
File exists: '/var/tmp'ESXi upgrade with Update Manager –
The host returns esxupdate error codes: 10. Check the Update Manager log files and esxupdate log files for more detailsTurns out the is a known issue with the scratch partition in ESXi 4.1 U1 when it is installed non-persitent storage, i.e. USB or SD card.
This issue is fixed in the latest firmware release for ESXi 4.1 U1 (381591), but obviously you need to be able to patch the system up to that level first. There are a couple of workaruonds mentioned in the article, but one not mentioned is that if you reboot the host the issue will go away temporarily, so allowing enough time for you to patch it up to the revision with the fix.
Luckily, on my way to work on the morning I had the issue, I had already heard it discussed on the Hands on Virtualization Podcast with Barry Coombs and Jonathan Franconi so was well prepared for the problem.
















