Troubleshooting: Deploying a vVol VM fails to create a FlashArray Volume Group on ESXi 6.7 U1
Overview
With the release of ESXi 6.7 U1, Pure Storage found that VMware is now providing more information to the VASA Provider then in previous ESXi Versions. This includes the tag VMW_VmID. Pure discovered that the FlashArray VASA Provider would not create a new volume group for the new VM when the VMW_VmID tag is present. The new VM will deploy and create successfully, but there will not be a new Volume Group for that VM, rather the Config, Data and Swap (if the vm is powered on) vVol Array Volumes will be added to the root directory. There will be no indication of what vm the config and data belong to from the FlashArray GUI. This can cause a high amount of confusion and takes away all of the organizational benefits for vVols.
This does not break the use of vVols or stop any vVol operations from completing. Instead the process of creating a FlashArray volume group and organizing the vVol VMs Array Volumes to the volume group does not happen.
The issue will be with any FlashArray running Purity 5.1.7 and lower, 5.0.11 and lower or 5.2.0. Pure Storage has delivered the fix for this issue in Purity 5.1.9+ and 5.2.1+.
Until that fix is released, Cody Hosterman has put together a PowerShell Module that will find the VMs that do not have volume groups, create a new volume group for them and then re-organize their volumes to the correct volume group. This module can be used to update VMs that have been renamed as well.
Powershell Script
For reference, here are Cody's two blog posts on the PowerShell Module:
The customer will need to install the PowerShell Module from the PowerShell Gallery or update it if they have already have it installed.
install-module Cody.PureStorage.FlashArray.VMware update-module Cody.PureStorage.FlashArray.VMware
In addition PowerCLI must be running on version 11.0.0 or higher. You can check the version of PowerCLI that is installed with Get-PowerCLIVersion
or Get-Module VMware.* | Format-Table -AutoSize
and update the version with Update-Module VMware.PowerCLI
.
Get-PowerCLIVersion Get-Module VMware.* | Format-Table -AutoSize Update-Module VMware.PowerCLI |
PS C:\> Get-PowerCLIVersion PowerCLI Version ---------------- VMware PowerCLI 11.0.0 build 10380590 --------------- Component Versions --------------- VMware Cis Core PowerCLI Component PowerCLI Component 11.0 build 10335701 VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 11.0 build 10336080 PS C:\> Get-Module VMware.* | Format-Table -AutoSize ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 6.7.0.10334489 VMware.Vim Script 11.0.0.10335701 VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService} Script 11.0.0.10334497 VMware.VimAutomation.Common Script 11.0.0.10336080 VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...} Script 11.0.0.10334495 VMware.VimAutomation.Sdk {Get-ErrorReport, Get-InstallPath, Get-PSVersion} PS C:\> Update-Module VMware.PowerCLI PS C:\> |
From Powershell the specific command that will be used to clean up the orphaned vVols is:
update-faVvolVmVolumeGroup |
---|
The script requires having the VM that needs to be updated provided. Cody has outlined the process in detail in a recent blog post.
Updating a Volume Group Name on the FlashArray for vVols
Please refer to the steps outlined in the blog post for updating the vVols vms without a volume group.
PowerShell Module Example
Here are a couple examples of using the PowerShell Module Command to clean up a couple vVol VMs that do not have a volume group on the array. There are additional examples and explanation of the Command found in Cody's Blog, so please review the Blog Post.
These examples assume that the Pure Storage PowerShell SDK and VMware PowerCLI is installed.
Example of fixing a single VM "vvol-vm-1" |
---|
install-module Cody.PureStorage.FlashArray.VMware import-module Cody.PureStorage.FlashArray.VMware $faCreds = Get-Credential $fa = new-pfaarray -endpoint 10.21.88.112 -credentials $faCreds Connect-VIServer -Server prod-vcsa.alex.purestorage.com $vm = get-vm vvol-vm-1 $vm | update-faVvolVmVolumeGroup -flasharray $fa PS C:\Windows\system32> install-module Cody.PureStorage.FlashArray.VMware PS C:\Windows\system32> import-module Cody.PureStorage.FlashArray.VMware PS C:\Windows\system32> $faCreds = Get-Credential cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters: PS C:\Windows\system32> $fa = new-pfaarray -endpoint 10.21.88.112 -credentials $faCreds PS C:\Windows\system32> Connect-VIServer -Server prod-vcsa.alex.purestorage.com Name Port User ---- ---- ---- prod-vcsa.alex.purestorage.com 443 ALEX\Carver PS C:\Windows\system32> $vm = get-vm vvol-vm-1 PS C:\Windows\system32> $vm Name PowerState Num CPUs MemoryGB ---- ---------- -------- -------- vvol-vm-1 PoweredOn 8 16.000 PS C:\Windows\system32> $vm | update-faVvolVmVolumeGroup -flasharray $fa vvol-vvol-vm-1-867B60F1-vg/Config-3479c046 vvol-vvol-vm-1-867B60F1-vg/Data-776607ee vvol-vvol-vm-1-867B60F1-vg/Data-1420ffab vvol-vvol-vm-1-867B60F1-vg/Data-a0ad95bf vvol-vvol-vm-1-867B60F1-vg/Data-5714a2a5 vvol-vvol-vm-1-867B60F1-vg/Data-a4a56ae6 vvol-vvol-vm-1-867B60F1-vg/Swap-be7690ee PS C:\Windows\system32> |
Example of checking for and fixing all VMs on the vVol Datastore "sn1-m20-c12-25-vvol-container" |
---|
install-module Cody.PureStorage.FlashArray.VMware import-module Cody.PureStorage.FlashArray.VMware $faCreds = Get-Credential Connect-VIServer -Server prod-vcsa.alex.purestorage.com $datastore = Get-Datastore sn1-m20-c12-25-vvol-container update-faVvolVmVolumeGroup -purevip 10.21.88.112 -faCreds $faCreds -datastore $datastore PS C:\Windows\system32> install-module Cody.PureStorage.FlashArray.VMware PS C:\Windows\system32> import-module Cody.PureStorage.FlashArray.VMware PS C:\Windows\system32> $faCreds = Get-Credential cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters: PS C:\Windows\system32> $fa = new-pfaarray -endpoint 10.21.88.112 -credentials $faCreds PS C:\Windows\system32> Connect-VIServer -Server prod-vcsa.alex.purestorage.com Name Port User ---- ---- ---- prod-vcsa.alex.purestorage.com 443 ALEX\Carver PS C:\Windows\system32> $datastore = Get-Datastore sn1-m20-c12-25-vvol-container PS C:\Windows\system32> $datastore Name FreeSpaceGB CapacityGB ---- ----------- ---------- sn1-m20-c12-25-vvol-container 8,387,900.928 8,388,608.000 PS C:\Windows\system32> update-faVvolVmVolumeGroup -flasharray $fa -datastore $datastore vvol-vvol-vm-3-5F52A30D-vg/Config-d8c2ea8d vvol-vvol-vm-3-5F52A30D-vg/Data-e79b4bcf vvol-vvol-vm-3-5F52A30D-vg/Swap-96f21e77 vvol-vvol-vm-4-E738CE01-vg/Config-aaef868f vvol-vvol-vm-4-E738CE01-vg/Data-50d8fe2d vvol-vvol-vm-4-E738CE01-vg/Swap-d4007cfa vvol-vvol-vm-2-A482C1FB-vg/Config-3cbdf5cd vvol-vvol-vm-2-A482C1FB-vg/Data-37167a9c vvol-vvol-vm-2-A482C1FB-vg/Data-15dec9ab vvol-vvol-vm-2-A482C1FB-vg/Data-2403e40a vvol-vvol-vm-2-A482C1FB-vg/Data-1da8d052 vvol-vvol-vm-2-A482C1FB-vg/Data-b024afd1 vvol-vvol-vm-2-A482C1FB-vg/Swap-fe430fa1 vvol-vvol-vm-1-C500F24D-vg/Config-3479c046 vvol-vvol-vm-1-C500F24D-vg/Data-776607ee vvol-vvol-vm-1-C500F24D-vg/Data-1420ffab vvol-vvol-vm-1-C500F24D-vg/Data-a0ad95bf vvol-vvol-vm-1-C500F24D-vg/Data-5714a2a5 vvol-vvol-vm-1-C500F24D-vg/Data-a4a56ae6 vvol-vvol-vm-1-C500F24D-vg/Swap-be7690ee PS C:\Windows\system32> |