Skip to content

Commit 827c18d

Browse files
bene2k1jcirinosclwycgilb-scaleway
authored
fix(ins): migration sbs (#3983)
* fix(ins): migration sbs * feat(ins): update image create feature * fix(ins): fix validation date * Update compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx Co-authored-by: Jessica <[email protected]> * Apply suggestions from code review * fix(ins): update wording * Apply suggestions from code review Co-authored-by: cgilb-scaleway <[email protected]> --------- Co-authored-by: Jessica <[email protected]> Co-authored-by: cgilb-scaleway <[email protected]>
1 parent 8d25c43 commit 827c18d

File tree

2 files changed

+125
-34
lines changed

2 files changed

+125
-34
lines changed

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

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to create an image from a snapshot of a Scaleway Instance.
88
tags: image backup snapshot instance
99
dates:
10-
validation: 2024-08-26
10+
validation: 2024-11-15
1111
posted: 2021-08-05
1212
categories:
1313
- compute
@@ -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 Storage volumes (`l_ssd`)
55+
- Block Storage Low Latency volumes (`sbs`)
56+
- Block Storage legacy (`b_ssd`) volumes (deprecated).
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+
"project": "'$SCW_PROJECT_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_PROJECT_ID` for the ID of your project.
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 Storage volumes (`l_ssd`)
86+
- Block Storage Low Latency volumes (`sbs`)
87+
- Block Storage legacy (`b_ssd`) volumes (deprecated).
88+
</Message>
89+

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

Lines changed: 71 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ content:
77
paragraph: This guide provides step-by-step instructions to help you migrate your existing Block Storage volumes and snapshots to Scaleway's new Block Storage management system.
88
tags: instance snapshot volume b_ssd sbs
99
dates:
10-
validation: 2024-10-10
10+
validation: 2024-11-15
1111
posted: 2024-08-07
1212
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-
While the characteristics of your migrated volumes and snapshots will remain unchanged, Scaleway's new storage management system will now manage them.
18-
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](/storage/block/quickstart/) instead of Compute.
21+
22+
During migration, unified snapshots will be converted into [Block Storage Low Latency](/storage/block/) snapshots and removed from Compute. If a unified snapshot is part of an image, it will be replaced by the corresponding Block Storage Low Latency 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).
1925

2026
<Message type="tip">
2127
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.
@@ -35,45 +41,64 @@ This guide provides the steps needed to migrate your volumes and snapshots using
3541
<Tabs>
3642
<TabsTab label="CLI">
3743
<Message type="note">
38-
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.
3945
</Message>
40-
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:
4147
```
4248
$ scw instance volume list
4349
ID STATE SERVER ID SERVER NAME
4450
369feb53-165f-437d-875e-188725df462b available
4551
```
46-
2. Plan the volume migration with the `scw instance volume plan-migration <VOLUME_ID>` command. This command provides the state of the volume and a 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.
4753
```
4854
$ scw instance volume plan-migration 369feb53-165f-437d-875e-188725df462b
49-
Volume.ID 369feb53-165f-437d-875e-188725df462b
50-
Volume.Name vol-peaceful-davinci
51-
Volume.Size 25 GB
52-
Volume.VolumeType b_ssd
53-
Volume.CreationDate 3 minutes ago
54-
Volume.ModificationDate 3 minutes ago
55-
Volume.Organization 27e53d15-cc73-440e-956c-40560076e3d7
56-
Volume.Project 27e53d15-cc73-440e-956c-40560076e3d7
57-
Volume.Server.ID 177c6ed5-e999-4cc7-b152-8ce56217579c
58-
Volume.Server.Name scw-naughty-robinson
59-
Volume.State available
60-
Volume.Zone fr-par-1
61-
ValidationKey 30d129ca895c4cd59f4c429e12dab300
55+
Volume.ID 369feb53-165f-437d-875e-188725df462b
56+
Volume.Name vol-peaceful-davinci
57+
Volume.Size 25 GB
58+
Volume.VolumeType b_ssd
59+
Volume.CreationDate 2 weeks ago
60+
Volume.ModificationDate 2 weeks ago
61+
Volume.Organization 4a2e00bf-5126-43ce-9b09-be943c619139
62+
Volume.Project 4a2e00bf-5126-43ce-9b09-be943c619139
63+
Volume.Server.ID 177c6ed5-e999-4cc7-b152-8ce56217579c
64+
Volume.Server.Name scw-naughty-robinson
65+
Volume.State available
66+
Volume.Zone fr-par-1
67+
Snapshots.0.ID a377afe5-a9a3-4706-b8c2-8d1c247a620f
68+
Snapshots.0.Name image-scw-quirky-torvalds_snap_0
69+
Snapshots.0.Organization 4a2e00bf-5126-43ce-9b09-be943c619139
70+
Snapshots.0.Project 4a2e00bf-5126-43ce-9b09-be943c619139
71+
Snapshots.0.VolumeType b_ssd
72+
Snapshots.0.Size 10 GB
73+
Snapshots.0.State available
74+
Snapshots.0.CreationDate 2 weeks ago
75+
Snapshots.0.ModificationDate 5 days ago
76+
Snapshots.0.Zone fr-par-1
77+
Snapshots.1.ID 384799c2-c4dd-40ab-bd65-ed95cd7b4d5c
78+
Snapshots.1.Name snap-eloquent-edison
79+
Snapshots.1.Organization 4a2e00bf-5126-43ce-9b09-be943c619139
80+
Snapshots.1.Project 4a2e00bf-5126-43ce-9b09-be943c619139
81+
Snapshots.1.VolumeType b_ssd
82+
Snapshots.1.Size 10 GB
83+
Snapshots.1.State available
84+
Snapshots.1.CreationDate 2 weeks ago
85+
Snapshots.1.ModificationDate 5 days ago
86+
Snapshots.1.Zone fr-par-1
87+
ValidationKey 30d129ca895c4cd59f4c429e12dab300
6288
```
6389
3. Execute the migration using the `scw instance volume apply-migration <VOLUME_ID> validation-key=<VALIDATION_KEY> zone=<VOLUME_ZONE>` command.
6490
```
6591
$ scw instance volume apply-migration 369feb53-165f-437d-875e-188725df462b validation-key=30d129ca895c4cd59f4c429e12dab300 zone=fr-par-1
6692
✅ Success
6793
```
6894
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.
69-
7095
</TabsTab>
7196
<TabsTab label="API">
7297
<Message type="note">
7398
When you migrate a volume using the API, the volume and any snapshots created from the volume will be migrated.
7499
</Message>
75100

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

78103
```bash
79104
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \
@@ -84,9 +109,9 @@ This guide provides the steps needed to migrate your volumes and snapshots using
84109
}"
85110
```
86111

87-
The response includes the volume and any snapshots created from the volume that will be migrated. It also returns a `validation_key`.
112+
This request returns the volume and its snapshots that will be migrated, along with a unique `ValidationKey` required to start the migration.
88113

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

91116
```bash
92117
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \
@@ -111,15 +136,27 @@ This guide provides the steps needed to migrate your volumes and snapshots using
111136
<Message type="note">
112137
When you migrate a snapshot, the source volume of the snapshot and any snapshots created from this volume will also be migrated.
113138
</Message>
114-
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:
115140
```
116141
$ scw instance snapshot list
117142
ID NAME
118143
a377afe5-a9a3-4706-b8c2-8d1c247a620f snap-eloquent-edison
119144
```
120-
2. Plan the migration with the `scw instance snapshot plan-migration <SNAPSHOT_ID>` command. This command returns the state of the snapshot and a unique `ValidationKey`, which is necessary 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`.
121146
```
122147
$ scw instance snapshot plan-migration a377afe5-a9a3-4706-b8c2-8d1c247a620f
148+
Volume.ID 369feb53-165f-437d-875e-188725df462b
149+
Volume.Name vol-peaceful-davinci
150+
Volume.Size 25 GB
151+
Volume.VolumeType b_ssd
152+
Volume.CreationDate 2 weeks ago
153+
Volume.ModificationDate 2 weeks ago
154+
Volume.Organization 4a2e00bf-5126-43ce-9b09-be943c619139
155+
Volume.Project 4a2e00bf-5126-43ce-9b09-be943c619139
156+
Volume.Server.ID 177c6ed5-e999-4cc7-b152-8ce56217579c
157+
Volume.Server.Name scw-naughty-robinson
158+
Volume.State available
159+
Volume.Zone fr-par-1
123160
Snapshots.0.ID a377afe5-a9a3-4706-b8c2-8d1c247a620f
124161
Snapshots.0.Name image-scw-quirky-torvalds_snap_0
125162
Snapshots.0.Organization 4a2e00bf-5126-43ce-9b09-be943c619139
@@ -140,11 +177,11 @@ This guide provides the steps needed to migrate your volumes and snapshots using
140177
Snapshots.1.CreationDate 2 weeks ago
141178
Snapshots.1.ModificationDate 5 days ago
142179
Snapshots.1.Zone fr-par-1
143-
ValidationKey b36f7bcc21d344d783d4cbb27536bfad
180+
ValidationKey 30d129ca895c4cd59f4c429e12dab300
144181
```
145182
3. Execute the migration using the `scw instance snapshot apply-migration <SNAPSHOT_ID> validation-key=<VALIDATION_KEY> zone=<SNAPSHOT_ZONE>` command.
146183
```
147-
$ scw instance snapshot apply-migration a377afe5-a9a3-4706-b8c2-8d1c247a620f validation-key=b36f7bcc21d344d783d4cbb27536bfad zone=fr-par-1
184+
$ scw instance snapshot apply-migration a377afe5-a9a3-4706-b8c2-8d1c247a620f validation-key=30d129ca895c4cd59f4c429e12dab300 zone=fr-par-1
148185
✅ Success.
149186
```
150187
The snapshot migration is complete. You can now manage the migrated snapshot from the [Block Storage Snapshot section](https://console.scaleway.com/block-storage/volumes) in the Scaleway console.
@@ -154,7 +191,7 @@ This guide provides the steps needed to migrate your volumes and snapshots using
154191
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.
155192
</Message>
156193

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

159196
```bash
160197
curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \
@@ -165,9 +202,9 @@ This guide provides the steps needed to migrate your volumes and snapshots using
165202
}"
166203
```
167204

168-
The response includes the source volume of the snapshot and any snapshots created from this volume, including the `snapshot_id` provided by the user. It also returns a `validation_key`.
205+
This request returns the source volume and any related snapshots that will be migrated, along with a unique `ValidationKey`.
169206

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

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

184221
## Going further
185222

186-
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)