hetznercloud / cli

A command-line interface for Hetzner Cloud
MIT License
1.12k stars 80 forks source link

Create server from snapshot #305

Closed JKamsker closed 3 years ago

JKamsker commented 3 years ago

Is it possible to create a server from a snapshot? If yes, how do i do that? I didnt find a way to accomplish that.

Thanks in advance

LKaemmerling commented 3 years ago

Hey @JKamsker,

You can use the --image flag with the ID of the snapshot.



hcloud image list

# get the ID from your snapshot

hcloud server create --name test --image <snapshotID> [..]
JKamsker commented 3 years ago

Ah ok, i didn't know that "hcloud image list" shows snapshots aswell and "--image" does only accept the ids, not the names

Thanks

LKaemmerling commented 3 years ago

@JKamsker --image also support names, but Snapshot does not have names. Currently only images with type system (Ubuntu-20.04 as a sample) have names :)