Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

2014/11/26

Finding VIBs on ESXi hosts with PowerCLI

I did not work with PowerCli for the last couple of months and I had an interesting question from one of my follower Ivo from Netherlands.

He was trying to retrieve the VIB information with the name 'net-e1000e' from all his VMware Hosts using the PowerShell and the Snapin PowerCli from VMware.


What is a VIB ?
VIB stands for vSphere Installation Bundle.  At a conceptual level a VIB is somewhat similar to a tarball or ZIP archive in that it is a collection of files packaged into a single archive to facilitate distribution


Here is the piece of code to retrieve this information.
The output is sent to Out-GridView which create a simple GUI.

Get-VMHost | Where-Object { $_.ConnectionState -eqConnected” } | Foreach-Object {
    $CurrentVMhost = $_
    TRY
    {
        # Exposes the ESX CLI functionality of the current host
        $ESXCLI = Get-EsxCli -VMHost $CurrentVMhost.name
        # Retrieve Vib with name 'net-e1000e'
        $ESXCLI.software.vib.list() | Where-Object { $_.Name -eq "net-e1000e" } |
        FOREACH
        {
            $VIB = $_
            $Prop = [ordered]@{
                'VMhost' = $CurrentVMhost.Name
                'ID' = $VIB.ID
                'Name' = $VIB.Name
                'Vendor' = $VIB.Vendor
                'Version' = $VIB.Version
                'Status' = $VIB.Status
                'ReleaseDate' = $VIB.ReleaseDate
                'InstallDate' = $VIB.InstallDate
                'AcceptanceLevel' = $VIB.AcceptanceLevel
            }#$Prop
            
            # Output Current Object
            New-Object PSobject -Property $Prop
        }#FOREACH
    }#TRY
    CATCH
    {
        Write-Warning -Message "Something wrong happened with $($CurrentVMhost.name)"
        Write-Warning -Message $Error[0].Exception.Message
    }
} | Out-GridView


Script Version


I also wrote a more complete version available on Github


Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

2013/07/16

WS2012 Storage - iSCSI Target Server - Configuring an iSCSI Initiator on VMware vSphere 5.1


I recently switched the backend storage of my VMware vSphere 5.1 Home Lab from FreeNas (OS based on UNIX) to iSCSI (Windows Server 2012 Storage Feature). The reason is that I wanted to play with the PowerShell iSCSI modules and do some tests with SMB v3.0.

In a previous post I showed how to create an iSCSI target using PowerShell on Windows Server 2012. Today I will demonstrate how I set the VMware vSphere 5.1 Software iSCSI Adapter using PowerCli and create the datastore using the LUN created in my previous post. I won't cover how to assign the iSCSI traffic to a dedicated PortGroup and dedicated NICs.


2013/07/02

Enabling Change Block Tracking (CBT) on a vSphere 5.1 VM with PowerShell/PowerCli

In one of my previous post, I created two PowerShell functions to enable Copy/Paste operations on VMware vSphere 5.1 between a Guest OS and the vSphere Client remote console.
Today we'll use a very similar piece of code to Enable Change Block Tracking (CBT) on one or more Virtual Machines.

I already talked about CBT in the past, but I just wanted to create re-usable PowerShell functions that will help me when I need it.

2013/07/01

How to Enable Copy/Paste Operations Between GuestOS and Remote Console on vSphere 5.1 (GUI and PowerCli)

In this blogpost I will explain how to enable Copy/Paste operations between the Guest Operating System and the Remote Console on VMware vSphere 5.1 via the GUI and PowerCli (PowerShell for VMware).

VMware does not recommend this manipulation to avoid and limit Exposure of Sensitive Data Copied to the Clipboard section.

Using the GUI this procedure requires the VM(s) to be powered off. Who wants to do that? Not me...

Check the second part of this procedure using PowerCli, this can be applied without powering off the VM. However you'll need to do a stun/unstun operation (i.e. power on/off, suspend/resume, create/delete snapshot/storage VMotion) to achieve the same thing.


Using the Graphical User Interface (GUI)

Applying advanced settings to a VM can be a daunting task.
Doing this manipulation via the GUI is pretty heavy. When dealing with even a few VMs, this can be a very time consuming task time consuming...

The "Configuration Parameters" button is not available while the VM is Powered On.

1 - Power down your VM(s)

2 - Go into Edit Setting, under the Option tab, and select General under Advanced.
You'll see the Configuration Parameters button...



3 - Click on Add Row and enter the Name and Value for each of the following items:
  • isolation.tool.copy.disable = FALSE
  • isolation.tool.paste.disable = FALSE

2013/04/01

Deploying and Configuring vCenter Server Appliance 5.1

In this post I will describe how I installed and configured vCSA in my Home Lab from the vSphere Client. I will also show how to access the vSphere Web client once the installation is completed.

What is VMware vCenter ?

Before I start, It should be good to revisit the definition of VMware vCenter.

VMware vCenter Server provides a centralized and extensible platform for managing virtual infrastructure. VMware vCenter Server, formerly VMware VirtualCenter, manages VMware vSphere environments allowing IT administrators simple and automated control over the virtual environment to deliver infrastructure with confidence.

  • Provides centralized control and visibility at every level of virtual infrastructure
  • Delivers the security and availability of vSphere through automated proactive management
  • Empowers a broad partner ecosystem to extend virtualization capabilities

2013/03/26

How to Deploy an OVF Template from a Remote Web Server



In the following post I am going to explain how to deploy an OVF Template from an URL.


The VMware vSphere Client allows you to deploy and export virtual machines, virtual appliances, and vApps stored in Open Virtual Machine Format (OVF).

An appliance is a pre-configured virtual machine that typically includes a preinstalled guest operating system and other software.





Methods to deploy an OVF Template
Using vSphere Client you have a couple of methods available to you :
  • Remote web server (URL)
  • Local Disk, USB keychain drives or CD/DVD drives
  • Shared network drives
  • OVFTool (Command-line utility from VMware that allows you to import and export OVF packages to and from a wide variety of VMware platform products.)

In most cases, Administrators would probably browse their Local Disks or Network Shares.
However, In my case I want to deploy a template using the local datastore of my ESXi host, using an URL.

2013/01/23

Enabling Change Block Tracking (CBT) on a Virtual Machine (VMware vSphere 5.1)

Update: 2013/07/02 I wrote another post about CBT and create a re-usable PowerShell function

I recently had to enable CBT in my VMware vSphere environment, on a good amount of Virtual Machines.

What is Change Block Tracking (CBT) ? If you are not familiar with CBT,  checkout the following articles:


How to implement CBT, what do you need ?

  • VM version 7 at least,
  • No snapshot on your VM
  • Enable CBT,
  • Finally the VM must go through a stun-unstun cycle (power on, resume after suspend, migrate, or snapshot create/delete/revert) before the reconfiguration takes effect.

How to Enable CBT on your VM ? (GUI)

Note: When the VM is Powered ON you won't be able to access those settings.
However, It is possible to do it via PowerShell even when the VM is started. :-)  (see below)

Navigate to Configuration Parameters and add the following Entries.

Right click on your VM, select Edit Settings/Options Tab/Advanced/General.
Click on Configuration Parameters and add the following entries


2013/01/20

WS2012 Storage - NFS Server - Configure NFS for VMware vSphere 5.1 Home Lab


The following procedure show how to setup a NFS Server hosted on Windows Server 2012 for backend storage of my VMware vSphere Server 5.1 Home Lab.

You can also check my post on Creating an iSCSI Target Server on Windows Server 2012.





Overview

In the following post I will talk about the following points:
  • Terminology
  • Using PowerShell
    • Add the Role NFS Server Feature on Microsoft Windows Server 2012
    • Create the Share and Set the NFS permissions
    • Add the NFS datastore to VMware vSphere 5.1
  • Using the GUI (Graphical User Interface)
    • Add the Role NFS Server Feature on Microsoft Windows Server 2012
    • Create the Share and Set the NFS permissions
    • Add the NFS datastore to VMware vSphere 5.1


NFS Storage

Quick overview of my NFS Service architecture in my Home Lab


2013/01/17

DirectPath I/O supported with ASUS M5A97 R2.0/AMD FX-8350


My HomeLab configuration:
MotherBoard: ASUS M5A97 R2.0
CPU : AMD FX-8350 (8 Cores - 4.0Ghz)

DirectPath IO



How to DirectPath I/O on the ASUS M5A97 R2.0
-Enter into the BIOS and navigate to the Advanced Settings (using F7)
-Under North Bridge Configuration
-IOMMU is DISABLED by default, set to ENABLED

2012/12/07

My Home Lab !

I finally ordered my home lab to work on my technical knowledge and to help me work on some certifications. 

My first goal will be to pass my VCP5-DV in February 2013 (It is already booked!) and probably work on some other certifications like Hyper-V, SCCM, W2012...

Here is the configuration I choose

My HomeLab will run on 3 Whiteboxes:
-2 HYPERVISOR  running VMware ESXi VSphere 5.1
-1 STORAGE SERVER running FreeNas 8.3




HYPERVISORS (2 New Whiteboxes)


STORAGE
For this box I took my old HTPC and replaced some components.


More detail on HomeLab page....

2012/02/15

VMware Virtual Machine Template - Windows Server 2008 R2

Update: 2013/03/29

Virtual Machine Template
Virtual Machine Templates come in very handy when you want to have a repository of Virtual Machine base or images that you can easily create a virtual machine from. This saves you the time of installing/configuring the operating system, installing regular common applications and patching the system.

Here are a few references I found to create my Windows Server 2008 R2 Template on a VMware environment

Create, Install and Config
  • Jason Samuel - How to Build a VMware vSphere VM Template for Windows Server 2008 R2
  • VMPros Blog - VMware: My favorite Windows 2008R2 template configuration
  • Jeremy Waldrop's Blog - How to Build a Windows 2008 VMware ESX VM Template
  • Shawn Ross IT Blog - Creating a Windows Server 2008 R2 (x64) vSphere 4.1 VM Template
  • Effin Blog - Creating an Activated Windows Server 2008 R2 VMware Template using Microsoft Sysprep
  • Solori - In-the-Lab: Windows Server 2008 R2 Template for VMware
  • Abiquo - VM Template Guide
  • Abiquo - Generating VM Templates
Performance and Tweak