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 API to create preemptible VMs #925

Closed
gabipetrovay opened this issue Nov 5, 2015 · 3 comments
Closed

Add API to create preemptible VMs #925

gabipetrovay opened this issue Nov 5, 2015 · 3 comments
Assignees
Labels
api: compute Issues related to the Compute Engine API. type: question Request for information or clarification. Not an issue.

Comments

@gabipetrovay
Copy link

The createVM API method does not seem to expose the --preemptible option of the command line tool:

gcloud compute instances create --preemptible ...

Is this achieved in another way or is it missing?

@stephenplusplus
Copy link
Contributor

Give this a shot:

zone.createVM('new-vm-name', {
  // ... options ...
  scheduling: {
    preemptible: true
  }
}, function(err, vm, operation, apiResponse) {});

The second argument to createVM is the same object that is outlined here: https://cloud.google.com/compute/docs/reference/latest/instances -- so in theory, if that supports what you need, so do we :)

@stephenplusplus stephenplusplus added api: compute Issues related to the Compute Engine API. type: question Request for information or clarification. Not an issue. labels Nov 5, 2015
@stephenplusplus
Copy link
Contributor

Going to close. Thanks for asking. Please re-open if this didn't resolve the issue.

@gabipetrovay
Copy link
Author

Yes, with the preemptible: true option it works. Thanks!

sofisl pushed a commit that referenced this issue Jan 24, 2023
* chore(main): release 5.0.2

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Jan 25, 2023
* chore(main): release 5.0.2

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants