Archive for the ‘VMWare’ Category

Free VMware training!!!

April 21, 2011 Leave a comment

Well . .some free training . . and no . . not VCDX or anything too exciting, but VMware have at least provided some online training / eBooks to help all those people who will soon need to transition to ESXi, from ESX (ESX of course will be end of lifed soon)

On blogs:

Great news for all VMware customers: the VMware Education Services team has just made available a new, FREE elearning course dedicated to ESXi , “Transition to ESXi Essentials”. The course is a self-paced three-hour online training that provides the knowledge necessary to make fundamental design decisions to successfully add VMware ESXi to a vSphere environment and to take advantage of all of the new features included in ESXi 4.1. The training is ideal for system administrators, consultants and engineers responsible for managing and supporting a vSphere environment.

More here . . .

Troubleshooting VMware issues with MindMaps

April 7, 2011 Leave a comment

The guys on VMTN have released a few new mindmaps to help with various bits of troubleshooting.
Initially, I thought, great, another flowchart . . but I run a few scenarios through my lab, thinking that instead of troubleshooting myself, I would simply follow the mind map and I was surprised at how well they cover the kind of problems we see both regularly on our various environments and also how well they cover issues that I regularly see on the VMware communities site.

Oddly, I had never spotted these before – but it seems there are a bunch available at

Below are the 4 that I figure are going to be most pertinent in current environments – a very hany tool indeed.

Mindmap – vSphere Troubleshooting Network Issues
Mindmap – vSphere Troubleshooting Management Issues
Mindmap – VMware Troubleshooting View Management Issues
Mindmap – VMware Update Manager Issues

What I really like about these is not simply that they produce a ‘flow chart’ for troubleshooting, but the fact that once you get to the lowest level on the mind map, there is a little infinity sign that you can click on – which takes you to a knowledge base article for each solution. this means that just about anyone, no matter what their level, can use these

Categories: VMWare Tags:

Installing VMware SDK with Visual Studio 2010 / Visual Studio 2010 Express – workaround

March 31, 2011 Leave a comment

This is just a quick workaround to get the installation done – nothing else (really a reminder to myself)

I have a project to provision VMs from a customised front-end,
I have created a C# tool – that integrates with SCCM as well as our various asset management tools and some scripting environments, to allow for a ‘1 button deployment’

Of course . . to be a true one button deployment, I’d like to be able to actually create a VM when using the same ‘Big Red Button’

Anyway, my development environment happens to be Visual Studio 2010 – so yes simple . . let’s get going, surely we just follow the setup guide provided at : – page 19

Well, that would work, except that the SDK kit has not yet gotten the relevant batch files for a Visual Studio 2010 installation.

The solution to get the installation working was to get a copy of the amended cmd from the VMWare communities:
and copy it to your .\sdk\samples\DotNet directory

Next, go to : Start Menu\Programs\Microsoft Visual Studio 2010\Visual Studio Tools and select Visual Studio Command Prompt (2010)

Now, make sure that you have the environmental variable VCINSTALLDIR set to point to your Visual Studio installation path (type ‘set’ to see your environmental variables)
I had to set it like this:

SET VSINSTALLDIR="c:\Program Files (x86)\Microsoft Visual Studio 10.0"

Finally, I had to run the installer.]
In my case, the SDK was at d:\VMWare\SDK\samples, so I ran:

D:\VMWare\SDK\samples\DotNet>genvimstubs2.cmd d:\VMWare\SDK\wsdl\vim25 Vim25Api stage Vim25Objects.cs . Vim25Service2005

Installation looks like this:

D:\VMWare\SDK\samples\DotNet>genvimstubs2.cmd d:\VMWare\SDK\wsdl\vim25 Vim25Api
stage Vim25Objects.cs . Vim25Service2005
Checking and Creating stage
The system cannot find the file specified.
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file ‘stage\Vim25Objects.cs’.
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version
Copyright (C) Microsoft Corporation. All rights reserved.
Serialization Assembly Name: Vim25Service2005.XmlSerializers, Version=, C
ulture=neutral, PublicKeyToken=null.
Generated serialization assembly for assembly D:\VMWare\SDK\samples\DotNet\vim25
service2005.dll –> ‘.\Vim25Service2005.XmlSerializers.dll’.
Optimizing generated stubs…
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

Stub generation Done.
ECHO is off.

From here you can continue using the instructions in the getting started guide above.

Categories: Scripting, VMWare Tags: ,

Upgrading ESXi without VUM

March 24, 2011 Leave a comment

It seems that VMWare are getting rid of VUM (I assume something new will be released soon to replace it), so more and more people are going to need to manage ESXi upgrades from the command line.
I suspect that the people that will be most affected by this are people running the free version of ESXi.

Anyway, here is a quick how to, for ESXi upgrades.

First enable ssh access to the ESXi4.0 box.

At the ESXi console:
1. alt-f1
2. Type unsupported (You will not see your typing)
3. root pw
4. vi /etc/inetd.conf
5. uncomment the 2 ssh lines, i.e delete the “#” preceding the ssh config lines (esc x to delete a character in vi)
6. :wq to save the changes in vi and quit the vi editor
7. restart (if necessary reboot the ESXi box if ssh still does not work)

If you are running ESX4.1, follow this guide to enable SSH access to ESXi4.1 Host
(again at the console)

1.Press F2 to Customize System Settings
2.Navigate to Troubleshooting Options
3.Select ‘Enable remote Tech support (SSH)

Note – you can also adjust the tech support timeout here – so you could limit how long tech support stays enabled for.

Next, you will need to download your upgrade bundle from VMWare –

You now have 2 Options,

Run the installation – Option 1 – from a webserver
If you are able to store the upgrade bundle on a webserver, you could do the following:
Place the file at the root directory of your web server.
I use Apache Tomcat 7.0 on Windows XP to host the file
Ensure the Windows Firewall allows access from external hosts to your web server (In the case of Apache Tomcat, I had to open port 8080)
VMotion all the VMs off of you host, or Shut down all VMs, and put the host into maintenance mode.
SSH to your ESXi4.0 box and at the CLI type:
esxupdate –bundle http://ipaddress:8080/ update (Of course this value will change dependent on your filename)
The zip file will be downloaded from your web server and installed. Reboot the ESXi server when prompted.

Run the installation – Option 2 – from a local instance of the upgrade bundle
If you do not have a web server handy, you could copy the bundle locally on the ESXi host. – or even on a shared datastore accessed by multiple ESXi hosts if you have shared storage.
Using FastSCP(my preference, but any SCP style tool will work e.g. WinSCP) – Copy the upgrade bundle to the ESXi host(or shared store)
VMotion all the VMs off of you host, or Shut down all VMs, and put the host into maintenance mode.
SSH to the host (I use putty, but any SSH tool will work)
From the command line of the host, execute the command: esxupdate –bundle /vmfs/volumes/<datastorename>/<myfolder>/ update
The zip file will be extracted and installed

Reboot the host
Reboot the host when done. Once that’s complete, take the host back out of maintenance mode, and power on the virtual machines.
You’ll possibly have new VMtools available, so upgrade these.

If your host refuses to start up and you are having issues, you should be able to revert to your previous installation by hitting Shift-R as the host boots up.

Categories: VMWare

Finding VMs with disks on multiple different datastores – Script of the Day

March 23, 2011 Leave a comment

I was looking at a VM on one of our hosts and noticed the rather odd configuration showed that the VM had 2 disks provisioned (not unusual), and that the 2 disks had been presented on different storage (very unusual for non clustered VMs in our environment)

I figured, the easiest way to identify all of the VMs that are using VMDKs on multiple different datastores was PowerCli.

The result – just a one liner.

PS:7 >get-vm | ?{$_.DatastoreIdList.count -gt 1}

Name                 PowerState Num CPUs Memory (MB)
----                 ---------- -------- -----------
labserver001     PoweredOn  1        8192
labserver 17a         PoweredOn  2        1280
labserver21        PoweredOn  1        8192
labserver17b         PoweredOn  2        1152

Copying data to a VM datastore using PowerCli – Script of the Day

March 8, 2011 Leave a comment

Ever needed to copy data from your local machine to a VMware datastore . .and not felt like messing around with winSCP / FastSCP, the Datastore browser etc?

PowerCli / PowerShell lets you create a new PSProvider item for your datastore, which in turn lets you copy data using the normal Copy-Item syntax. (though using Copy-DatastoreItem instead)

So, if you have a Datastore in your ESX environment called ‘Datatstore1’ and you want to copy an iso from your C:\ISO directory, it would be as simple as

PS: >new-PSDrive -location (get-datastore 7523_local) -name myds -PSProvider VimDatastore -Root '\'
Name           Used (GB)     Free (GB) Provider      Root                                               CurrentLocation
----           ---------     --------- --------      ----                                               ---------------
myds                                   VimDatastore  \lonlab001@443\Prod\7523_local
PS: >Copy-DatastoreItem -item C:\ISO\install.iso -Destination myds:\ISOS\Myiso.iso -force

Also, as the drive is now a normal PSProvider path, normal commands like get-childitem work like they do on a local drive

PS: >gci myds:
   Datastore path: [7523_local]

            LastWriteTime            Type       Length Name
            -------------            ----       ------ ----
     21/04/2010     07:40          Folder              esxconsole-4bcdbd...
     08/03/2011     16:31          Folder              ISOS


Of course this gives you full access to all of the datat on your datastores directly form a PowerCli session, so you can run any sort of reports / inventories etc that you may need. Happy days . .

Categories: Powershell, Scripting, VMWare

‘Upgrading’ from ESX to ESXi – a multipart series – Tools

March 2, 2011 Leave a comment

Setting up the test environment

In order to get this whole build tested, we need a repeatable and accessible Lab environment.

If you are unfortunate enough to not have an ESX lab environment that you can play on, you could build a workstation and emulate your production environment right on your desktop using VMware workstation.

Tools that we’ll require (so need to download if you do not have them already) are as follows:


· Installation guide

· Download : (you’ll need a free logon)

You favourite script editor

· I use PowerGui : – but you can use anything you like

A VMware ESXi Server, or VMware workstation to run tests on, along with a copy of the ESXi Installable media

· – you can get trials of both from here

Copies of the various tools we’ll be testing

· UDA (Ultimate Deployment Appliance) –

· EDA (ESX Deployment appliance) –

· VMware’s own ‘Auto Deploy’ –

· SD / USB duplication – WinImage –

· V-PXEServer –

· Manual installation – Just the Install ISO above

Assuming that not everyone has spare hardware at their disposal, I guess it would be useful to create VMs to act as ESXi hardware on which to test our installations.

If you’re using VMWare workstation as your lab – Full guide at:

Quick Video:

If you are using an ESX(i) host to run your test ESXi VMs on, follow the guide at :

For each appliance based deployment method, we’ll create a new VM – these will be detailed as we test each appliance

Categories: Virtualisation, VMWare