Archive for August, 2012
vSphere 5.1 – Lesser publicized, neat improvements.
Aug 29th
There are a lot of neat improvements in vSphere 5.1, but it’s worth mentioning some of the neat features that may not be getting as much publicity. Below are some of the features in the release documentation that aren’t in the “What’s New in vSphere 5.1” one-pager, and so-far I haven’t seen nearly enough excitement about thus far. These are features that an engineer will enjoy, but the engineer’s boss might not care so much about.
- 32 Nodes Accessing VMDK Simultaneously on VMFS: This is an important improvement for VMware View workloads using Linked Clones as it allows for higher density clusters. Previously, VMFS only supported 8 nodes accessing a VMDK, and to overcome that then the architect had to use NFS. VMFS and NFS now support the same number of nodes to a read-only file with View 5.1 and greater.
- Virtual Machine Hardware Compatibility: Instead of simply relying on the virtual hardware version number, virtual machines are now given a Virtual Machine Compatibility. For example, VM Hardware Version 4 is now labeled as “Compatible with VMware ESX 3.x and later“. In addition, Administrators can select a “Default Compatibility Level,” which will be a great feature in mixed version clusters.


- Parallel “Multi-threaded” Storage vMotions: Storage vMotion is now capable of performing four simultaneous disk copies. When migrating a virtual machine with five VMDK files, Storage vMotion copies the first four disks in parallel, then starts the next disk copy as soon as one of the first four finish. This will dramatically increase svMotion processes with many disks.

- All Paths Down (APD) Events No Longer Break Hostd: Prior to vSphere 5.1, an APD event could cause hostd to become unresponsive as it would permanently retry failing I/O, which would cause hosts to disconnect from vCenter, etc. A new timeout is now being implemented via the Misc.APDHandlingEnable and Misc.APDTimeout global settings. In the event of an APD, after the default 140 seconds subsequent I/O is met with a quick “No_Connect” response preventing hostd and other processes from hanging.
- Better Latency Monitoring within Storage I/O Control: A new metric ‘VmObservedLatency’ is available that replaces the datastore latency metric within SIOC. This metric measures the time between receipt of the I/O by the VMkernel from the virtual machine and receipt of the response from the datastore. Previously, SIOC only measured the latency after the IO had left the ESXi host, but it now measures and controls storage workload latency throughout the whole virtualized storage stack.

- vCenter Inventory Tagging: Virtual machines can now be tagged with labels for more granular, advanced grouping. For example, Tier-1 applications can be tagged as such while also being tagged as a ‘Sharepoint’ server. This is a relatively simple additions that gives much better sorting capabilities for Virtual Machines.

For a list of more features added, there is documentation for each section that dives into the individual features that may not be as marketable but are excellent features that virtualization admins will enjoy:
- What’s New in VMware vSphere 5.1
- What’s new in VMware vCenter 5.1
- What’s New in VMware vSphere 5.1 – Networking
- What’s New in VMware vSphere 5.1 – Platform
- What’s New in VMware vSphere 5.1 – Storage
- What’s New in VMware vSphere 5.1 – Performance
- Introduction to VMware vSphere Replication
- Introduction to VMware vSphere Data Protection
- What’s new in VMware vSphere Storage Appliance
- What’s new in vCloud Director 5.1
Documenting Environment Settings with PowerCLI
Aug 12th
Below are some PowerCLI snippets I have used to quickly gather information on an environment, as well as to help document settings. The following were grabbed from PowerCLI gurus such as LucD and Alan Renouf, and I have tried to cite the author’s work with each snippet (Note: I was unable to find where I grabbed some of these, but please shoot me an email if I accidentally didn’t cite the source).
These all exports into CSV format to allow easy merging into a document. I tend to include the code to grab the information within the overview document to allow the data to be easily updated on a periodic basis by anyone with PowerCLI installed, as well.
Cluster and Host Hardware Overview
Get-VMHost | Select Parent,Name,Manufacturer,Mode,Version,MemoryTotalMB,Model,NumCpu | Export-Csv “PathHere”
Datastore Capacity and Usage (Credit: LucD.info)
$DS = @()
Get-Cluster | ForEach-Object {
$Cluster = $_
$Cluster | Get-VMHost | ForEach-Object {
$VMHost = $_
$VMHost | Get-DataStore | Where-Object { $_.Name -notlike "local*"} | ForEach-Object {
$out = "" | Select-Object Cluster, DSName, FreespaceGB, CapacityGB, PercentFree
$out.Cluster = $Cluster.Name
$out.DSName = $_.Name
$out.FreespaceGB = $($_.FreespaceMB / 1024).tostring("F02")
$out.CapacityGB = $($_.CapacityMB / 1024).tostring("F02")
$out.PercentFree = (($_.FreespaceMB) / ($_.CapacityMB) * 100).tostring("F02")
$DS += $out
}
}
}
$DS | Sort-Object Cluster, DSName –Unique | Export-Csv “PathHere”
List of iSCSI Targets by Host (Credit: LucD.info)
Get-VMHost | Get-View | %{
$esx = $_
$esx.Config.StorageDevice.HostBusAdapter | where {$_.GetType().Name -eq "HostInternetScsiHba"} | %{
$hba = $_
$_.ConfiguredSendTarget | `
Select @{N="ESX Name";E={$esx.Name}},
@{N="HBA Device";E={$hba.Device}},
@{N="IScsi Name";E={$hba.IScsiName}},
@{N="IScsi Target";E={$_.Address}}
}
} | Export-Csv "PathHere" -NoTypeInformation –UseCulture
Service Console Details by Host (Credit: Virtu-al.net)
Get-VMHost | Get-VMHostNetwork | Select Hostname, ConsoleGateway, DNSAddress -ExpandProperty ConsoleNic | Select Hostname, PortGroupName, IP, SubnetMask, ConsoleGateway, Devicename | Export-Csv “PathHere”
VMKernel Details by Host
Get-VMHost | Get-VMHostNetwork | Select Hostname, VMkernelGateway -ExpandProperty VirtualNic | Select Hostname, PortGroupName, IP, SubnetMask, VMkernelGateway, Devicename | Export-Csv "PathHere"
Port Group Details by Host
Get-VMHost | ForEach-Object -Process {
Tee-Object -InputObject $_ -Variable Temp | Get-VirtualPortGroup |
Select @{N="VMHost";E={$Temp.Name}},Name,VirtualSwitch,VirtualSwitchName,VLanId
} | Export-Csv "PathHere”
vSwitch Details by Host (Credit: Virtu-al.net)
$NetworkInfo = @()
Foreach ($VMHost in (Get-View -ViewType HostSystem | Where {$_.Runtime.ConnectionState -ne "disconnected"})){
Write $VMHost.Name
$NetworkSystem = Get-View $VMHost.ConfigManager.NetworkSystem
Foreach ($PG in $NetworkSystem.NetworkInfo.PortGroup){
$Details = "" | Select VMHost, vSwitch, PortGroup, ActiveNics, StandbyNics
$Details.VMHost = $VMHost.Name
$Details.Portgroup = $PG.Spec.Name
If ((($PG.ComputedPolicy.NicTeaming.NicOrder.ActiveNic | Select -ExpandProperty $ActiveNic).Length) -gt 1){
$Details.ActiveNics = [string]::join(';',($PG.ComputedPolicy.NicTeaming.NicOrder.ActiveNic | Select -ExpandProperty $ActiveNic))
}
Else {
$Details.ActiveNics = ($PG.ComputedPolicy.NicTeaming.NicOrder.ActiveNic | Select -ExpandProperty $ActiveNic)
}
If ((($PG.ComputedPolicy.NicTeaming.NicOrder.StandbyNic | Select -ExpandProperty $StandbyNic).Length) -gt 1){
$Details.StandbyNics = [string]::join(';',($PG.ComputedPolicy.NicTeaming.NicOrder.StandbyNic | Select -ExpandProperty $StandbyNic))
}
Else{
$Details.StandbyNics = ($PG.ComputedPolicy.NicTeaming.NicOrder.StandbyNic | Select -ExpandProperty $StandbyNic)
}
Foreach ($VS in $NetworkSystem.NetworkInfo.vSwitch){
If ($VS.Name -eq $PG.Spec.vSwitchName){
$Details.vSwitch = $VS.Name
}
}
$NetworkInfo += $Details
}
}
$NetworkInfo | Sort VMHost, VSwitch, PortGroup | Export-Csv "PathHere" –NoTypeInformation
Another great tool that should be in every Admin’s tool-belt is RVTools, which leverages PowerCLI to generate a great deal of information. All of the data generated through RVTools can also be exported to CSV and merged into the documentation.
This Month on the VMTN Forums – 7/12
Aug 3rd
Interesting Q&A’s from July:
- Question: Is the VMware View 5.0 client compatible with View 5.1?
- Answer: Yes, the 5.0 version of the View Client is compatible with version 5.1. Versions 4.x of the View Client, however, must be upgraded.
- Question: How can the license count be found in VMware View?
- Answer: The license count is not available via the View Administrator, and the product works on the honor system as long as there is a valid key. The count can be viewed from the ‘My VMware‘ licensing portal. It is best practices to combine multiple license keys into a single key to be applied within the View Administrator licensing page.
- Question: How to properly move virtual desktops among datastores with VMware View?
- Answer: For full virtual desktops (non-linked clones) then a traditional svMotion will suffice; however, regular storage vMotion is not supported with linked clone pools. To move Linked Clones, you will want to use the rebalance functionality within View (KB 1028754).
- Question: Can VMs be moved among AMD/Intel processors when powered off?
- Answer: From a vSphere standpoint, there are no problems with this. The concern here is when using a guest OS that is compiled specifically for either AMD or Intel. Modern, stock kernels should not have a problem moving between the two. For example, RHEL had issues due to installing with optimized kernels (KB 1909), but this is no longer done in RHEL 5 or 6.
- Question: How to use a static IP with floating desktop pool?
- Answer: Despite being named differently, a dedicated pool with refresh after first use would technically achieve this goal.
- Question: How to allow users to change their virtual desktop screen resolution with zero clients?
- Answer: The screen resolution will need to be changed on the zero client itself. Users should be able to do that via the menu on the top left, unless it has been explicitly locked down. View will only give the resolution that the zero client requests.