Skip to content

Commit ceb3c58

Browse files
docs(ins): add documentation vmware migration (#4902)
* docs(ins): init migrate docs * docs(ins): update * docs(ins): content * docs(instances): add vmware migration docs * feat(ins): content * docs(ins): add pn command * docs(ins): fix typo * feat(ins): add warning for windows * Apply suggestions from code review Co-authored-by: Fabien Malfoy <[email protected]> * feat(ins): update content * Update pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx Co-authored-by: Fabien Malfoy <[email protected]> --------- Co-authored-by: Fabien Malfoy <[email protected]>
1 parent 9d44b6a commit ceb3c58

File tree

2 files changed

+147
-0
lines changed

2 files changed

+147
-0
lines changed

menu/navigation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,10 @@
15821582
"label": "Identifying devices of an Instance",
15831583
"slug": "identify-devices"
15841584
},
1585+
{
1586+
"label": "Migrating VMware virtual machines to Scaleway Instances",
1587+
"slug": "migrating-vms-vmware-scaleway"
1588+
},
15851589
{
15861590
"label": "Preventing outgoing DDOS",
15871591
"slug": "preventing-outgoing-ddos"
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
meta:
3+
title: Migrating VMware virtual machines to Scaleway Instances
4+
description: Find out how to migrate virtual VMware machines to Scaleway Instances.
5+
content:
6+
h1: Migrating VMware virtual machines to Scaleway Instances
7+
paragraph: Find out how to migrate virtual VMware machines to Scaleway Instances.
8+
dates:
9+
validation: 2025-05-14
10+
posted: 2025-05-14
11+
categories:
12+
- compute
13+
tags: instance type production vmware esxi migration
14+
---
15+
16+
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.
17+
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.
18+
19+
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,
20+
uploading the QCOW2 image to Scaleway Object Storage, and finally, creating an image from the imported volume and booting an instance with the image.
21+
By following these steps, you'll be able to seamlessly migrate your VMware virtual machines to Scaleway Instances, ensuring minimal downtime and optimal performance.
22+
23+
## Validating the inventory of machines to migrate
24+
25+
Identify the virtual machines (VMs) to migrate on your VMware platform:
26+
27+
- Disk configuration (number, size, type)
28+
<Message type="tip">
29+
If multiple disks are present, repeat the same steps to create several snapshots and group them as a single Scaleway image.
30+
</Message>
31+
- Network configuration (number of NICs, type)
32+
<Message type="tip">
33+
If multiple NICs are needed, several Private Networks can be added to the Instance later.
34+
</Message>
35+
- Boot type (BIOS or UEFI)
36+
<Message type="important">
37+
Only UEFI boot is compatible with Scaleway Instances
38+
</Message>
39+
40+
<Message type="impotant">
41+
If your virtual machine is running Windows, make sure to install the [virtiofs drivers](https://virtio-fs.gitlab.io/howto-windows.html) before exporting the VM.
42+
</Message>
43+
44+
## Preparing a Scaleway Instance to manage the migration
45+
46+
1. [Create a new Instance](/instances/how-to/create-an-instance/) (running Ubuntu 24.04 or Debian 12) to handle the migration and log into it [using SSH](/instances/how-to/connect-to-instance/).
47+
2. Install the following CLI tools, required for the migration of your virtual machine:
48+
- `qemu-img` — for converting VMDK to QCOW2
49+
```sh
50+
apt install qemu-utils
51+
```
52+
- `scw` — for Scaleway operations
53+
```sh
54+
curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh
55+
```
56+
- `aws` — for uploading to S3
57+
```
58+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
59+
unzip awscliv2.zip
60+
sudo ./aws/install
61+
```
62+
- `govmomi` — for interacting with vCenter
63+
```
64+
curl -L -o - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | tar -C /usr/local/bin -xvzf - govc
65+
```
66+
67+
3. Configure credentials for the tools:
68+
- For Scaleway: `scw init`
69+
- 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/)
70+
- For vCenter: credentials and VPN (if needed):
71+
```
72+
export GOVC_PASSWORD=<VMware password>
73+
export GOVC_USERNAME=root
74+
export GOVC_INSECURE=1
75+
export GOVC_URL=<VMware host>
76+
```
77+
78+
## Downloading VMDK files using govmomi
79+
80+
Download the VMDK file from vCenter:
81+
82+
```bash
83+
govc export.ovf -vm <vm_name> /path/to/image
84+
```
85+
86+
<Message type="note">
87+
Adjust this based on your `govmomi`/`govc` setup and environment.
88+
</Message>
89+
90+
## Converting the VMDK file to QCOW2
91+
92+
Convert the downloaded VMDK file to QCOW2 using `qemu-img`:
93+
94+
```bash
95+
qemu-img convert -O qcow2 <vm_name>.vmdk <vm_name>.qcow2
96+
```
97+
98+
### (Optional): Mounting the QCOW2 file and system configuration
99+
100+
1. Mount the QCOW2 image on your Instance:
101+
```bash
102+
modprobe nbd
103+
qemu-nbd -c /dev/nbd0 <vm_name>.qcow2
104+
```
105+
Make any changes (e.g., install `cloud-init`, `scaleway-ecosystem`, add VirtIO drivers, remove VMware tools).
106+
<Message type="important">
107+
- The `cloud-init` package is required for the Instance to work correctly in the Scaleway environment.
108+
- Installing the [scaleway-ecosystem](https://github.com/scaleway/scaleway-packages/releases) package is also highly recommended.
109+
</Message>
110+
2. Unmount the file:
111+
```bash
112+
qemu-nbd -d /dev/nbd0
113+
```
114+
115+
## Uploading the QCOW2 image to Scaleway Object Storage
116+
117+
Upload the converted disk:
118+
```bash
119+
aws s3 cp <vm_name>.qcow2 s3://<bucket_name>/
120+
```
121+
122+
## Importing the QCOW2 image from Object Storage into Scaleway as a SBS snaphot
123+
124+
1. Import the image into a new snapshot:
125+
```bash
126+
scw block snapshot import-from-object-storage bucket=<my_bucket> key=<my-qcow2-file-name.qcow2> name=<my-imported-snapshot> size=<size-in-GB>
127+
```
128+
2 . Create a Scaleway image from the snapshot:
129+
```bash
130+
scw instance image create snapshot-id=<snapshot-uuid> arch=x86_64
131+
```
132+
133+
3. Create the server from the image:
134+
```bash
135+
scw instance server create image=<image-uuid> type=<commercial-type>
136+
```
137+
138+
### Adding private NICs to the Instance (otional)
139+
140+
Create a private NIC for the Instance, allowing it to connect to an [existing Private Network](/vpc/quickstart/#how-to-create-a-private-network)
141+
```bash
142+
scw instance private-nic create server-id=<server-uuid> private-network-id=<private-network-uuid> ipam-ip-ids.{0}=<ipam-ip-uuid>
143+
```

0 commit comments

Comments
 (0)