Category: Technical Articles


In most cases you will add VMFS volumes (LUNs) to your vSphere environment, because most of the time your environment will grow. Adding a LUN is very simple: Just configure the masking correctly on your SAN, carry out a rescan on your ESXi server (or the entire cluster) and you have your LUN/volume available.

But what about removing a LUN from your environment. This is a bit more tricky, you have to think about:

  • No virtual machines are using the LUN you want to remove. The LUN should not be used as a RDM;
  • The LUN should not be a part of a datastorecluster and storage DRS should not be active on the LUN;
  • Storage IO Control should be disabled for the LUN;
  • The LUNs should not be used as a HA heartbeat datastore;
  • And the LUN should not be used as persistent scratch partition.

On top of that, you cannot just remove the LUN, even when it’s not used anymore by virtual machines. It’s very important to first unmount the LUN and then detach the LUN from your ESXi server.

VMware described a clear procedure in the following two KB articles:

  • Removing a LUN containing a datastore from VMware ESXi/ESX 4.x – KB 1029786
  • Unpresenting a LUN in ESXi 5: KB 2004605

 

When a virtual machine is provisioned to the datastore cluster, Storage DRS algorithm runs to determine the best placement of the virtual machine. The interesting part of this process is the method Storage DRS determines the free space of a datastore or to be more precise the improvement made in vSphere 5.1 regarding free space calculation and the method of finding the optimal destination datastore.

vSphere 5.0 Storage DRS behavior
Storage DRS is designed to balance the utilization of the datastore cluster, it selects the datastore with the highest free space value to balance the space utilization of the datastores in the datastore cluster and avoids out-of-space situations.

During the deployment of a virtual machine, Storage DRS initiates a simulation to generate an initial placement operation. This process is an isolated process and retrieves the current datastore free space values. However, when a virtual machine is deployed, the space usage of the datastore is updated once the virtual machine deployment is completed and the virtual machine is ready to power-on. This means that the initial placement process is unaware of any ongoing initial placement recommendations and pending storage space allocations. Let’s use an example that explains this behavior.

 

More information about this article in frankdenneman.nl

  1. Download vCenter 5.1.0a ISO and mount it inside vCenter. If you splitted the components on several servers, use the ISO on the corrisponding server
  2. first of all, SSO. Open a command line, move into the folder “Single Sign On” of the DVD, and run:
    1 VMware-SSO-Server.exe /S /v" /L*v \"%temp%\vim-sso-msi.log\" /qn"

    You can then open %temp% folder in Windows Explorer and monitor the automatic upgrade from here. You will find the log file and a temporary sub-directory. When that directory will disappear, the installation will be completed. Check the log to be sure the upgrade was completed successfully.

  3. After SSO, proceed with Inventory Service. You can run the installer from the Autorun interface of the DVD. It will find out you already have Inventory Service in place and offer you to upgrade. Obviously choose YES, and wait for the upgrade to finish. There will be no interactive screen to deal with.
  4. Third component, Web Client. I usually like to install it even before vCenter, since it’s the only graphical interface to SSO, so if something is not working you could use it to manage SSO. As before, it will automatically discover the previous version and will upgrade it.
  5. Fourth, vCenter Server. Even here, it will automatically discover the previous version and will upgrade it
  6. Last one, Update Manager, if you have installed it.

 

Configuring CA signed certificates is a challenge with vSphere as with any complex enterprise environment. Securing an environment is a requirement in many large organizations. You need either public certificates (such as Verisign or Globaltrust), Microsoft CA certificates, or OpenSSL CA certificates to ensure a secure communication.
This article provides steps to allow configuration of these certificates on vSphere components in an environment. The article also assumes that all components are installed and running already with self-signed certificates.
Please validate each step below. Each step provides instructions or a link to a document that provides information on configuring the certificates in your environment.
  1. Generate certificate requests and certificates for each of the vCenter Server components. For more information, seeCreating certificate requests and certificates for the vCenter Server 5.1 components (2037432).

  2. Replace the vCenter SSO certificates. For more information, see Configuring CA signed SSL certificates for vCenter SSO in vCenter Server 5.1 (2035011).

  3. Replace the Inventory Service certificates. For more information on this, see Configuring CA signed SSL certificates for the Inventory service in vCenter Server 5.1 (2035009).

  4. Replace the vCenter Server 5.1 certificates. For more information, see Configuring CA Signed Certificates for vCenter Server 5.1 (2035005).

  5. Replace the vSphere Update Manager Update Manager Certificates. For more information, see Configuring CA signed SSL certificates for VMware Update Manager in vSphere 5.1 (2037581).

  6. Replace ESXi 5.x host certificates. For more information, see Configuring CA signed SSL certificates with ESXi 5.x hosts (2015499).

If your issue persists even after trying these steps:

 

Source: VMwareKB

Intro to VMware vVol

For awhile now, HP Storage has been working with VMware as a design partner to define and develop a VM-granular storage architecture to potentially replace vSphere’s VMFS/datastore model. This new model is called VMware Virtual Volumes (vVols). Virtual Volumes introduces a 1:1 mapping of VMs (more specifically VMDKs or VM LUNs) to storage volumes—in other words, each VM will be associated with its own, unique storage volume. With vVols we could finally have the VMDK representation in vSphere match the representation on storage.

 

As a result, the storage system could now have the ability to operate at the same level of granularity as vSphere, which means that vSphere could better leverage, and take advantage of, the native strengths and capabilities of modern, intelligent storage arrays, like HP 3PAR.

Why vVol?

I think the big thing VMware and storage partners like HP want to overcome is the inefficiencies and the challenges that exist today as a result of working at the LUN or volume level with vSphere. Despite all the advances that have been made, when a VM and VMDK is the unit of data management, a LUN is too coarse to gain the efficiency and flexibility customers need. The granularity mismatch between vSphere and storage systems needs to be resolved. Enter vVols.

 

More Information on this in HP Blogs

 

We can now  manage multiple hypervisors with VMware vCenter.

 

 

 

ESXi 5.1 comes with many improvements and one of them is new namespaces and commands in esxcli.

Those new commands enable a system administrator to perform a shutdown, a reboot or a maintenance operation in a host.

Under the system namespace the new commands are the equivalents of the classic vicfg/esxcfg-hostops which until now was the only way to perform such kind of operations with vCLI and are also accesible locally on ESXi Shell.

image

Maintenance mode operations

Getting the basic usage of the command is as simple as always. You can perform two operations.

  • Get the state of the host
  • Put the the host in or out of Maintenance Mode
~ # esxcli system maintenanceMode 
Usage: esxcli system maintenanceMode {cmd} [cmd options]
Available Commands: 
  get                   Get the maintenance mode state of the system. 
  set                   Enable or disable the maintenance mode of the system. 
~ #
  • Get the state of the host
~ # esxcli system maintenanceMode get 
Disabled 
~ #
  • Put the host in Maintenance Mode
~ # esxcli system maintenanceMode set -e true -t 0 
~ # 
~ # esxcli system maintenanceMode get 
Enabled 
~ #

Power operations

With the shutdown command the host can be either rebooted or shutdown. If the ESXi server is not in Maintenance Mode mode the operation will not be allowed.

~ # esxcli system shutdown 
Usage: esxcli system shutdown {cmd} [cmd options]
Available Commands: 
  poweroff              Power off the system. The host must be in maintenance mode. 
  reboot                Reboot the system. The host must be in maintenance mode. 
~ #

For both task the delay and reason parameter must be provided.

~ # esxcli system shutdown poweroff 
Error: Missing required parameter -r|--reason
Usage: esxcli system shutdown poweroff [cmd options]
Description: 
  poweroff              Power off the system. The host must be in maintenance mode.
Cmd options: 
  -d|--delay=<long>     Delay interval in seconds 
  -r|--reason=<str>     Reason for performing the operation (required) 
~ #
  • Power off the host
~ # esxcli system shutdown poweroff --delay=10 --reason=”Hardware maintenance”
  • Reboot the host
~ # esxcli system shutdown reboot -d 10 –r “Patches applied”

Since September 4th 2012 is PowerShell 3.0 available for download. PowerShell 3.0 is included in the Windows Management Framework 3.0 that contains also WMI and WinRM. It can be installed on Windows 7 SP1, Windows Server 2008 R2 SP1 and Windows Server 2008 SP2. Windows Management Framework 3.0 requires Microsoft .NET Framework 4.0. PowerShell 3.0 is a standard component of Windows 8 and Windows Server 2012.

 

Overview

Windows Management Framework 3.0 makes some updated management functionality available to be installed on Windows 7 SP1, Windows Server 2008 R2 SP1 & Windows Server 2008 SP2. Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI & WinRM.

Windows PowerShell 3.0
Some of the new features in Windows PowerShell 3.0 include:

  • Workflow
    Windows PowerShell Workflow lets IT Pros and developers apply the benefits of workflows to the automation capabilities of Windows PowerShell. Workflows allow administrators to run long-running tasks (which can be made repeatable, frequent, parallelizable, interruptible, or restart-able) that can affect multiple managed computers or devices at the same time.
  • Disconnected Sessions
    PowerShell sessions can be disconnected from the remote computer and reconnected later from the same computer or a different computer without losing state or causing running commands to fail.
  • Robust Session Connectivity
    Remote sessions are resilient to network failures and will attempt to reconnect for several minutes. If connectivity cannot be reestablished, the session will automatically disconnect itself so that it can be reconnected when network connectivity is restored.
  • Scheduled Jobs
    Scheduled jobs that run regularly or in response to an event.
  • Delegated Administration
    Commands that can be executed with a delegated set of credentials so users with limited permissions can run critical jobs
  • Simplified Language Syntax
    Simplified language syntax that make commands and scripts look a lot less like code and a lot more like natural language.
  • Cmdlet Discovery
    Improved cmdlet discovery and automatic module loading that make it easier to find and run any of the cmdlets installed on your computer.
  • Show-Command
    Show-Command, a cmdlet and ISE Add-On that helps users find the right cmdlet, view its parameters in a dialog box, and run it.

 

More details on Windows Management Framework 3.0

Cool script:

$myCol = @()
ForEach ($Cluster in Get-Cluster)
    {
        ForEach ($vmhost in ($cluster | Get-VMHost))
        {
            $VMView = $VMhost | Get-View
                        $VMSummary = “” | Select HostName, ClusterName, MemorySizeGB, CPUSockets, CPUCores
                        $VMSummary.HostName = $VMhost.Name
                        $VMSummary.ClusterName = $Cluster.Name
                        $VMSummary.MemorySizeGB = $VMview.hardware.memorysize / 1024Mb
                        $VMSummary.CPUSockets = $VMview.hardware.cpuinfo.numCpuPackages
                        $VMSummary.CPUCores = $VMview.hardware.cpuinfo.numCpuCores
                        $myCol += $VMSummary
                    }
            }
$myCol #| out-gridview

Navigating the New Server 2012 GUI

The look and feel of the Server 2012 GUI is quite different than Server 2008. While most of the familiar options and features are still available, the process of getting to them is quite different, and in some cases, more difficult.

Snagit Capture

 

1)      The “Start” button no longer exists in Server 2012.  To expose Start, jiggle your mouse in the lower left corner of the desktop and the Start option will appear as shown above.  This is a bit cumbersome in RDP sessions and takes some getting used to.

Snagit Capture

2)      The Start Menu presents applications and other options as tiles.

3)      To access Lock and Sign out, click on the User in the upper right for a drop-down menu.

Snagit Capture

 

4)      To access All Applications, right-click on any tile under Start, and then an options bar will appear at the bottom of the screen.  On this options bar, click on All Apps in the lower right.

Snagit Capture

 

5)      Under All Apps, you can find all the rest of the familiar (but now more difficult to find) options such as Command Prompt and Run.  To make these more easily accessible, pin them to the taskbar.

Snagit Capture

 

6)      Another hidden menu exits off the right side of the desktop.  To access it, move your mouse to the far right or lower-right corner of the screen and hold it there for a couple seconds.   Again, this is cumbersome in RDP sessions and takes some getting used to.

7)      As you can see above, the Restart and Shut down options are now buried a few layers deep so accessing them is a bit tedious.   Some customization suggestions below will help alleviate this.

Snagit Capture

 

8)      To stop the Server Manager window from automatically starting every time you log on, edit the Server Manager Properties and check the box Do not start Server Manager automatically at logon.

 

 

 

Customizations to Facilitate Better User Experience with Server 2012

You may find yourself a little frustrated with the changes introduced with the Server 2012 GUI because many apps/options/tools have been relocated and are therefore more difficult (and more time consuming) to find.

Below are some quick and simple customization changes to “restore” some of the of the Server 2008 look/feel/agility to the 2012 GUI.

 

1)      The first step is to install the Desktop Experience as found under Features.  Once installed, then the (My) Computer icon can be added back to the desktop.

Snagit Capture

a)      Launch Server Manager from the taskbar.

Snagit Capture

b)      Click on Add roles and features to launch the Add Roles and Features Wizard.  UnderFeatures, check the box for Desktop Experience and then complete the wizard (requires a reboot).

Snagit Capture

c)       After rebooting, from the Desktop, right click and choose PersonalizeChange Desktop Icons, and add the desired icons such as Computer and Control Panel.

d)      Right click on the Desktop again, and under View, set icon size to Small, and set Auto Arrange and Sort By options according to your preference.

Snagit Capture

 

2)      Customize the taskbar by pinning shortcuts for I.E., RunCommand Prompt, and other frequently used apps (as found under Start and All Apps) that you want to be quickly accessible.  For directions on how to access the Start and All Apps menus, see Page 2.

3)      Right click on the taskbar, select Properties, and select Use Small taskbar buttons, and under the Toolbars tab, add the Desktop toolbar.

4)      If you desire to add the Background Info (BGI) utility to your Windows 2012 server desktop, then complete the following steps:

Snagit Capture

  • From your network share or software repository containing BGInfo, copy the folder BGInfo toC:\BGInfo.  Edit the BGInfo.bgi config file to customize (if desired) the BGInfo settings.  (this is the latest 64-bit version of BGInfo)

Snagit Capture

  • To automatically refresh BGInfo each time you log on to the server, add a reg key (string value) called BGInfo with value ofC:\BGInfo\LaunchBGI.batto:HKLM\Software\Microsoft\Windows\CurrentVersion\Run

Snagit Capture

 

  • If using mRemote, change the Display Wallpaper setting to Yes under the configuration settings for your server (the default setting is No).  Otherwise the BGInfo screen will not be passed to your display.

 

5)      To work around the cumbersome process of having to navigate to log-off, shutdown, or reboot commands under the hidden menus, place shortcuts to these operations on the Server 2012 desktop.  To make this process quick and easy, pre-defined shortcuts can be saved on a network share and copied down to each server installation.

 Snagit Capture

 

 

  • From the network share, copy the desktop shortcuts to Libraries\Documents\Public Documents on your 2012 server.

Snagit Capture

  • Once copied, open the Desktop_Icons folder, and copy and paste the icons found there to the public desktop (a hidden folder) which can be accessed at C:\Users\public\desktop (manually type this path in Windows Explorer as shown above to get to it).
  • Add or create other shortcuts as desired here so they will show on the public desktop.
  • By placing them on the public desktop, they will be there for all users, and will be preserved even when the server is sysprepped.

Snagit Capture

6)      When finished, your desktop will look similar to the above screen capture:

  • (My) Computer and Control Panel icons added to the desktop
  • ShutdownLogoff, and Restart icons (which are shortcuts to the shutdown command) added to the desktop.  This is much quicker than having to access these options from the hidden menus on the left or right sides of the desktop, and it skips having to provide a reason for shutting down.
  • Shortcut to launch Disk Manager added to the desktop (add other shortcuts as desired)
  • Shortcuts to I.E.Run, and Command Prompt added to the taskbar
  • Desktop toolbar added to the taskbar
  • Background Info (BGInfo) provides for a blue background with the server name and other essential server specs on the desktop.  This will automatically refresh at each logon due to adding LaunchBGI.bat to Run in the system registry, and it can be refreshed manually at any time by clicking on the LaunchBGI icon on the public desktop.

 

 

Sysprep Suggestions

 

1)      When building a new gold image of a Windows 2012 server, include the above customizations before running Sysprep to allow cloned copies to boot with these modifications in place.  Most of the changes will be preserved in the sysprep image saving configuration time.

2)      Other suggested modifications you may want to consider making to a Windows 2012 image before sysprepping it to use as a gold image it include:

  1. Enable RDP
  2. Install Adobe Reader
  3. Using Roles and Features, install .Net 3.5 (set the path to <driveletter or UNC path>\sources\sxs when prompted); Failover Clustering, MPIO, and Hyper-V
  4. Disable the firewall
  5. Disable I.E. security
  6. Disable User Account Control security (set to never notify)
  7. Fully patch the server
  8. If a physical server, run the applicable driver and firmware management/update utility to apply the latest drivers and firmware.
  9. Set the time zone to Central
  10. Install JRE (version of your choice, both the 32bit and 64bit versions)
  11. Other apps and features as desired

 

Source: boche.net

%d bloggers like this: