Skip to content

docs(ins): add documentation vmware migration #4902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions menu/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,10 @@
"label": "Identifying devices of an Instance",
"slug": "identify-devices"
},
{
"label": "Migrating VMware virtual machines to Scaleway Instances",
"slug": "migrating-vms-vmware-scaleway"
},
{
"label": "Preventing outgoing DDOS",
"slug": "preventing-outgoing-ddos"
Expand Down
140 changes: 140 additions & 0 deletions pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
meta:
title: Migrating VMware virtual machines to Scaleway Instances
description: Find out how to migrate virtual VMware machines to Scaleway Instances.
content:
h1: Migrating VMware virtual machines to Scaleway Instances
paragraph: Find out how to migrate virtual VMware machines to Scaleway Instances.
dates:
validation: 2025-05-14
posted: 2025-05-14
categories:
- compute
tags: instance type production vmware esxi migration
---

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.
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.

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,
uploading the QCOW2 image to Scaleway Object Storage, and finally, creating an image from the imported volume and booting an instance with the image.
By following these steps, you'll be able to seamlessly migrate your VMware virtual machines to Scaleway Instances, ensuring minimal downtime and optimal performance.

## Validating the inventory of machines to migrate

Identify the virtual machines (VMs) to migrate on your VMware plattform:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Identify the virtual machines (VMs) to migrate on your VMware plattform:
Identify the virtual machines (VMs) to migrate on your VMware platform:


- Disk configuration (number, size, type)
<Message type="tip">
If multiple disks are present, repeat the same steps to create several snapshots and group them as a single Scaleway image.
</Message>
- Network configuration (number of NICs, type)
<Message type="tip">
If multiple NICs are needed, several Private Networks can be added to the Instance later.
</Message>
- Boot type (BIOS or UEFI)
<Message type="important">
Only UEFI boot is compatible with Scaleway Instances
</Message>

<Message type="impotant">
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.
</Message>

## Preparing a Scaleway Instance to manage the migration

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/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the commands below assume a Debian/Ubuntu distribution. This first step should be specific about that fact.

2. Install the following CLI tools, required for the migration of your virtual machine:
- `qemu-img` — for converting VMDK to QCOW2
```sh
apt install qemu-utils
```
- `scw` — for Scaleway operations
```sh
curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh
```
- `aws` — for uploading to S3
```
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
```
- `govmomi` — for interacting with vCenter
```
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
```

3. Configure credentials for the tools:
- For Scaleway: `scw init`
- 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/)
- For vCenter: credentials and VPN (if needed):
```
export GOVC_PASSWORD=<VMware password>
export GOVC_USERNAME=root
export GOVC_INSECURE=1
export GOVC_URL=<VMware host>
```

## Downloading VMDK files using govmomi

Download the VMDK file from vCenter:

```bash
govc export.ovf -vm <vm_name> /path/to/image
```

<Message type="note">
Adjust this based on your `govmomi`/`govc` setup and environment.
</Message>

## Converting the VMDK file to QCOW2

Convert the downloaded VMDK file to QCOW2 using `qemu-img`:

```bash
qemu-img convert -O qcow2 <vm_name>.vmdk <vm_name>.qcow2
```

### (Optional): Mounting the QCOW2 file and system configuration

1. Mount the QCOW2 image on your Instance:
```bash
modprobe nbd
qemu-nbd -c /dev/nbd0 <vm_name>.qcow2
```
Make any changes (e.g., install cloud-init, add VirtIO drivers, remove VMware tools).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step should probably outline that cloud-init is required for the Instance to work correctly in the Scaleway environment. Moreover, installing the scaleway-ecosystem package too is more than recommended.


2. Unmount the file:
```bash
qemu-nbd -d /dev/nbd0
```

## Uploading the QCOW2 image to Scaleway Object Storage

Upload the converted disk:
```bash
aws s3 cp <vm_name>.qcow2 s3://<bucket_name>/
```

## Importing the QCOW2 image from Object Storage into Scaleway as a SBS snaphot

1. Import the image into a new snapshot:
```bash
scw block snapshot import-from-object-storage bucket=<my_bucket> key=<my-qcow2-file-name.qcow2> name=<my-imported-snapshot> size=<size-in-GB>
```
2 . Create a Scaleway image from the snapshot:
```bash
scw instance image create snapshot-id=<snapshot-uuid> arch=x86_64
```

3. Create the server from the image:
```bash
scw instance server create image=<image-uuid> type=<commercial-type>
```

### Adding private NICs to the Instance (otional)

Create a private NIC for the Instance, allowing it to connect to an [existing Private Network](/vpc/quickstart/#how-to-create-a-private-network)
```bash
scw instance private-nic create server-id=<server-uuid> private-network-id=<private-network-uuid> ipam-ip-ids.{0}=<ipam-ip-uuid>
```
Loading