Virtu-Al

This user hasn't shared any biographical information


Posts by Virtu-Al

Dell ESXi Management

Unlike the traditional ESX software, the ESXi software does not have a service console. It helps reduce the installation footprint of the software and can allow the hypervisor to be directly installed on the system’s internal flash storage or a USB key.

At the moment I am investigating moving to ESXi from ESX, after resolving the DSET issue I was then faced with the management of the ESXi hosts, currently the full fat ESX hosts have the Dell open management agent installed on them and SNMP configured, this allows the Dell management server to keep track of the underlying hardware and report any hardware issues or firmware updates.

But what happens with ESXi 4.0 and the removal of the service console ?

Earlier with ESXi 3.5, OpenManage component were integrated with the downloadable Dell ESX3i ISO image
but from ESXi 4.0 onwards, VMware introduced a new concept called vSphere Installation Bundle (VIB), this allows the end users to download VIB files and install it directly into ESXi 4.0. Dell are now posting their OpenManage component as a VIB on support.dell.com.

To help reduce the system footprint and to simplify deployment, the ESXi software does not have a traditional service console management interface where Dell OpenManage agents are installed. Instead, to provide the required hardware manageability, VMware has incorporated the standard Common Information Model (CIM) management profiles into the ESXi software.

More >

Getting started with the Update Manager Cmdlets

Last night I needed to update some of my hosts with the latest patches that have been released recently, this gave me the ideal opportunity to look at the recently released VMware Update Manager cmdlets for PowerCLI.

For a full list of cmdlets or to download click here.

Whilst upgrading one of my hosts I shot a short video which will take you through some of the basics like:

  • Adding a baseline to a host
  • Scanning the host
  • Listing the patches which will be applied
  • Remediating a host

When watching the video don’t think about how you can do this to a single host, keep in mind that this could be run against multiple hosts or added to the end of a configuration script to ensure your hosts are up to date with the latest security patches after being deployed. More >

Another reason to upgrade to ESXi

The reasons why not to upgrade to ESXi are getting less and less recently, I think I knocked the automated configuration on the head at the London VMUG with my recent presentation which can be seen here.

With the improved vSphere API’s and using PowerCLI we are slowly able to replace most of the things which used to be performed at the service console, a few of these can be read about here.

But what happens when PowerCLI can not help ?

At a recent engagement with a customer we pretty much got rid of all reasons why we couldn’t move to ESXi apart from one.

Being based on Dell hardware the customer needed to be able to send a detailed report on what the issue was with the physical host, the Dell readers amongst you will be familiar with a Dell System Extraction Tool (DSET), this is a utility which is run on the host (through the service console) which looks at the logs, the Dell management agents and the system to create a packaged hta file which can be sent to Dell, in our case the customer often found it very hard to get hardware components replaced unless a DSET was sent, if not impossible.

The obvious part of this statement was the fact that it ran in the service console, when checking the Dell documentation it was clearly stated that the DSET application was not supported in ESXi:

image

So when reading the above statement “The server can be rebooted to a supported Linux environment to use DSET” gave me an idea: Live-CD.

After searching for a while I managed to find a nice repository of Dell Live boot CD’s with various different versions of the Dell Open Manage Client already pre-installed, just booting from this CD not only enabled the web interface which you can normally view by accessing the https://<ip address>:1311 url but also allowed me to design a support mechanism where we could boot to a supported operating system via the live boot CD and copy the DSET app over to the box which runs and produces our hardware report for us.

This might sound simple but believe me, it was nearly a show stopper when moving to ESXi, I hope this post helps others in the same predicament this customer was in.

VMware Update Manager cmdlets

Way back beyond the time before PowerCLI was invented there was this app called the Virtual Infrastructure Toolkit, when you installed the VITK if you had Update manager installed you used to be able to install some beta cmdlets which worked with update manager, this was subsequently removed in future versions….. Until Now !

They are back from the dead and in the form of a separate download to the current PowerCLI installable.

Download and install them now !

The first thing you will need to check is what operating system you are installing these on, personally I did not check and ended up with an error when trying to install them on Windows 7 64bit so here is a list of the supported operating systems so you don’t make the same mistake: – OK I may have been using a modified version of PowerCLI – Apparently this does install on Win7 64bit, even if it isn’t in the supported list !

  • Windows Server 2008
  • Windows Vista
  • Windows XP Service Pack 2
  • Windows Server 2003 Service Pack 2

You will also need the following installed:

  • .NET 2.0 SP1
  • Windows PowerShell 1.0 or higher
  • VMware vSphere PowerCLI 4.0 Update 1

After installing, from the PowerCLI prompt we can see a list of the new cmdlets by using the Get-Command cmdlet as below:

Get-Command -PSSnapin VMware.VumAutomation

image

So we can see we have an extra 13 cmdlets, what do these do, well they do all the “Update Manager” type tasks you would expect to do, so now as well as deploying our hosts we can also make sure they are patched to the latest version before adding them into our cluster, all automated of course !

More >

PowerCLI: Technical Support Mode

Today Duncan over at yellow-bricks.com has started quite the conversation on technical support mode for ESXi or otherwise known as “unsupported mode”, check out his blog post and especially the comments here:  http://www.yellow-bricks.com/2010/03/01/disable-tech-support-on-esxi/

As always when I see a post my first thought is to PowerCLI, so how can it help in this instance, well apart from the obvious cmdlets which I mentioned in my earlier ESXi post, there are also a couple of one liners which can help us manage Technical Support mode.

To view all hosts and check to see if they have Technical Support mode enabled, use the following:

Get-VMHost | Where {$_.State -eq "Connected" -or $_.State -eq "Maintenance"} | Get-View | Where {$_.Summary.Config.Product.Name -match "i"} | Select Name, @{N="TechSuportModeEnabled";E={(Get-VMHost $_.Name | Get-VMHostAdvancedConfiguration -Name VMkernel.Boot.techSupportMode).Values}} | Out-GridView

image

To disable it on all ESXi hosts use the following:

Get-VMHost | Where {$_.State -eq "Connected" -or $_.State -eq "Maintenance"} | Get-View | Where {$_.Summary.Config.Product.Name -match "i"} | Get-VIObjectByVIView | Set-VMHostAdvancedConfiguration -Name VMkernel.Boot.techSupportMode -Value $false

And to enable it use the following:

Get-VMHost | Where {$_.State -eq "Connected" -or $_.State -eq "Maintenance"} | Get-View | Where {$_.Summary.Config.Product.Name -match "i"} | Get-VIObjectByVIView | Set-VMHostAdvancedConfiguration -Name VMkernel.Boot.techSupportMode -Value $true

Thanks to Duncan and his most excellent site for the constant source of script ideas ;)

London VMUG – My Presentation

Yesterday was a fantastic VMware user group, definitely my favourite one so far, lots of great content from some fantastic people and some real rockstars (I think that is the 2010 word for Guru’s) like Mike Laverick, Carter Shanklin (Carter USM), Stuart Radnidge and many many more.

I was privileged to open the show with a PowerCLI session, this is a pre-show session so wasn’t really part of the main VMUG, as such I was not expecting such a large crowd, if you came to the session then thanks very much, i thing there must have been around 40-45 people in there and I had a great time presenting this one.

We had a great mix of beginners to Pro’s and some great conversations about PowerCLI and what we could do to take the ESX install to the next level, one such example is in my script where we add an A host record to the DNS server as part of our deployment.

If you weren’t there or you would just like to re-live the presentation then please see below: More >

Virtualising XenApp – What’s the magic number ?

In the past I have virtualised a number of different applications and types of servers, among these have been several Citrix WinFrame/MetaFrame/Presentation Server or as it is currently known XenApp Servers.

Recently I have been asked about this on a number of occasions and the question is always the same:

How many users can you get on a Virtualised XenApp Server ?

That’s like saying how long is a piece of string ! – The answer to this question is the same to most IT related questions I get asked…. It depends !

To be able to give this subject the full attention that is needed I plan on creating a series of blog posts which will enable us to discuss the different configuration types and I will hopefully aid you in working out what your magic number is, how many users you can get on a virtual XenApp server.

The series of blog posts will probably change as I start to delve into the different subjects but all will eventually link from this post.

Introduction
Why Virtualise XenApp ?
Design Factors
•    Sizing
•    Citrix Desktops
•    Seamless Applications
•    Redundancy
•    Licensing
•    Cost Cutting
Testing
•    Strategy
•    Applications
•    Tweaking
Implementation
•    Templates
•    Deployment
Monitoring
Upgrade strategy

Hopefully this will help with some of the questions I have received recently, if there is anything missing which you would also like me to include then please do let me know via the comments of this post !

If you are also into podcasts then make sure you listen to the recent discussion I had with the Chinwagger himself – Mike Laverick, this can be found on his blog here.

Who created that VM ?

I was asked whilst on a customer site to work out who had created a VM, this is a common question in most environments where admin rights are the normal and creating a VM is as easy as creating a new word document.

After trawling through the logs for a couple of minutes I found the creator and told the customer, easy enough I guess but how could we make this easier ?

The answer to that question will be no surprise to most readers of this blog….. PowerCLI !

With a quick script and resolving the user account in AD, I was able to add a custom field to each VM letting me know who created the VM and when it was created, all displayed in the annotations of each VM as seen below:

image

Connect-VIServer MYVISERVER
# Uncomment the next line to test this script and tell you what it would do !
# $WhatIfPreference = $true
if (-not (Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue)) {
	Add-PSSnapin VMware.VimAutomation.Core
}
if (-not (Get-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue)) {
	Add-PSSnapin Quest.ActiveRoles.ADManagement
}

$VMs = Get-VM | Sort Name
$VM = $VMs | Select -First 1
If (-not $vm.CustomFields.ContainsKey("CreatedBy")) {
	Write-Host "Creating CreatedBy Custom field for all VM's"
	New-CustomAttribute -TargetType VirtualMachine -Name CreatedBy | Out-Null
}
If (-not $vm.CustomFields.ContainsKey("CreatedOn")) {
	Write-Host "Creating CreatedOn Custom field for all VM's"
	New-CustomAttribute -TargetType VirtualMachine -Name CreatedOn | Out-Null
}
Foreach ($VM in $VMs){
	If ($vm.CustomFields["CreatedBy"] -eq $null -or $vm.CustomFields["CreatedBy"] -eq ""){
		Write-Host "Finding creator for $vm"
		$Event = $VM | Get-VIEvent -Types Info | Where { $_.Gettype().Name -eq "VmBeingDeployedEvent" -or $_.Gettype().Name -eq "VmCreatedEvent" -or $_.Gettype().Name -eq "VmRegisteredEvent" -or $_.Gettype().Name -eq "VmClonedEvent"}
		If (($Event | Measure-Object).Count -eq 0){
			$User = "Unknown"
			$Created = "Unknown"
		} Else {
			If ($Event.Username -eq "" -or $Event.Username -eq $null) {
				$User = "Unknown"
			} Else {
				$User = (Get-QADUser -Identity $Event.Username).DisplayName
				if ($User -eq $null -or $User -eq ""){
					$User = $Event.Username
				}
				$Created = $Event.CreatedTime
			}
		}
		Write "Adding info to $($VM.Name)"
		Write-Host -ForegroundColor Yellow "CreatedBy $User"
		$VM | Set-CustomField -Name "CreatedBy" -Value $User | Out-Null
		Write-Host -ForegroundColor Yellow "CreatedOn $Created"
		$VM | Set-CustomField -Name "CreatedOn" -Value $Created | Out-Null
	}
}

The script is fairly straight forward, a few caveats are worth mentioning though:

  • This script uses the Quest AD cmdlets to resolve the username in AD, if you don’t have these installed then you can either install them or use the Microsoft AD cmdelts or I have a small function which will do the same thing, I previously used this here.
  • This may take a long time if the VM was created a long time ago as unfortunately the Get-VIEvent cmdlet does not have a way to start from the beginning of the events so I need to retrieve all events for that VM and then filter on them.
  • If the VM’s were removed from the virtual center and then re-added it will have the name of the person who re-imported or added the VM, not the original creator.

Once we have the information added to the VM’s we can of course do some cool reporting, like who created the VM’s:

Get-VM | Select Name -ExpandProperty CustomFields | Where {$_.key -eq "CreatedBy"} | Out-GridView

image

Or even who created the most VMs:

Get-VM | Select Name -ExpandProperty CustomFields | Where {$_.key -eq "CreatedBy"} | Group-Object | Select Count, Name | Sort Count -Descending |Out-GridView 

image

London VMware User Group – 25th Feb

I have been asked to do a session at the London VMUG on 25th February 2010, after my previous session where I took the attendees through a beginners introduction to PowerCLI, I think I will throw them straight in this time and show them how we can configure ESXi using PowerCLI.

ESXi is obviously a hot topic at the moment and the configuration of ESXi without the service console access is proving to be difficult for many users.  This session will take you through the configuration of a host from start to end showing you how easy it is and highlighting some of the scripts and cmdlets explained in my previous post.

image

 

As a bonus I will also be giving away a set of “VMware vSphere Pro Series Training Vol. 1: View, ThinApp, Nexus 1000V, and PowerCLI” videos during my session, with thanks to the great guys at TrainSignal, be sure to bring your questions along for a chance to win this great prize !

 

There will obviously be all the other great sessions which normally take place and there is even a rumour that an all powerful PowerCLI expert from the states will be descending from upon high to give us the latest and greatest automation information from VMware !

I am personally looking forward to a “Real life” session which my colleagues Jonathan Medd and Vic Milne will be delivering, this will be an interesting presentation on how they moved both datacenters and storage devices with (nearly) no downtime !

Also on my agenda will be the Enterprise Cloud presentation from vStu that is sure to be full of both useful information in a friendly and native Australian dialog and humour.

As always the details for the VMUG can be found on the forum here.

If you are looking to deploy ESXi and are having trouble performing or have had trouble performing a certain task then please do let me know via the comments of this post so I can be sure to include this. – It would also give you bonus points when in the running for the TrainSignal video :)

PowerCLI: Configured Maximums – Storage

With vSphere introduced some new maximum’s which we not only have to memorise for the exams but also have to keep in mind when designing and using your infrastructure.

In the back of your mind when adding a new host to a cluster you should always be thinking, how many hosts should be in this cluster ? or when adding another LUN to your clustered hosts, how many datastores should I have as a maximum before it starts impacting my performance and how many paths are supported ?

The answer to these questions (in my case anyway) is to use PowerCLI to check them :)

I will of course add these to the next version of vCheck so they are automatically checked for but in the meantime here are some quick one-liners to check your infrastructure against the configured maximums for storage, I will add more as I write them:

More >