-
Notifications
You must be signed in to change notification settings - Fork 896
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] VirtualDisk's capacityInBytes not works for vm.AddDevice #2805
Comments
Howdy 🖐 beorereleverion ! 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 |
Let's clarify one thing - did you use:
or you've written code similar to |
I wrote a code where capacityInBytes is used. That doesn't work. |
Config spec helpers have logic to clear the DiskFileOperation for existing disks, when 'CapacityInKB' is '0'. But we also need to check 'Capacity'. Refactor some duplicate code into a separate function. Closes vmware#2805
Config spec helpers have logic to clear the DiskFileOperation for existing disks, when 'CapacityInKB' is '0'. But we also need to check 'Capacity'. Refactor some duplicate code into a separate function. Closes vmware#2805
Describe the bug
VirtualDisk's capacityInKB attribute is deprecated in vSphere API 5.5 but without this vm.AddDevice doesn't work
Disk didn't created.
To Reproduce
create new disk for vm with funciton like in govc(https://github.com/vmware/govmomi/blob/master/govc/vm/disk/create.go#L166)
but change string 166 disk.CapacityInBytes = int64(cmd.Bytes)
Expected behavior
disk created and added to VM
Affected version
github.com/vmware/govmomi v0.27.1
The text was updated successfully, but these errors were encountered: