Skip to content

Add API to create preemptible VMs #925

Description

@gabipetrovay

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?

Activity

  1. stephenplusplus commented on Nov 5, 2015

    @stephenplusplus
    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 :)

  2. added
    api: computeIssues related to the Compute Engine API.
    type: questionRequest for information or clarification. Not an issue.
    on Nov 5, 2015
  3. stephenplusplus commented on Nov 9, 2015

    @stephenplusplus
    Contributor

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

  4. gabipetrovay commented on Nov 9, 2015

    @gabipetrovay
    Author

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

  5. 1 remaining item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: computeIssues related to the Compute Engine API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions