nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

gcp(volumes): ops volume create-image/create-from (GCP only) #1547

Closed rinor closed 10 months ago

rinor commented 10 months ago

Usage: ops volume create-image [flags]

Flags: -d, --data string volume image data source -h, --help help for create-image -s, --size string volume image size when restored onto a persistent disk


---

- **ops volume create-from**

$ ops volume create-from --help create volume from existing image

Usage: ops volume create-from [flags]

Flags: -h, --help help for create-from -s, --size string volume image size when restored onto a persistent disk



---

**Note**: Don't like the api very much, but at the same time didn't want to touch the existing commands. Needed this so drafting it here for feedback (or in case someone else needs it). 
eyberg commented 10 months ago

not sure of the use-case here? can you elaborate? you want to be able to create an image from an existing volume and create a volume from an image?

rinor commented 10 months ago

The idea is to create a volume image and later on create different instance disk volumes from that same image that is already uploaded and available. I.e I'm testing/creating 100 instances that need a persistent volume and don't see a reason to locally create/upload the same thing 100 times.

eyberg commented 10 months ago

ah ok, GCP has a disk clone feature that might be a better fit for that? https://cloud.google.com/compute/docs/disks/create-disk-from-source

rinor commented 10 months ago

closing this until I find a better/less intrusive format/api