vCenter 4 on Windows x64 and 32 bit DSN

2009 July 3
tags: ,
by afokkema

image

Today I installed a Windows Server 2008 x64 VM to use as vCenter 4 server. Everything went fine until the DSN option gave me the (Please create a 32 bit system DSN) message.

image

I created the DSN via: Start – Run – msodbcad32. The weird thing I noticed was the small amount of options available, only two as you can see in the picture below.

image 

To solve this issue, start Odbcad32.exe from the following location %systemdrive%\Windows\SysWoW64\Odbcad32.exe instead of Start –Run – Odbcad32.

Now we have the options we need:

image

Create a new system DSN for vCenter and vCenter Update Manager. Start the vCenter installer and select the right DSN:

image

More information about this issue can be found in: KB942976

 

Source: http://www.vmwarewolf.com/32-bit-odbc-dsn-for-vsphere/

Windows Update error code 80244019

2009 July 3

image

On a fresh installed Windows Server 2008 X64 VM, a received the following error when I want to search for new Windows Updates:

image

The solution in my case was to delete the following registry key: 

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate

 

Source: http://social.technet.microsoft.com/Forums/en-US/itprovistasetup/thread/e788027e-9292-47c0-891e-90309cf13367

Powershell: Working with Excel and error HRESULT: 0×80028018

2009 July 2
by afokkema

 image

If you want to use Microsoft Excel in your Powershell scripts.

$Excel = New-Object -Com Excel.Application
$Excel.visible = $True
$Excel = $Excel.Workbooks.Add()

 

You can run into the following error:

image

The work around for this issue was changing the Regional Options back to United States International.

image

Microsft created a work around. More info can be found in in: KB320369

guillermooo has created a port to Powershell. Just copy the following code and you should be able to open Excel and create a new workbook.

I didn’t test this script block so let me know if it works ;-)

$ci = new-object system.globalization.cultureinfo "en-US"

$e = New-Object -COM "Excel.Application"
$e.Visible = $True
$e.UserControl= $True
$books = $e.Workbooks
$books.PSBase.GetType().InvokeMember( `
       "Add", `
       [system.reflection.bindingflags]::InvokeMethod, `
       $null, $books, $null, $ci)

Source: http://stackoverflow.com/questions/687891/exception-automating-excel-2007-with-powershell-when-calling-workbooks-add

PowerCLI: Generate an Excel sheet with VM info

2009 July 1
by afokkema

image

The following script is part of another script but I wanted to show you some nice Powershell stuff in combination with Microsoft Excel.

This script will generate an Excel sheet with some VM information. It will color the cell red if the Powerstate equals to NotRunning.

$vCenter = Read-Host "Enter your vCenter servername"
Connect-VIServer $vCenter

$Excel = New-Object -Com Excel.Application
$Excel.visible = $True
$Excel = $Excel.Workbooks.Add()

$Sheet = $Excel.Worksheets.Item(1)
$Sheet.Cells.Item(1,1) = "VM State"
$Sheet.Cells.Item(1,2) = "VM Name"
$Sheet.Cells.Item(1,3) = "VM Hostname"
$Sheet.Cells.Item(1,4) = "IP Address"
$Sheet.Cells.Item(1,5) = "Total Nics"
$Sheet.Cells.Item(1,6) = "OS"
$Sheet.Cells.Item(1,7) = "ESX Host"

$intRow = 2

$WorkBook = $Sheet.UsedRange
$WorkBook.Interior.ColorIndex = 19
$WorkBook.Font.ColorIndex = 11
$WorkBook.Font.Bold = $True

$vms = Get-VM

foreach($vm in $vms){
if($vm.Guest.State -eq "NotRunning")
{
    $Sheet.Cells.Item($intRow, 1) = [String]$vm.Guest.State
    $Sheet.Cells.Item($intRow, 1).Interior.ColorIndex = 3
}
else
{
    $Sheet.Cells.Item($intRow, 1) = [String]$vm.Guest.State
    $Sheet.Cells.Item($intRow, 1).Interior.ColorIndex = 4
}
$Sheet.Cells.Item($intRow, 2) = $vm.Name
$Sheet.Cells.Item($intRow, 3) = $vm.Guest.HostName
$Sheet.Cells.Item($intRow, 4) = [String]$vm.Guest.IPAddress
$Sheet.Cells.Item($intRow, 5) = $vm.Guest.Nics.Count
$Sheet.Cells.Item($intRow, 6) = $vm.Guest.OSFullName
$Sheet.Cells.Item($intRow, 7) = $vm.Host.Name

$intRow = $intRow + 1}

$WorkBook.EntireColumn.AutoFit()
Disconnect-VIServer -Confirm:$false

 

The output will look like this:

image

Error when deploying an OVF on vSphere

2009 June 30
tags: ,
by afokkema

image

If you want to deploy an OVF template within vSphere, you might get the following warning/error:

You don’t hold privilege ‘ Datastore > Allocate space’ on the Datastore connected to the selected Cluster.

See the screenshot below:

image

The solution is simple, click on Inventory followed by Host and Clusters:

image

Start the deploy OVF wizard again and the error/warning will not show up.

PowerCLI: Upgrading vHardware to vSphere Part 1: Templates

2009 June 27
by afokkema

image

With the release of vSphere VMware introduced a new hardware level for VM’s. De upgrade process to the new hardware level is already described on Scott Lowe’s blog: http://blog.scottlowe.org/2009/06/01/vsphere-virtual-machine-upgrade-process/.

I wanted to see if I could script this process with PowerCLI. My first goal was to upgrade al my templates. So I created the following script:

Upgrade-vHardware_Templates

The script does the following:

  • Export template names to CSV
  • Convert templates back to VM’s
  • Check the vHardware version of the VM. If the hardware version is version 4 start the VM
  • When the VM is ready check the VMware Tools version. If the VMware Tools are old, the script will install the new version.
  • When the VMware Tools are Ok the VM gets a shutdown.
  • When the VM is down, the vHardware will be upgraded
  • The final step is converting the VM back to a template.

The following output will be shown at the PowerCLI console:

image

The next step will be the upgrade process of a regular VM. But for this process a need to capture the ip-address upgrade the vHardware and restore the ip-address into the VM. When I am finished with that part I am going to post Part 2.

IBM ToolsCenter Bootable Media Creator

2009 June 25
by afokkema

image

Via a post of @maishsk (Twitter) on  http://technodrone.blogspot.com/ I read about the ToolsCenter Bootable Media Creator. So I downloaded the software from: http://www-947.ibm.com/systems/support/ and gave it a test drive.

When you start the software it will ask what type of server / blade you have and will download the updates and create the bootcd for you. More info can be found in this pdf: ibm_utl_bomc_1.00_anyos_anycpu.pdf

image

Power on  the server / blade and start from CD. The following screen will show up:

image

Virtual Appliance: UDA 2.0 Beta

2009 June 24
by afokkema

image 

These are the new features in UDA 2.0:

 
  • ESX4 Support
    Thanks to Mike Laverick!
  • Solaris Sparc Support
    Thanks to Bevan Brown and his team for sending in the solaris sparc details.
  • Based on Centos 5.3
    The UDA is now based on an enterprise ready Linux distribution.
  • First Boot Wizard
    Turn on the appliance and it will run a wizard that lets you configure the UDA before it tries to access the network.
  • Improved User Interface
    Well, that’s personal of course, just check it out and let me know what you think!
  • Operating System Flavors
    You can now add as many operating system flavors as you want. Many people on the forums asked about how to get e.g. Windows XP Home and Windows XP Professional on the UDA at the same time. It was possible by changing/remounting the ISO files and some manual fiddling, but now you can add as many as you like.
  • Subtemplates
    You can now specify a list of variables and values and use them all within the same template. You will not have to add a new template for every new system anymore. (You’ll need documentation to use this, but that is not ready yet :-)
  • PXE password
    If you are using the UDA in an environment where you do not want all users to have access to the templates using PXE boot, you can use a menu password.
  • Mounting 256 ISO files
    On the forums we’ve seen people having troube with a ‘no free loop devices’ error. This was caused by the UDA not having enough reservations for mounting ISO’s. You can now mount up to 256 iso files at the same time.
  • Add VMware Tools from the web-interface
    Tell the UDA where your linux.iso file is containing the vmware tools and it will install them for you.
  • Manual Configuration
    Lots of people were creating their own additions for bootable floppies over PXE. Good stuff that would break when the UDA regenerated the boot menu. Now you can manage your manual configuration from within the web-interface (and they will stay on the menu :-) .
  • Easily extend diskspace
    Extend the space for the local storage or the UDA system volume by adding as many virtual disks as you like. Use the webinterface to activate the new disks
  • Use the CDROM station(s) in the UDA virtual machine
    You can now add a cdrom drive to the UDA virtual machine and it will detect it.
  • More info and the latest version can be found here: http://www.ultimatedeployment.org/uda20beta.html

    VMware: HP EVA Storage Plugin for VI

    2009 June 23
    tags: ,
    by afokkema

    image

    I saw this Plugin in my RSS reader today:

    The EVA
    plug-in for Virtual Infrastructure Client provides administrators a
    tool to facilitate the discovery and identification of HP EVA storage
    arrays connected to VMware ESX servers.

    Administrators
    can have a global view across all storage layers (SAN array, VMware ESX server and Virtual Machines) to keep everything within a single pane of glass through the VI client interface. As a result, ESX storage
    management becomes easier and faster with a lower risk of configuration
    mistake.

    More info can be found here: http://www.k-ante.com/page_interne.php?lang=UK&ID=plug_in_vmware

    Watch a demo movie (Quicktime required): Video_Plug_in_VMware_for_EVA_EN.mp4 

    Source: http://communities.vmware.com/blogs/amodi/2009/06/22/plugin-eva-for-vmware

    How To: Uninstall Powershell 1.0

    2009 June 22
    by afokkema

    image

    If you’re trying to install Powershell 2.0 CTP3 on a Windows PC with Powershell 1.0 already installed, the installation wizard will stop with the following warning.

    image

    Before the wizard will continue, you have to uninstall Powershell 1.0.

    Open Control Panel. Select Show updates and browse to Windows XP – Software Updates. Click on Remove to uninstall Powershell 1.0.

    UninstallPowerShell1

    If you don’t have an entry in the Add/Remove Programs control panel, You can find the Powershell 1.0 Uninstaller here:

    • C:\WINDOWS\$NtUninstallKB926139-v2$\spuninst\spuninst.exe
    • C:\WINDOWS\$NtUninstallKB926139$\spuninst\spuninst.exe

    After uninstalling Powershell 1.0 you’re able to install Powershell 2.0 CTP3.