govmomi
govmomi copied to clipboard
[BUG] Invalid operation for device '0' in 0.37.2
Describe the bug Unable to expand disk in version 0.37.2.
0.37.1 works.
To Reproduce Steps to reproduce the behavior:
-
podman run --rm -it -e GOVC_URL -e GOVC_USERNAME -e GOVC_PASSWORD vmware/govc:v0.37.2 /govc vm.disk.change -vm "${VM_NAME}" -disk.key 2000 -size "20G"
- Output of the command:
/govc: error resizing main disk Logged Item: Invalid operation for device '0'.
- Do the same with v0.37.1 and the disk will be resized without an error.
Expected behavior Disk should be resized.
Affected version 0.37.2 is affected and anything older works. I expect the problem is with commit e6fe159bf77e743d815f2204598f53f1b1d21b7c.
Screenshots/Debug Output
I think the problem is the difference in the following SOAP call. Everything else in the trace output seems the same.
$ diff -u --color /tmp/x1 /tmp/x2
--- /tmp/x1 2024-05-17 14:26:28.835915920 +0200
+++ /tmp/x2 2024-05-17 14:26:38.166031057 +0200
@@ -28,7 +28,7 @@
</backing>
<controllerKey>1000</controllerKey>
<unitNumber>0</unitNumber>
- <capacityInKB>36700160</capacityInKB>
+ <capacityInKB>0</capacityInKB>
<capacityInBytes>37580963840</capacityInBytes>
<shares>
<shares>1000</shares>
Additional context vCenter version: 8.0.2.00100 (Build: 22617221)