mitchellh / vagrant-google

Vagrant provider for GCE.
Apache License 2.0
334 stars 100 forks source link

custom-cpu, custom-memory and GPU #205

Open theoseo opened 6 years ago

theoseo commented 6 years ago

Hi, According to gcloud, it is now support custom-cpu and custom-memory. This configuration is really important related to #168 GPU setting. Thus, I would like to add this. Is it possible?

gcloud compute instances create example-instance --custom-cpu 4 --custom-memory 5
Temikus commented 6 years ago

Thanks for using vagrant-google @suhongs! :)

So, this is actually already supported, just specify:

google.machine_type = "custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY_IN_MEGABYTES"

, for example:

google.machine_type = "custom-4-5120"

The underlying API is actually just specifying a different machine type. The --custom-cpu 4 --custom-memory 5 should just be a convenience method.

If something doesn't work however - no worries, just let me know!

theoseo commented 6 years ago

Thanks for your reply. I will try this. I would like to ask one more thing. Is there any example how to set GPU? According to #168, you implemented it in fog. I can not find how to set it in Vagrant. Thanks in advance for your help!

Temikus commented 6 years ago

@suhongs That is not implemented yet, I'm afraid. Fog supports it but plumbing is still needed for vagrant. This seems to be a popular request so I'll try to take a look into it this week.

theoseo commented 6 years ago

@Temikus It sounds great. If you need any test, I will try it. Thanks a lot!

billmetangmo commented 6 years ago

+1