Skip to content

Commit 25ce548

Browse files
committed
feat(ins): update image create feature
1 parent ba7a83d commit 25ce548

File tree

2 files changed

+76
-18
lines changed

2 files changed

+76
-18
lines changed

compute/instances/how-to/create-image-from-snapshot.mdx

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ categories:
2020
- An [Instance](/compute/instances/how-to/create-an-instance/)
2121
- At least one [snapshot](/compute/instances/how-to/create-a-snapshot/)
2222

23+
## Creating an image from a snapshot via the Scaleway console
2324

2425
1. Click **Instances** in the **Compute** section of the side menu. The [Instances page](https://console.scaleway.com/instance/servers) displays.
2526
2. Click the **Images** tab. A list of your images displays.
26-
3. Hover over the <Icon name="plus"/> button to **Create image**. The overview page displays.
27+
3. Hover over the <Icon name="plus" /> button to **Create image**. The overview page displays.
2728
4. Choose the **Availability Zone** in which you want your image to be created.
2829
5. Enter a **name** for your image.
2930
<Message type="note">
@@ -35,3 +36,54 @@ categories:
3536
<Message type="tip">
3637
You can also create an image from the **Snapshots** dashboard by clicking <Icon name="more"/> next to the snapshot from which you want to create an image. Click **Image from snapshot**. A new tab opens: enter a name for your image. Then click **Create image from snapshot**.
3738
</Message>
39+
40+
## Creating an image via the Scaleway CLI
41+
42+
You can also create an image using the [Scaleway CLI](/developer-tools/scaleway-cli/quickstart/). Use the following command:
43+
44+
```bash
45+
scw instance image create snapshot-id="$SCW_VOLUME_ID_1" additional-volumes.0.id="$SCW_VOLUME_ID_2" arch="x86_64"
46+
```
47+
48+
- Replace `$SCW_VOLUME_ID_1` with the ID of the snapshot or volume you want to use as the root volume.
49+
- Replace `$SCW_VOLUME_ID_2` with the ID of any additional volume to be included.
50+
- Ensure the architecture (`arch`) is set to a valid value (e.g., `x86_64`).
51+
52+
<Message type="note">
53+
Supported volume IDs include:
54+
- Local SSD (`l_ssd`)
55+
- Block SSD (`b_ssd`)
56+
- Block Storage Low Latency (`sbs`) volumes.
57+
</Message>
58+
59+
## Creating an image via the Scaleway API
60+
61+
You can also create an image using the [Scaleway API](https://www.scaleway.com/en/developers/api/instance/#path-images-create-an-instance-image). Use the following `curl` command:
62+
63+
```bash
64+
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/images" \
65+
--header "Content-Type: application/json" \
66+
--header "X-Auth-Token: $SCW_SECRET_KEY" \
67+
--data '{
68+
"root_volume": "'$SCW_VOLUME_ID_1'",
69+
"arch": "x86_64",
70+
"name": "image_name",
71+
"extra_volumes": {
72+
"1": {"id":"'$SCW_VOLUME_ID_2'"}
73+
},
74+
"organization": "'$SCW_ORG_ID'"
75+
}'
76+
```
77+
78+
- Replace `$SCW_VOLUME_ID_1` with the ID of the snapshot or volume to use as the root volume.
79+
- Replace `$SCW_VOLUME_ID_2` with the ID of any additional volume.
80+
- Use `$SCW_ORG_ID` for the ID of your organization.
81+
- Ensure the architecture (`arch`) is set to a valid value (e.g., `x86_64`).
82+
83+
<Message type="tip">
84+
Supported volume IDs include:
85+
- Local SSD (`l_ssd`)
86+
- Block SSD (`b_ssd`)
87+
- Block Storage Low Latency (`sbs`) volumes.
88+
</Message>
89+

compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ categories:
1313
- compute
1414
---
1515

16-
Scaleway is transitioning the management of Block Storage volumes and snapshots from Compute teams to Storage teams to enhance performance and reliability.
17-
The characteristics of your migrated volumes and snapshots will remain unchanged, it is seamless even for a volume attached to a running instance, these resources will be managed from Compute to [Storage](https://www.scaleway.com/en/docs/storage/block/quickstart/).
18-
The unified snapshot migration will result in a snapshot in Block Storage and the deletion of the unified snapshot in Compute. If the unified snapshot is part of an image, it's replaced by the snapshot of Block Storage.
19-
This guide provides the steps needed to migrate your volumes and snapshots using either the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool (recommended) or via the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage).
16+
To enhance performance and reliability, Scaleway is transitioning the management of Block Storage volumes and snapshots from Compute to Storage.
17+
18+
The migration process ensures that the characteristics of your volumes and snapshots remain unchanged, even for volumes attached to running Instances.
19+
20+
After migration, these resources will be managed under [Storage](https://www.scaleway.com/en/docs/storage/block/quickstart/) instead of Compute.
21+
22+
During migration, unified snapshots will be converted into Block Storage snapshots and removed from Compute. If a unified snapshot is part of an image, it will be replaced by the corresponding Block Storage snapshot.
23+
24+
This guide offers step-by-step instructions to migrate your volumes and snapshots using either the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool (recommended) or the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage).
2025

2126
<Message type="tip">
2227
The easiest way to migrate your Block Storage volumes and snapshots is by using the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool.
@@ -36,15 +41,15 @@ This guide provides the steps needed to migrate your volumes and snapshots using
3641
<Tabs>
3742
<TabsTab label="CLI">
3843
<Message type="note">
39-
When you migrate a volume, the volume and any snapshots created from the volume will be migrated.
44+
When you migrate a volume, the volume and any snapshots created from it will be migrated as well.
4045
</Message>
41-
1. Retrieve the ID of your Block Storage volume using the `scw instance volume list` command. This command returns a list of your volumes, as shown below:
46+
1. Use the following command to list your Block Storage volumes and retrieve the ID of the volume you wish to migrate:
4247
```
4348
$ scw instance volume list
4449
ID STATE SERVER ID SERVER NAME
4550
369feb53-165f-437d-875e-188725df462b available
4651
```
47-
2. Plan the volume migration with the `scw instance volume plan-migration <VOLUME_ID>` command. It returns the volume and its snapshots that will be migrated. It also returns an unique `ValidationKey`, which is needed to start the migration.
52+
2. Plan the volume migration using the `scw instance volume plan-migration <VOLUME_ID>` command. This command returns the volume and its snapshots that will be migrated, along with a unique `ValidationKey` required to start the migration.
4853
```
4954
$ scw instance volume plan-migration 369feb53-165f-437d-875e-188725df462b
5055
Volume.ID 369feb53-165f-437d-875e-188725df462b
@@ -87,14 +92,13 @@ This guide provides the steps needed to migrate your volumes and snapshots using
8792
✅ Success
8893
```
8994
The volume migration is complete. You can now manage the migrated volume from the [Block Storage Volumes section](https://console.scaleway.com/block-storage/volumes) in the Scaleway console.
90-
9195
</TabsTab>
9296
<TabsTab label="API">
9397
<Message type="note">
9498
When you migrate a volume using the API, the volume and any snapshots created from the volume will be migrated.
9599
</Message>
96100

97-
1. Plan the migration by using the following `curl` command:
101+
1. Plan the migration by sending a `POST` request to the Scaleway API:
98102

99103
```bash
100104
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \
@@ -105,9 +109,9 @@ This guide provides the steps needed to migrate your volumes and snapshots using
105109
}"
106110
```
107111

108-
It returns the volume and its snapshots that will be migrated. It also returns an unique `ValidationKey`, which is needed to start the migration.
112+
This request returns the volume and its snapshots that will be migrated, along with a unique `ValidationKey` required to start the migration.
109113

110-
2. Confirm the migration by using the following `curl` command:
114+
2. Confirm and execute the migration by sending another `POST` request:
111115

112116
```bash
113117
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \
@@ -132,13 +136,13 @@ This guide provides the steps needed to migrate your volumes and snapshots using
132136
<Message type="note">
133137
When you migrate a snapshot, the source volume of the snapshot and any snapshots created from this volume will also be migrated.
134138
</Message>
135-
1. Retrieve the ID of your snapshot using the `scw instance snapshot list` command. This command provides an output similar to the following:
139+
1. Use the following command to list your snapshots and retrieve the ID of the snapshot you wish to migrate:
136140
```
137141
$ scw instance snapshot list
138142
ID NAME
139143
a377afe5-a9a3-4706-b8c2-8d1c247a620f snap-eloquent-edison
140144
```
141-
2. Plan the migration with the `scw instance snapshot plan-migration <SNAPSHOT_ID>` command. It returns the source volume of the snapshot and the volume snapshots that will be migrated. It also returns an unique `ValidationKey`, which is needed to start the migration.
145+
2. Plan the snapshot migration using the `scw instance snapshot plan-migration <SNAPSHOT_ID>` command. This command returns the source volume of the snapshot and any related snapshots that will be migrated, along with a unique `ValidationKey`.
142146
```
143147
$ scw instance snapshot plan-migration a377afe5-a9a3-4706-b8c2-8d1c247a620f
144148
Volume.ID 369feb53-165f-437d-875e-188725df462b
@@ -187,7 +191,7 @@ This guide provides the steps needed to migrate your volumes and snapshots using
187191
When you migrate a snapshot using the API, the source volume of the snapshot and any snapshots created from this volume will also be migrated.
188192
</Message>
189193

190-
1. Plan the migration by using the following `curl` command:
194+
1. Plan the migration by sending a `POST` request to the Scaleway API:
191195

192196
```bash
193197
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \
@@ -198,9 +202,9 @@ This guide provides the steps needed to migrate your volumes and snapshots using
198202
}"
199203
```
200204

201-
It returns the source volume of the snapshot and the volume snapshots that will be migrated. It also returns an unique `ValidationKey`, which is needed to start the migration.
205+
This request returns the source volume and any related snapshots that will be migrated, along with a unique `ValidationKey`.
202206

203-
2. Confirm the migration using the following `curl` command:
207+
2. Confirm and execute the migration by sending another `POST` request:
204208

205209
```bash
206210
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \
@@ -216,4 +220,6 @@ This guide provides the steps needed to migrate your volumes and snapshots using
216220

217221
## Going further
218222

219-
To learn more about managing your migrated Block Storage volumes from the Scaleway console, refer to the [Block Storage - Console documentation](/storage/block/quickstart/). Additionally, you can manage your Block Storage volumes using the [Scaleway Block Storage API](https://www.scaleway.com/en/developers/api/block/).
223+
To learn more about managing your migrated Block Storage volumes and snapshots from the Scaleway console, refer to the [Block Storage Quickstart Guide](/storage/block/quickstart/). Additionally, you can explore advanced features using the [Scaleway Block Storage API](https://www.scaleway.com/en/developers/api/block/).
224+
225+
If you encounter any issues during migration, contact [Scaleway's support team](https://console.scaleway.com/support/tickets) for assistance.

0 commit comments

Comments
 (0)