PowerCLI: Upgrading vHardware to vSphere Part 1: Templates


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: http://poshcode.org/1214

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


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


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


    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


    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.

    Found New Hardware Wizard Loop


    image

    After upgrading one of my VM’s to vSphere (Hardware / VMware Tools). I get the following wizard over and over again.

    image

    After a search on google I found out that there are two topics on the VMware communities:

    I found the following “Solution”:

    I have this problem too. If you check Device Manager, you’ll probably see what I see – 32 PCI-to-PCI bridges! Sadly, there’s apparently no way to prevent Windows from showing the New Hardware Wizard if the already-installed driver is unsigned (which the Fusion beta drivers are). So just go through it 32 times.

    It’s true, after installing over and over again, the wizard stops popping up :-D. The weird thing is that this “bug” only appears on one of my VM’s. So I hope it will never popup again.

    Using Perfmon for accurate, ESX Performance Counters


    image

    Scott Drummonds created the following post:

    My colleague in product management, Praveen Kannan, has been working to extend Perfmon to show some ESX performance counters. This capability is automatically installed with VMware Tools on vSphere 4. But Praveen and I have made a stand-alone version available to those of you that are still on VI3. Download it here to give it a try.
    To install, place the file in an appropriately-named directory on any Windows VM on VI3. Double-click the executable, which will self-extract the files into the same directory. Run "install.bat" and you’re done.
    Once you bring up Perfmon you’ll see two new performance objects on your computer: "VM Memory" and "VM Processor". These objects contain counters exposed by ESX that accurately reflect the VM’s memory and CPU usage. Here’s Perfmon on my test VM after I’ve installed the tool.

    click here for more info.

    PowerCLI: Inventory VM Hardware version


    image

    With the release of vSphere we also got a new Hardware version of the VM. I created a PowerCLI script to inventory the VM’s, which are not upgraded yet.

    Get-VM |% {Get-View $_.ID} |`
    
    % {
    $vmVersion = $_.Config.Version
    $vmName = $_.Name
    
        if ($vmVersion -eq "vmx-04"){
            Write-Host $vmName "uses hardware version 4" 
        }
    }
    
    Disconnect-VIServer -Confirm:$false


    The output will look like this:

    image

    PowerCLI: Export VM Memory Limits to csv


    image

    I wanted to see how the memory limits are configured in my VI3 environment. You can do this via the VIC, but you can also do it via a PowerCLI script and export it to a csv file.

    Copy the script and run it. The script will ask you to enter the vCenter server and a path to save the csv file (like c:\temp\memlimits.csv).

    $vCenter = Read-Host "Enter vCenter Server"
    $csvFile = Read-Host "Enter csv file"
    
    Connect-VIServer $vCenter
    
    Get-VM | sort name | % { $vm = $_ | Get-View ; $vm | select `
        @{ Name = "VM Name"; Expression ={ $vm.Name }},`
        @{ Name = "Memory in MB"; Expression ={ $vm.Config.Hardware.MemoryMB }},`
        @{ Name = "Memory Limits in MB"; Expression ={ $vm.Config.MemoryAllocation.Limit }}`
        } | Export-Csv -NoTypeInformation $csvFile
    
    Invoke-Item $csvFile
    
    Disconnect-VIServer -Confirm:$false

    The output will look like this:

    image