Performing the On-Disk Upgrade Preflight Check

When you upgrade the vSAN on-disk format using the vSphere Client, a preflight check is performed. Similarly, when you upgrade the on-disk format programmatically, you must perform the preflight check using the following script:

print 'Perform VSAN upgrade preflight check'
upgradeSpec = vim.VsanDiskFormatConversionSpec(
    dataEfficiencyConfig=vim.VsanDataEfficiencyConfig(
        compressionEnabled=args.enabledc, deduplicationEnabled=args.enabledc))

If many problems exist with the pre-flight check, you must resolve them before you upgrade. You can list the reported problems so that they can be addressed.

issues = vsanUpgradeSystem.PerformVsanUpgradePreflightCheckEx(cluster, spec=upgradeSpec).issues
if issues:
    print 'Please fix the issues before upgrade VSAN'
for issue in issues:
    print issue.msg
return