How to create an image from a snapshot
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An Instance
- At least one snapshot
Creating an image from a snapshot via the Scaleway console
- Click CPU & GPU Instances in the Compute section of the side menu. The Instances page displays.
- Click the Images tab. A list of your images displays.
- Click + Create image. The image creation page displays.
- Choose the Availability Zone in which you want your image to be created.
- Enter a name for your image and select the image architecture.
- Select the snapshot from which you want to create your image in the drop-down box.
- Click Create image to create your image.
Creating an image via the Scaleway CLI
You can also create an image using the Scaleway CLI. Use the following command:
scw instance image create snapshot-id="$SCW_VOLUME_ID_1" additional-volumes.0.id="$SCW_VOLUME_ID_2" arch="x86_64"
- Replace
$SCW_VOLUME_ID_1
with the ID of the snapshot or volume you want to use as the root volume. - Replace
$SCW_VOLUME_ID_2
with the ID of any additional volume to be included. - Ensure the architecture (
arch
) is set to a valid value (e.g.,x86_64
).
Creating an image via the Scaleway API
You can also create an image using the Scaleway API. Use the following curl
command:
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/images" \
--header "Content-Type: application/json" \
--header "X-Auth-Token: $SCW_SECRET_KEY" \
--data '{
"root_volume": "'$SCW_VOLUME_ID_1'",
"arch": "x86_64",
"name": "image_name",
"extra_volumes": {
"1": {"id":"'$SCW_VOLUME_ID_2'"}
},
"project": "'$SCW_PROJECT_ID'"
}'
- Replace
$SCW_VOLUME_ID_1
with the ID of the snapshot or volume to use as the root volume. - Replace
$SCW_VOLUME_ID_2
with the ID of any additional volume. - Use
$SCW_PROJECT_ID
for the ID of your project. - Ensure the architecture (
arch
) is set to a valid value (e.g.,x86_64
).
See Also
Still need help?Create a support ticket