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] How to provide a size when creating a datastore #3519

Closed
HaruChebrolu opened this issue Aug 12, 2024 · 4 comments · Fixed by #3534
Closed

[BUG] How to provide a size when creating a datastore #3519

HaruChebrolu opened this issue Aug 12, 2024 · 4 comments · Fixed by #3534

Comments

@HaruChebrolu
Copy link
Contributor

Describe the bug
I have a disk of size 200G, but I want to create a datastore using only 100G of it. For this, I can specify size while creating datastore. And I don't see an option to provide a size for datastore.create command

Screenshot 2024-08-12 at 1 28 27 PM
Copy link
Contributor

Howdy 🖐   HaruChebrolu ! 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.

@dougm
Copy link
Member

dougm commented Aug 13, 2024

Right, govc datastore.create does not provide that option. It uses QueryVmfsDatastoreCreateOptions for the VmfsDatastoreCreateSpec.
Enhancement PRs are welcome of course.
Code is here:

options, err := ds.QueryVmfsDatastoreCreateOptions(ctx, disk.DevicePath)

@HaruChebrolu
Copy link
Contributor Author

HaruChebrolu commented Aug 15, 2024

Thanks for your quick response @dougm
I am happy to contribute an enhancement PR. Just a question, inorder to add datastoreSize parameter, do I need to add it in VmfsdataStoreCreateSpec or QueryVmfsDatastoreCreateOptionsRequestType

@dougm
Copy link
Member

dougm commented Aug 15, 2024

Great. I suggest following the doc links above and expect it would be VmfsDatastoreCreateSpec input, but I don't know where. You could also try Developer Center -> Code Capture in vCenter, record the UI operation for your use-case and captured code may provide some hints. There might also be an existing example in another language, using pyvmomi or PowerShell, if so we can port what we need from such an example to Go.

HaruChebrolu added a commit to HaruChebrolu/govmomi that referenced this issue Aug 29, 2024
Closes: vmware#3519
Signed-off-by: Chebrolu <hchebrol@redhat.com>
HaruChebrolu added a commit to HaruChebrolu/govmomi that referenced this issue Aug 29, 2024
Closes: vmware#3519
Signed-off-by: Chebrolu <hchebrol@redhat.com>
dougm pushed a commit to HaruChebrolu/govmomi that referenced this issue Aug 29, 2024
Closes: vmware#3519
Signed-off-by: Chebrolu <hchebrol@redhat.com>
dougm pushed a commit to HaruChebrolu/govmomi that referenced this issue Aug 29, 2024
Closes: vmware#3519
Signed-off-by: Chebrolu <hchebrol@redhat.com>
@dougm dougm closed this as completed in 06dcf31 Aug 29, 2024
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

Successfully merging a pull request may close this issue.

2 participants