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

Add storage profile related api and govc helpers #3466

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

dougm
Copy link
Member

@dougm dougm commented Jun 11, 2024

api: add pbm.DatastoreMap for finding compatible Datastores

  • add pbm.ProfileMap for finding storage profiles by name

govc: add vm.create '-profile' and '-place' flags

api: add storage_specs field to Namespace related structures

govc: add '-storage' flag to namespace.create and namespace.update commands

  • The '-cluster', '-library' and '-storage' flags can be specified by name, rather than ID
  • The namespace.info command outputs cluster, library and storage by name, rather than ID

@dougm
Copy link
Member Author

dougm commented Jun 11, 2024

Example of using -place to see which Datastore is recommended:

% govc vm.create -place -net "VM Network" -cluster $cluster -iso library:/govc/ubuntu-14.04.6-server-amd64/*.iso ubuntu
Target:       /test-vpx-1717673857-26202-wcp.wcp-sanity/host/test-vpx-1717673857-26202-wcp.wcp-sanity-cluster
  Datastore:  /test-vpx-1717673857-26202-wcp.wcp-sanity/datastore/sharedVmfs-0
  Pool:       /test-vpx-1717673857-26202-wcp.wcp-sanity/host/test-vpx-1717673857-26202-wcp.wcp-sanity-cluster/Resources
  Host:       /test-vpx-1717673857-26202-wcp.wcp-sanity/host/test-vpx-1717673857-26202-wcp.wcp-sanity-cluster/10.182.172.85

Note that adding -xml or -dump flags will output the complete spec input and recommendations response.

dilyar85
dilyar85 previously approved these changes Jun 12, 2024
Copy link
Member

@dilyar85 dilyar85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a minor comment left. Thanks again for adding these supports in both api and govc!

pbm/pbm_util.go Outdated Show resolved Hide resolved
dougm added 4 commits June 12, 2024 09:40
- add pbm.ProfileMap for finding storage profiles by name
…mmands

- The '-cluster', '-library' and '-storage' flags can be specified by name, rather than ID
- The namespace.info command outputs cluster, library and storage by name, rather than ID
Copy link
Member

@dilyar85 dilyar85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dougm dougm merged commit 420dc85 into vmware:main Jun 12, 2024
10 checks passed
@dougm dougm deleted the storage-helpers branch June 12, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants