Skip to content

Commit 53a1f80

Browse files
committed
docs(ins): content
1 parent 61d2ef4 commit 53a1f80

File tree

1 file changed

+27
-46
lines changed

1 file changed

+27
-46
lines changed

pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx

+27-46
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ categories:
1212
tags: instance type production production-optimized range POP2 ENT1
1313
---
1414

15+
Migrating virtual machines from one platform to another can be a complex process, especially when moving from a proprietary environment like VMware to a cloud-based infrastructure like Scaleway.
16+
However, with the right tools and a step-by-step approach, you can successfully migrate your VMware virtual machines to Scaleway Instances, taking advantage of the scalability, flexibility, and cost-effectiveness of the cloud.
17+
18+
This guide will walk you through the process of migrating your VMware virtual machines to Scaleway Instances, covering everything from preparing your Scaleway Instance to managing the migration, converting VMDK files to QCOW2,
19+
uploading the QCOW2 image to Scaleway Object Storage, and finally, creating an image from the imported volume and booting an instance with the image.
20+
By following these steps, you'll be able to seamlessly migrate your VMware virtual machines to Scaleway Instances, ensuring minimal downtime and optimal performance.
21+
1522
## Validating the inventory of machines to migrate
1623

1724
Identify the virtual machines (VMs) to migrate on your VMware plattform:
@@ -23,7 +30,7 @@ Identify the virtual machines (VMs) to migrate on your VMware plattform:
2330

2431
## Preparing a Scaleway Instance to manage the migration
2532

26-
1. [Create a new instance](/instances/how-to/create-an-instance/) and log into it [using SSH](/instances/how-to/connect-to-instance/).
33+
1. [Create a new Instance](/instances/how-to/create-an-instance/) to handle the migration and log into it [using SSH](/instances/how-to/connect-to-instance/).
2734
2. Install the following CLI tools, required for the migration of your virtual machine:
2835
- `qemu-img` — for converting VMDK to QCOW2
2936
```sh
@@ -47,14 +54,20 @@ Identify the virtual machines (VMs) to migrate on your VMware plattform:
4754
3. Configure credentials for the tools:
4855
- For Scaleway: `scw init`
4956
- For AWS/S3: Refer to [Using Object Storage with the AWS-CLI](https://www.scaleway.com/en/docs/object-storage/api-cli/object-storage-aws-cli/)
50-
- For vCenter: credentials and VPN (if needed)
57+
- For vCenter: credentials and VPN (if needed):
58+
```
59+
export GOVC_PASSWORD=<VMware password>
60+
export GOVC_USERNAME=root
61+
export GOVC_INSECURE=1
62+
export GOVC_URL=<VMware host>
63+
```
5164

5265
## Downloading VMDK files using govmomi
5366

5467
Download the VMDK file from vCenter:
5568

5669
```bash
57-
govc export.ovf -vm <vm_name>
70+
govc export.ovf -vm <vm_name> /path/to/image
5871
```
5972

6073
<Message type="note">
@@ -73,15 +86,16 @@ qemu-img convert -O qcow2 <vm_name>.vmdk <vm_name>.qcow2
7386

7487
1. Mount the QCOW2 image on your Instance:
7588
```bash
76-
sudo modprobe nbd
77-
sudo qemu-nbd -c /dev/nbd0 <vm_name>.qcow2
89+
modprobe nbd
90+
qemu-nbd -c /dev/nbd0 <vm_name>.qcow2
7891
```
7992
Make any changes (e.g., install cloud-init, remove VMware tools).
8093

94+
8195
2. Unmount the file:
8296

8397
```bash
84-
sudo qemu-nbd -d /dev/nbd0
98+
qemu-nbd -d /dev/nbd0
8599
```
86100

87101
## Uploading the QCOW2 image to Scaleway Object Storage
@@ -92,44 +106,20 @@ Upload the converted disk:
92106
aws s3 cp <vm_name>.qcow2 s3://<bucket_name>/
93107
```
94108

95-
## Importing the QCOW2 image from Object Storage into Scaleway as a volume
96-
97-
Import into a new volume:
98-
99-
```bash
100-
scw instance volume import qcow2-from-s3 \
101-
s3-url=s3://<bucket_name>/<vm_name>.qcow2 \
102-
name=<volume_name> \
103-
project-id=<project_id> \
104-
zone=<zone>
105-
```
106-
107-
> You can retrieve project ID and zone using `scw project list` and `scw zone list`.
108-
109-
---
109+
## Importing the QCOW2 image from Object Storage into Scaleway as a SBS snaphot
110110

111-
### **Step 8: Create an image from the imported volume**
111+
Import into a new snapshot:
112112

113113
```bash
114-
scw instance image create-from-volume \
115-
volume-id=<volume_id> \
116-
name=<image_name> \
117-
zone=<zone>
114+
scw instance snapshot create zone=fr-par-1 name=<my-imported-snapshot> volume-type=b_ssd bucket=<my-bucket> key=<my-qcow2-file-name.qcow2>
118115
```
119116

120-
---
121117

122-
### **Step 9: Create Private Networks if needed**
118+
## (Optional) Create Private Networks if needed
123119

124-
```bash
125-
scw vpc private-network create \
126-
name=<pn_name> \
127-
ipam-configs.0.cidr=<subnet_cidr>
128-
```
129120

130-
---
131121

132-
### **Step 10: Boot an instance with the image and attach PN**
122+
## Booting an instance with the image and attaching the PN
133123

134124
Create a new server:
135125

@@ -138,20 +128,11 @@ scw instance server create \
138128
name=<instance_name> \
139129
image-id=<image_id> \
140130
commercial-type=<type> \
141-
zone=<zone> \
142-
private-nics.0.private-network-id=<pn_id>
131+
zone=<zone>
143132
```
144133

145134
Start the server:
146135

147136
```bash
148137
scw instance server start server-id=<server_id> zone=<zone>
149-
```
150-
151-
---
152-
153-
## ✅ Final Notes
154-
155-
- Run `scw --help` or `scw instance server create --help` for more guidance.
156-
- Double-check your Scaleway **region/zone compatibility** (e.g., `fr-par-1`, `nl-ams-1`, etc.).
157-
- Ensure the image is cloud-ready: ideally includes `cloud-init`.
138+
```

0 commit comments

Comments
 (0)