One can use concourse pipeline to upgrade Operations Manager. In pipeline, we use "Platform-Automation-Toolkit" to create upgrade tasks. Refer https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/platform-automation-toolkit-for-tanzu/5-2/vmware-automation-toolkit/docs-index.html for more details.
While using Platform-Automation-Toolkit version 5.2.0 in pipeline, we got below error while resizing/reassigning the disk to Operations Manager VM.
Executing: "govc vm.disk.change -vm.ipath=/sandbox-OpsManager -size=180G"
govc[stderr]: govc: error resizing main disk
govc[stderr]: Logged Item: Invalid operation for device '0'Operations Manager 3.x
Platform-Automation-Toolkit version 5.2.0
Pipeline was hitting below error due to govc CLI known issue https://github.com/vmware/govmomi/issues/3441
Executing: "govc vm.disk.change -vm.ipath=/sandbox-OpsManager -size=180G"
govc[stderr]: govc: error resizing main disk
govc[stderr]: Logged Item: Invalid operation for device '0'
Issue is fixed in govc CLI version 0.39.x.
This govc CLI version is included in "Platform Automation Toolkit for Tanzu" version 5.2.1 or later.
So one has to update the pipeline to use Platform Automation Toolkit version 5.2.1 or later.