vmware / pyvmomi

VMware vSphere API Python Bindings
Apache License 2.0
2.22k stars 766 forks source link

Getting error when creating vsan esa #1091

Open vsawant1608 opened 3 months ago

vsawant1608 commented 3 months ago

Describe the bug

Have below code

    vsan_spec = vim.VimVsanReconfigSpec(
                vsanClusterConfig=vim.VsanClusterConfigInfo(
                    defaultConfig=vim.VsanClusterConfigInfoHostDefaultInfo(
                    )
                ),
                dataEfficiencyConfig=vim.VsanDataEfficiencyConfig(
                    compressionEnabled=compress,
                    dedupEnabled=dedup
                ),
                modify=True
            )

It is throwing below error. Any help on from where that error message is originating would be helpful.

key = 'com.vmware.vsan.clusterconfigprecheck.reason.notsupportedconfigsforvsanesa',\n arg = (vmodl.KeyAnyValue) [\n (vmodl.KeyAnyValue) {\n dynamicType = <unset>,\n dynamicProperty = (vmodl.DynamicProperty) [],\n key = 'configs',\n value = '(vim.vsan.DataEfficiencyConfig) {\\n dedupEnabled = false,\\n compressionEnabled = true\\n}'\n }\n ],\n message = \"Configuration '(vim.vsan.DataEfficiencyConfig) {\\n dedupEnabled = false,\\n compressionEnabled = true\\n}' are not valid for vSAN ESA.\"\n }\n ]\n}\n"}

Reproduction steps

Have below code

    vsan_spec = vim.VimVsanReconfigSpec(
                vsanClusterConfig=vim.VsanClusterConfigInfo(
                    defaultConfig=vim.VsanClusterConfigInfoHostDefaultInfo(
                    )
                ),
                dataEfficiencyConfig=vim.VsanDataEfficiencyConfig(
                    compressionEnabled=compress,
                    dedupEnabled=dedup
                ),
                modify=True
            )

It is throwing below error. Any help on from where that error message is originating would be helpful.

key = 'com.vmware.vsan.clusterconfigprecheck.reason.notsupportedconfigsforvsanesa',\n arg = (vmodl.KeyAnyValue) [\n (vmodl.KeyAnyValue) {\n dynamicType = <unset>,\n dynamicProperty = (vmodl.DynamicProperty) [],\n key = 'configs',\n value = '(vim.vsan.DataEfficiencyConfig) {\\n dedupEnabled = false,\\n compressionEnabled = true\\n}'\n }\n ],\n message = \"Configuration '(vim.vsan.DataEfficiencyConfig) {\\n dedupEnabled = false,\\n compressionEnabled = true\\n}' are not valid for vSAN ESA.\"\n }\n ]\n}\n"}

Expected behavior

It should work

Additional context

No response