Archive for August, 2009

PowersHell – Add Licenses to vCenter

Tuesday, August 18th, 2009

Well, I have been working on how to do this for a couple of days (believe it or not). I find navigating the VI API/SDK a bit a struggle. In the end I google-wacked an obscure part of my powershell that was giving me troubles, and found this community thread:

http://communities.vmware.com/message/1301276

$si = Get-View ServiceInstance

$LicManRef=$si.Content.LicenseManager
$LicManView=Get-View $LicManRef

$license = New-Object VMware.Vim.LicenseManagerLicenseInfo
$license.LicenseKey = “YOUR LICENSE STRING HERE”
$license.EditionKey=”esxEnterprisePlus”
$LicManView.AddLicense($license.LicenseKey,$null)

I found out the editionkey value by using the QueryAssignedLicenses method which is part of LicenseManager. Anyway, I kinda got sidetracked by this – because what I really want to do is license an ESX host after its been added to the vCenter with the add-vmhost cmdlet. This should be a good start to working it out.

Some More PowerShell – Configuring an ESXi host – Sample PS1 file

Monday, August 17th, 2009

Well, last week I set myself the task of trying to do everything I would do with PowerShell that would I normally do the %post script on kickstart install of an ESX host. I’ve made quite a bit of progress mainly on my own, but occasionally with help from google. I discovered a couple of things. The main one being this. Whilst there is a method with ESX “Classic” to crated a second Service Console port for HA, there doesn’t seem to be a corresponding method with ESX4i. In ESX4i under-neath the enable VMotion tick-box, there’s also a tickbox for enabling a VMkernel port for management. It appears that there’s no method for carrying on this task for ESX4i.

The main reason for using PowerShell for this kind of post-configuration rides on a number of conditions:

  • Your using ESX4i instead of ESX “Classic”
  • You don’t have access to the new “Host Profiles” feature because you not a Enterprize+ customer

Anyway, below is my .ps1 file I use for configuring ESX4i… What I really struggle with in PowerShell is the whole get-view command, and navigating the API/SDK environment. Trying to find the right object and attributes using either the MOB (virtualcenter.corp.com/mob) or the online referrence (http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/index.html) is actually quite difficult if you a novice (like me). For example I was looking for a method to license an ESX host (although a cmd-let exists to add a host, you have to wrestle with the SDK to find the way to assign a license to an ESX host). I manage to find someone who had already worked out how to enable SW iSCSI on host, but I couldn’t get my script to set my IQN…

Anyway, for what its worth – here’s my post-configuration .ps1 file.

ConfigureESXi.ps1

Update 01:

You know what its like just as post to the internet you can’t do something – sods, law dictates you find the option you were looking for sometime. So I have found a method of setting the IQN. And it was dead easy… I added a variable to the ps1 file called - $swiscsiiqn = “iqn.2008-10.com.vi4book:$vmhost” and then call out the storageSystem to UpdateInternetScsiName.

$VMhost = "esx4.vi4book.com"
$iscsiHba = "vmhba34"
$swiscsiiqn = "iqn.2008-10.com.vi4book:$vmhost"
$h = Get-VMHost $VMhost

Foreach ($hostView in ( Get-View -VIObject $h))
{
$storageSystem = Get-View $hostView.configManager.storageSystem
$storageSystem.UpdateInternetScsiName($iscsihba,$swiscsiiqn)
}

Update 02: Added Firewall Configuration

Added to the .ps1 file a method for changing the firewall with:

Foreach ($hostView in ( Get-View -VIObject $h))
{
$firewallSystem = Get-View $hostView.configManager.firewallSystem
$firewallSystem.EnableRuleset("sshClient")
}

Update 03: Added Licensing Process to the Script…

$vmhost = "esx4.vi4book.com"
$targethostMoRef = (get-VMHost $vmhost  | get-view).MoRef
$si = Get-View ServiceInstance
$LicManRef=$si.Content.LicenseManager
$LicManView=Get-View $LicManRef
$licassman = Get-View $LicManView.LicenseAssignmentManager
$licassman.UpdateAssignedLicense($targethostMoRef.value,"YOUR LIC KEY","vSphere4 Enterprise Plus (1-12 cores per CPU")

Update 04: Added Configuring DPM to the Script…

$vmhost = "esx4.vi4book.com"
$login = "vmware_dpm_user"
$password = "password"
$hostview = get-vmhost $vmhost | % {Get-View $_.Id}
$IpmiInfo = New-Object Vmware.Vim.HostIpmiInfo
$IpmiInfo.BmcIpAddress = "192.168.3.204"
$IpmiInfo.BmcMacAddress = "00:16:35:37:F8:02"
$IpmiInfo.Login = $login
$IpmiInfo.Password = $password
$hostview.UpdateIpmi($IpmiInfo)

Update 05: Added Setting the Root password on ESXi Hosts & Creating Local User Accounts

You might notice that the connect-viserver -password field is missing. That’s because all cleanly “installed” or “factory reset” ESXi host default to having no password. So initially I authenticate without a password, and the first thing I do is set a password.

$esxhost = Connect-VIServer $vmhost -username root
Set-VMHostAccount -UserAccount root -password password
New-VMHostAccount -ID lavericm-admin -Password password -UserAccount

Update 06: Enable FT Logging on a VMkernel Port

This uses the data object virtualNicManager to set the VMKernal Port (vmk2) to be enabled for “FaultTolerenceLogging”

$FTlogging = New-VirtualPortGroup -VirtualSwitch $vs3 -Name FT-Logging
New-VMHostNetworkAdapter -PortGroup FT-Logging -VirtualSwitch $vs3 -IP $FTloggingIP -SubnetMask 255.255.255.0
$h = Get-VMHost $vmhost | Get-View -Property configManager
$nicManager = Get-View $h.configManager.virtualNicManager
$nicManager.SelectVnicForNicType("faultToleranceLogging", "vmk3")

Update 07: Enable “Management Traffic” on VMkernel Port for the HA Heartbeat

This uses the data object virtualNicManager to set the VMKernal Port (vmk2) to be enabled for “Management Traffic”

New-VMHostNetworkAdapter -PortGroup HA-Heartbeat -VirtualSwitch $vs3 -IP $HAheartbeatIP -SubnetMask 255.255.255.0
$h = Get-VMHost $vmhost | Get-View -Property configManager
$nicManager = Get-View $h.configManager.virtualNicManager
$nicManager.SelectVnicForNicType("management", "vmk2")

Has VMware lost its mojo?

Thursday, August 13th, 2009

Arghhhhhhhhhhhhhhhh!

There’s don’t seem be any shortage of berks and lazy journalist today, cooking up half-baked and ill-informed non-sense because they seem incapable of actually writing a story which contains real news. I mean come on. VMware has lost mojo? As if! I notice these pundits who write this sort of unmittagated claptrap – never remind us how utterly breft of innovotions/ideas companies like Microsoft are. With the huge release that is vSphere, VMware has more mojo than Austin Powers ever hand in his little finger…

http://www.infoworld.com/d/windows/has-vmware-lost-its-mojo-011

Come on a join the infoworld party telling Randall C. Kennedy how out of touch he is…

Why “Good Enough” is just not “Good Enough”…

Thursday, August 13th, 2009

Well, its on again. That old chestnut that just refuses to go away. Will MS sunset VMware? Will VMware become the next Novell? The tired old staple of many a blog post and pundit a like. You know why I get so tired of this argument?

Firstly, it’s so hampered by binary thinking. Yes, I know binary is important part of IT, but the problem with it is that stain can be felt on the way people in IT like to think. It’s Yes or No, its On or Off, its 1 or 0. It’s VMware or Microsoft. Thinking like this patently ignores any attempt at laterial thinking or business realities. Look at other aspects of IT where there is not just more than one vendors but a multitude. There is more than one OEM server vendor (Dell, HP, IBM), more than one storage vendor (NetApp, EMC, FalconStor, 3PAR, ad nauseum), more than one backup vendor (Symantec, Legato, CommVault). So why the hell can’t we have more than one virtualization vendor (VMware, MS, Citrix). Heck, some of us might actually think that more than one vendor is implicit GOOD thing – for both healthy competition and allowing customers to play one vendor against another. In the spirit of free-enterprise, I welcome the fact that VMware’s competitors products are maturing. My god, they started from such a low point, the only way is up.

What inspired this post was reading a blogpost on SearchServerVirtualization.com here:

http://searchservervirtualization.techtarget.com/news/article/0,289142,sid94_gci1364388,00.html

In the article – David Cappuccio, Research vice president, Gartner Research states that “Good enough’ always wins out in the long run.”. I’ve got news for David, he’s wrong. Dead wrong. More wronger than Gartner has been in a long time. Good enough will NOT do. I’ve had 16 years of experience of various products in IT, and tell you what I and the customer I work with, are sick to the back teeth of the “good enough” mentality that seems be riddle our industry. An industry where customers (essential business managers, who know jack about IT) select the “good enough” over the advice of their highly paid and experienced IT staffers. And you know what happens once they have selected the “good enough” solution, and then employed us to implement it? They scream out how useless it is and how its “just not good enough”.

[End Rant] My more consider point is this. If you buy a “just good enough” solution, it will always be that – “just good enough”. It will always fail and disappoint you. Until its replace with solution which actually works. What annoys me about this sort of “good enough” claptrap is that is so uninspired – rather than pushing outselves and our technology to moon, we should just settle for the horse cart – after all wasn’t that just “good enough”.

Finally, you must, must remember what is virtualization is – not matter how “commiditized” the Hypervisor becomes. This things RUNS your infrastructure. If it doesn’t work, you in the shit. And you good enough, won’t be good enough then.

Wee bit of VMware PowerShell – Standard vSwitches

Wednesday, August 12th, 2009

I’m kinda running my labs in hybrid environment – deliberately using ESX4 “Classic” on half of my boxes, and ESX4i on the rest. It means I can validate my experiences on both platforms and spot differences in configuration/behaviour. So, for the most part I’m still doing scripted installations with the UDA, and using esxcfg- commands in the %post to handle the networking.

(more…)

Sneaky Peak – NetApp Plug-in

Tuesday, August 11th, 2009

This afternoon (well my evening actually) I got a sneaky peak at NetApp’s new plug-in to vCenter dubbed the NetApp RCU 2.1. I was joined in the web-ex by fellow blogger Scott Lowe, and by Eric Forgette, the key architect/developer for RCU – in case you don’t RCU stands for Rapid Cloning Utility. Put simply the RCU leverages the functionality of a NetApp array to quickly duplicate VMs, with the strongest usage case being VDI of course. NetApp has been doing this sometime – and the early videos of them creating numerous VMs for VDI via script has gone down in youtube history… Anyway, that functionality of cloning is available to all NetApp customers free of charge, without the need to learn any fancy scripting. Let me give you a walking tour of the new RCU. Full details will be available when it is offically launched at VMworld this year.

(more…)

Mike’s Music: Gypsy Fire

Tuesday, August 11th, 2009

Let me introduce to some damn fine guitar playing. Stuart Carter-Smith and Ben Travers are Gypsy Fire – and describe themselves as a “An eclectic blend of Spanish, Latin and European acoustic Gypsy Jazz Guitar…” Stuart contacted me through my blog with a view to getting an airing. So I shuffled of to the website - http://www.iggf.co.uk and had a look see. Suitably impressed (put a finger picker like me to shame!), it was no brainer, as some folks say. Enjoy! More videos on their website, and you can follow the guys on their blog too.

http://gypsyfireuk.blogspot.com/

VMware to Acquire SpringSource (or was that MS?)

Tuesday, August 11th, 2009

One of my pals (DANIEL EASON) on twitter (that popular refuge for twits everywhere!) drew my attention to rather humourous tidbit of info. But before I share that with you, let me get you up to speed. VMware are to aquire a company called SpringSource. According to this bit of text which I shamelessly lifted from Steve Herrods blogpost, SpringSource began as:

“….the commercial development team leading the innovative Spring portfolio of open source projects, an effort focused on providing a simpler, lighter-weight alternative to the Java EE (J2EE) standard. Led by Rod Johnson (author, enterprise java authority, and SpringSource CEO), Spring has become the de facto standard programming model for modern enterprise Java, rich web, and enterprise integration applications. Over the last couple of years, SpringSource has expanded their purview across an even broader range of offerings, employing the thought leaders within the Apache Tomcat, Apache HTTP Server, Hyperic, Groovy and Grails open source communities.”

[Ed. Groovy? Who calls a IT product "Groovy". Ah, that would be web-developers for you..]

This acquistion froms a long line of other acquistions in the past from VMware, and the idea is for VMware to be able to offer the SpringSource environment as part of the VMware’s vApp/Cloud vision of the future. vApps which are available to vSphere4 customers, allow you to download entire suites of multi-tier applications and then power them on – in a shrinked wrapped way.

Anyway, down to what this blog post is actually about. Remember my pal on twitter? Well, he sent me this link from ComputerWorld.

Spring may be coming soon for Microsoft’s Azure

Go ahead and read it if you like. But I will summarise it here if you really can’t be arsed. It was written by Paul Krill on the 24.07.2009. So its not very old. In the article CEO of SpringSource (Rod Johnson) outlines how enthuiastic they are about partnering with Microsoft specifically cloud iniative called “Azure” (Ed. Geddit?Azure?, blue, blue skies, clouds float in blue skies…). To quote Rod/the article:

“We’re absolutely open to working with them… Personally, I’m interested in talking with them about Azure and the Spring Java story for Azure… I think Spring developers should definitely be able to interoperate with Microsoft technologies, and I think there’s a bunch of stuff that they’re doing in Azure that may be of interest to our community… Right now, there’s essentially no business relationship that we have [with Microsoft]. We’re talking…”

Relationship? Talking? Er, perhaps not now….

What are we to make of this? Has VMware scored a fantasic goal against M$, affectively kicking the ball between the open-legs of the goalkeeper of Microsoft? OR… does it say more about media savy world where every week there’s some lamed assed story of how companyB intend to buy/merge/partner with companyA. A world were CEOs of CompanyB make upbeat comments about “talking” with companyA only to wind-up working with CompanyC. I dare say that the CEO of SpringSource knew what he was saying was disingenious to say the least, but in the corporate culture he’d be strung up by the board by speculating about an acquisition that was under construction. Still its only weeks ago since the ComputerWorld. Perhaps VMware say this and thought, crickey we should buy “SpringSource” ASAP otherwise we will be left behind by Microsoft [I think not!]. This acquistion has probably been in the pipeline sometime before the ComputerWorld article.

Moral of the story. Don’t always believe what you read on the internet. Anyway, that means I need to disappear right now in a puff of my own logic…

WebEX on Backup Vendors – esXpress by PHD Technologies

Monday, August 10th, 2009

For the last couple of weeks I’ve been doing a couple of web-ex sessions with the 3rd party “virtual machine” only backup vendors – esXpress from PHD Technologies, Veeam Backup & Replication and VizionCore’s vRanger. I’ve yet to do the webex with VizionCore just yet – as everyone is pretty busy (including myself) preparing for this year VMworld 2009 in SanFran.

My plan after completing the webex phase is to download and use each of the big 3 vendor’s technologies and report back my findings. But I thought I would begin with “heads up” approach first, with quick webex session where I could see the various products demonstrated, and ask a few pertinent questions along the way. The kind of thing I had in mind was seeing how mature the various vendors technologies had become, what their future directions might be, and generally suss out where are we in the world of VM backup. I was also kind of inspired to do this research because of vSphere’s own vDR appliance – and the question of what this development might mean for the 3rd party VM backup companies.

My first webex was with PHD Technologies and their esXpress product.

http://www.phdvirtual.com/

I was chatting to Mike Luca. He’s got a great job title “Sr Complexity Simplifier”. I kinda like that, as that’s something I think I have to do every time I teach a VMware course. I have to make what might seem complicated, seem simple. Often my students tell me how easy everything is, to which I always respond tongue firmly in my cheek – “yes, that’s because you’ve got the best VMware instructor on the planet”. That’s always makes the guys laugh, hopefully without too much irony.

esXpress ships into formats – Professional & Enterprise. The nice thing about this that the two versions have no features lost between professional and enterprise. They are just away of bundling esXpress in different ways of different types of customers. I like this when vendors don’t hobble or remove features simply because you different SKU type. Instead the different SKU types merely reflect that businesses are of different sizes and requirements. It means you don’t end up buying an enterprise product for a small business just to get a particular feature you want. If only other software vendors took the same approach (he said without mentioning any names!). So Professional can backup 4 VMs concurrently, whereas Enterprise can do 16 VMs concurrently. At the moment, the esXpress product does have “agent” that is installed to the ESX “Service Console”. But Mike told me that ESX4i support is on their roadmap. esXpress does offer 24/7 based in the US. English only.

Increasingly the 3rd party vendors are offering de-duplication of backup data and the ability to back up the entire VM once, and then merely backup block changes after that. esXpress is no different in that respect, offering 25:1 de-duplication ratio. I asked Mike, whether he found customers concerned about the reliability of and scalability of de-duplication. Mike said most customers are happy with the benefits of de-duplication for archiving purposes, and that it was more production data (de-duplication of live data) that worried customers. The advantages of de-dupe for backup seems be such a compelling on, that no-one disputes its usage. My worry is if multiple backup reference the same data, and that data turns out to be incorrectly backed up or corrupted it does have knock on affect. However, it became clear that these algorithms have been in circulation for some time, and the verification by calculating long checksums is one that can be relied on. So that’s pretty much a standard. So I was keen to see what made esXpress different from a feature spec. What did stand out is how esXpress has its own method of triggering a backup on the fly without having to create a specific job for VM. Simply by including specific wildcards into the name of VM you can trigger a backup. For example:

[x0] in the VMs name indicates to exclude a VM from a backup
x22 indicates to backup a VM at 22:00hrs
xNOW] indicates to backup the VM immediately
[o1] [o2] indicates what order to backup VMs

Then we moved on to a product demo. All the vendors did this – and it allowed me to hit them with my top questions:

  • If a snapshot is not removed from a VM after a backup. What systems are there in place to resolve that? Is it logged and am I alerted
  • Do you communicate by vCenter exclusively to manage the backup and restore the VM?
  • How easy it is to restore an individual file from a backup set?
  • Do you use Microsoft VSS calls?
  • Do you support vSphere4?
  • What do you think about VMware’s request to ask Veeam not to support the free ESXi release?
Of course that last question was very political – and none of my vendors were particularly keen to be drawn about especially when it concerns a competitor. But generally, I would say none of the 3rd party vendors either within the backup field or elsewhere were especially impressed. True, it’s not VMware endorse or promote the use of APIs that are not fully certified. But most felt the situation could have been handled better. However, It seems pretty much for the course that most “partner” relationships involved inevitability some power imbalance, with one of the vendors humorously describing it times as akin to an “abused spouse” situation!
In esXpress if VMware snapshots are not removed after the backup – this does get logged and tracked/traced. In esXpress they do commit orphaned esXpress snapshots – additionally if you configure the snap-on-snap feature it will even clean up VCB ophaned snapshots as well – neat! The reason I raised this issue, is that it is THE most common compliant (regardless of vendor) of VM backups. Specifically, they can be cause by events outside the control of the backup solution – so you hear it of VCB, vDR and the 3rd parties. It does seem like orphaned snapshots from backups are something we are just going to have to live with. The question always then is – what does the vendor offer in terms of alarms, alerts, logging and remediation of the lost snapshots.
esXpress does use vCenter to locate the VM before a backup. But it seems like lot of the backup vendors, including esXpress have cottoned on to the fact that this represents a point of failure if the vCenter unavailable. So esXpress does support (like other backup vendors) the ability to restore a VM from the Service Console without a need their restore engine or vCenter. This really appeals to me, because I always like Plan B, and Plan C if Plan A doesn’t work out. Even if Plan B and C are undesirable. It’s comforting to know there is a fallback position.

Restoring individual files is relatively easy in esXpress. Of course where most 3rd party backup vendors shine is in complete backups and restores of a lost VM. But you must ask yourself how common is that? Except in extereme cases where a VM is riddled with a virus; an idiot powers of a VM and then choose “Delete from disks” OR you have lost entire VMFS volume, and you don’t have array snapshots – then the most common reason to trigger a restore process is individual file such as word or excel document has become bad, and needs replacing with the last good backup. Historically, 3rd party VM only backup vendors have struggled with this. This because there isn’t an easy way to open a VMDK file, navigate the disk contents, and then fire it back into the original VM. For the moment esXpress allows you to download the files you want to restore from a .zip file, and then copy this .zip file to the affected VM using Windows Shares – from which the .zip file can be extracted, and the files restored. It’s pretty neat in that respect – but it does mean some work for the operator at the end of the day.

As for vSphere4 support – since my webex, PHD technologies have announced they fully support vSphere4. In fact they have gone down the road of creating virtual appliance to assist in the backup and restore process. That’s sound erily familiar to VMware’s vDR, in fact some of my sources tell me – that it maybe that idea of vDR actually came from PHD Technologies in the first place…

It does seem that this approach is the way forward for the 3rd party backup vendors to make file-restores easier. Basically, the concept is that the backup appliance, can mount the VMDKs of the VM to start the backup process but also additionally, use this process to facilitate the restore of files – with restore data being re-assembled from de-duplication files to present back to the VM a virtual disk. The next thing that’s need a simple wizard in the VM which can be used to select files and their restore location. Anyway, you can see more this new esXpress virtual appliance below in this youtube video.

esXoress does support MS VSS. This important because historically VMware’s own File Synch driver hasn’t always performed will for certain types of systems. This one will take more research on my part, because it’s my understand that the VSS API is a particular rich and complicated one – and therefore how well it is implemented is going to vary from vendor to vendor. So it wasn’t something I could glean from a web-ex.
Well, that’s it for this quick overview on my webex with PHD Technologies. I will be writing up my webex with Veeam next. And once that is done I will do the same for VizionCore. Of course, the real work will begin after VMworld, when I will be download and evaluating the products for real.

More Demos/Videos

Monday, August 10th, 2009

Tonight I have been bizzy adding more videos to RTFM about vSphere4. Why tonight? Well, I live on a new development, what with the credit crunch, building work came to grinding halt. Anyway, with things appearing to becoming more liquid again (or is that a suckers rally, I hear you ask). There’s more work on site. The trouble is the sound of JCBs beep-beeping as they reverse or even bellowing “vehicle reversing” at me – would kind of intrude on my VMotion moments.

Last week, I setup in the bedroom at the back of the house because that is where it was quietest. Unfortunately, its also where the wifi signal is the least reliable. Get the picture. Talk about a rock and hard place! Anyway, I’ve been amusing myself with other stuff during the day, and doing the videos on the evening instead. It’s quiet by then, and doesn’t involve hauling my proverbial up and down the stairs.

So tonight I did videos on enabling VMotion, and fixing VMotion errors – and then headed off into DRS-land. I touch on EVC and DPM too. Videos are little bit ropey, as I only have 2 ESX host per cluster – so it was tricky to get it loaded right to trigger DRS recommendations. Also had couple of brain fart moments – once where I tried to create an error, and the error didn’t happen – and once when something should have worked and then didn’t. I tell ya, its a bit like Blue Peter sometimes in my life.

Don’t get that referrence? That’s because your not a Brit like me! I’ll explain Blue Peter is kids programme where they make stuff from gaffer tape and egg cartoons – spray it silver and call it a moon-station. The catchphrase is “here’s one I prepared earlier” which is used swiftly when an assidiously prepared demo goes the way of pear. Get the picture…?

Anyway, here’s one I prepared earlier… :-)

http://www.rtfm-ed.co.uk/?page_id=1442



Podcast

LinkedIn

If you want to add Mike Laverick on LinkedIn, click on this button:

Mike Laverick

Categories

My Pages

Archives

Other VMware Bloggers