Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Invalid operation for device '0' in 0.37.2 #3441

Open
fpiecka opened this issue May 17, 2024 · 2 comments
Open

[BUG] Invalid operation for device '0' in 0.37.2 #3441

fpiecka opened this issue May 17, 2024 · 2 comments

Comments

@fpiecka
Copy link

fpiecka commented May 17, 2024

Describe the bug
Unable to expand disk in version 0.37.2.

0.37.1 works.

To Reproduce
Steps to reproduce the behavior:

  1. 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"
  2. Output of the command:
    /govc: error resizing main disk
    Logged Item:  Invalid operation for device '0'.
    
  3. 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 e6fe159.

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)

Copy link
Contributor

Howdy 🖐   fpiecka ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

@abhay-krishna
Copy link

abhay-krishna commented May 20, 2024

@fpiecka We also faced the same issue. We were also previously using v0.37.1 which was successful, but when we switched to v0.37.2, the disk resize started failing. We are currently working around it with a patch to govmomi, that reverts setting the capacityInKB value to 0. So I believe deprecating capacityInKB by setting it to 0 (as is being done in e6fe159) has some unintended consequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants