From 429ee61970d154960e856bc09deddeab9f6a550c Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 9 Jul 2025 10:52:53 +0200 Subject: [PATCH 01/18] docs(ins): migration vmware --- .../vmware-migration-to-scaleway.mdx | 325 ++++++++++++++++++ 1 file changed, 325 insertions(+) create mode 100644 pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx diff --git a/pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx b/pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx new file mode 100644 index 0000000000..edc9c19433 --- /dev/null +++ b/pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx @@ -0,0 +1,325 @@ +--- +meta: + title: Migration from VMware on-premise to Scaleway public cloud + description: Learn about the shared responsibility model for Scaleway Bare Metal services, outlining the roles of Scaleway and users in managing server security, backups, and compliance. +content: + h1: Migration from VMware on-premise to Scaleway public cloud + paragraph: Learn about the shared responsibility model for Scaleway Bare Metal services, outlining the roles of Scaleway and users in managing server security, backups, and compliance. +tags: bare metal shared responsibility +dates: + validation: 2025-01-20 + posted: 2024-07-18 +categories: + - bare-metal +--- + +# Migration tools +* [Migration tools](#migration-tools) + * [Migration from VMware](#migration-from-vmware) + * [Glossary & general tips](#glossary--general-tips) + * [From VMware to Proxmox](#from-vmware-to-proxmox) + * [From VMware to Instances](#from-vmware-to-Instances) + * [Identify the virtual machines (VMs) to migrate](#identify-the-virtual-machines-vms-to-migrate) + * [Windows VM migration](#windows-vm-migration) + * [Preparing a Scaleway Instance to manage the migration](#preparing-a-scaleway-Instance-to-manage-the-migration) + * [Windows VM preparation (containing only 1 volume) under VMware](#windows-vm-preparation-containing-only-1-volume-under-vmware) + * [Optional - Serial console output configuration (for Windows VM)](#optional---serial-console-output-configuration-for-windows-vm) + * [Compulsory Windows VM modifications under VMware](#compulsory-windows-vm-modifications-under-vmware) + * [Compulsory Windows VM modifications under the migration Instance (converter)](#compulsory-windows-vm-modifications-under-the-migration-Instance-converter) + * [Snapshot, block volume, and server creation](#snapshot-block-volume-and-server-creation) + * [Private network configuration (optional)](#private-network-configuration-optional) + * [Red Hat Enterprise Linux 9 VM migration (containing only 1 volume)](#red-hat-enterprise-linux-9-vm-migration-containing-only-1-volume) + * [Preparing a Scaleway Instance to manage the migration](#preparing-a-scaleway-Instance-to-manage-the-migration-1) + * [VM modifications under the migration Instance (converter)](#vm-modifications-under-the-migration-Instance-converter) + * [Snapshot, block volume, and server creation](#snapshot-block-volume-and-server-creation-1) + * [Migration of the networks](#migration-of-the-networks) + * [Various tips](#various-tips) + * [TODO](#todo) + +## Migration from VMware +### Glossary & general tips +VMware file types: +- `.ova` & `.ovf`: virtual machine image +- `.vmdk`: virtual disk image +- `.vmx`: file containing the characteristics of the VM: volumes, network interfaces, CPU, RAM... + + + The easiest way to migrate out of VMware is to migrate to Proxmox hypervisor on Elastic Metal servers (one server or a cluster of several servers). + Proxmox offers a [wizard](https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE) to connect to the VMware cluster, transfer the virtual machines, and convert them into Proxmox. + + Proxmox installation on Elastic Metal is automated by Scaleway, but the user needs to do configuration (e.g., set up a cluster of several servers), maintenance, and supervision of the hypervisor. + + +### From VMware to Instances +Instances are virtual machines managed by Scaleway. This means Scaleway manages the hypervisor, image booting, and all the underlying infrastructure. +It comes with very useful features: snapshots replicated 3 times, custom images/snapshots import/export, change the size of the VM, automatic connection to private networks... +Migration of a virtual machine to Instances is less automated than with Proxmox wizard. +Scaleway built some tooling which requires some commands to be typed. +Today, we made tools to migrate VMs running these operating systems: +- Microsoft Windows 2019 and 2022: [ADD LINK TO GITHUB]() +- Red Hat Enterprise Linux 8 and 9: [ADD LINK TO GITHUB]() +**To migrate a VMware VM to an Instance, we use an intermediate Instance as a converter.** + + +This Instance is different depending on the OS of the VM you want to migrate: +* A Ubuntu Instance is used to migrate Windows VMs +* A CentOS Instance is used to migrate RHEL VMs +This Instance converter uses `virt-v2v` as the main component: +It is a tool made by the Libguestfs team, used to convert virtual machines (VMs) from one hypervisor to another. +* It converts virtual disks from VMDK format (used by VMware) to QCOW2 format (used by KVM, which is the hypervisor used by Scaleway) +* Installation of the virtio-win drivers: a tool allowing the guest operating system (the OS of the VM) to access physical devices on the host system. It enables access to block storage volumes (storage over the network, located on another physical machine than the hypervisor of the VM) +* Installation of the qemu-guest-agent +* Removal of the VMware tools + + + For unknown reasons, during the course of our tests, those scripts may not complete or fail to run. As noted later, it is essential to verify that the QEMU guest agent has been correctly installed. If not, install them manually as outlined. + + +#### Identify the virtual machines (VMs) to migrate +##### Validating the inventory of machines to migrate + +Identify the virtual machines (VMs) to migrate on your VMware platform: +- Disk configuration (number, size, type) + + If multiple disks are present, follow the same steps to create individual snapshots and then combine them into a single Scaleway image. + For more detailed instructions on creating an image from multiple volumes, refer to documentation on [how to create an image from a snapshot](/Instances/how-to/create-image-from-snapshot/). + +- Network configuration (number of NICs, type) + + If multiple NICs are needed, several Private Networks can be added to the Instance later. + +- Boot type (BIOS or UEFI) + + Only UEFI boot is compatible with Scaleway Instances + + + 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. + + + You **must find** a matching model of Instance in the Scaleway catalog. + For Windows, you must use a POP2-WIN Instance. + Your VM must boot with UEFI, not with Legacy BIOS + + +#### Windows VM migration +##### Preparing a Scaleway Instance to manage the migration + + + It is an Instance containing the migration tools. It acts as a converter. It is not the target Instance where you want to migrate the VMware virtual machine + + +1. Create an Instance with: + * Block storage: At least twice the amount of storage of the VM you want to migrate + * Image: Scaleway's Ubuntu 24.04 Noble Bat image + * SSH key: your SSH key + +2. Connect to the Instance via SSH + +3. Install the following CLI tools, required for the migration of your virtual machine: + ```shell + apt update + apt -y install python3-pip virt-v2v libguestfs-tools unzip + # Virtio drivers: + wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso + mkdir -p /usr/share/virtio-win + mount virtio-win.iso /usr/share/virtio-win + # You will have the message: mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. + 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 + # Tool used to convert rpm packages: + apt install -y rpm2cpio + # Tool to run applications as Windows service + wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm + rpm2cpio srvany.rpm | cpio -idmv \ + && mkdir /usr/share/virt-tools \ + && mv ./usr/i686-w64-mingw32/sys-root/mingw/bin/*exe /usr/share/virt-tools/ + # Scaleway CLI: + curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh + # AWS CLI for uploading to S3: + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + rm -rf aws awscliv2.zip + ``` + +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/) + * To send big files with the `aws s3 cp` command, like VM images of several GB to Object Storage, you must change the default value of the parameter `multipart_chunksize` in `.aws/config` + + + If you want to download images directly from VMware (ESXI or vCenter), you can install a client: `govmomi`, and set it up: + + `virt-v2v` can also download files directly from VMware. + + + ```shell + 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 + export GOVC_PASSWORD= + export GOVC_USERNAME=root + export GOVC_INSECURE=1 + export GOVC_URL= + ``` + Example: + ```shell + export GOVC_PASSWORD=Scaleway00! + export GOVC_USERNAME=root + export GOVC_INSECURE=1 + export GOVC_URL=195.154.91.156 # Ex: IP OF ESXI server + ``` + + +4. Create an Object storage bucket. We will use it to upload the converted images. + +##### Windows VM preparation (containing only 1 volume) under VMware + + + Windows virtual machines must be migrated to POP2-WIN Instances. Otherwise, their licensing, configuration, and monitoring will not work correctly. + + +###### Optional - Serial console output configuration (for Windows VM) + +If you want to see the boot sequence in the Scaleway Instance Serial console, [some configuration](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/serial-console-windows) can be done on the Windows VM: +```shell +# These commands must be typed in PowerShell +bcdedit /ems '{current}' on +bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 +# These commands must be typed in cmd (administrative command prompt), not PowerShell +bcdedit /set {bootmgr} displaybootmenu yes +bcdedit /set {bootmgr} timeout 10 +bcdedit /set {bootmgr} bootems yes +shutdown -r -t 0 # REBOOT +``` + +###### Compulsory Windows VM modifications under VMware + + + If it is not possible to modify the VM with VMware, we can do this setup at a later stage of the procedure. + + +1. Run the following commands in PowerShell: +```shell +Install-Module -Force powershell-yaml +schtasks /create /SC ONSTART /RU System /RP "" /TN set_static_ip /TR "powershell c:\Scaleway\set_if.ps1" +Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0 +Enable-NetFirewallRule -DisplayGroup "Remote Desktop" +Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted +Register-PSRepository -Name NuGetv2 -SourceLocation https://www.nuget.org/api/v2 -PublishLocation https://www.nuget.org/api/v2 -InstallationPolicy Trusted +Install-Module -Force ScalewayEcosystem +``` + +2. Run `C:\Scaleway\set_if.ps1` + The [set_if.ps1 ADD LINK](set_if.ps1) script is responsible for the static configuration of the public IP address. This is required to work around a limitation of the DHCP client on Windows that refuses to configure a network adapter if the address is in a /32 subnet. If the script fails to run, the Instance will be unreachable using RDP, hence will be useless. + +##### Compulsory Windows VM modifications under the migration Instance (converter) + +1. Export the image from VMware: + ```shell + govc export.ovf -vm . + ``` + + Alternatively, manually import the virtual machine image file (`.ova`) or the virtual disk file (.vmdk) on the Instance (for example with `scp`) + +2. Install virtio driver & remove VMware tools: + * If you obtain a `.ova` virtual machine file, extract it to obtain a `.vdmk` disk image file: + ```shell + mkdir vmware-to-migrate + cd vmware-to-migrate + tar xf POV_WS2022_SCALEWAY.ova + mv POV_WS2022_SCALEWAY-disk1.vmdk vmware-to-migrate-1.vmdk + cd .. + ``` + * Once you have a VMware `.vmdk` disk image file, convert it to a `.qcow2` file compatible with Scaleway ecosystem: + ```shell + qemu-img convert -p -Oqcow2 vmware-to-migrate/vmware-to-migrate-1.vmdk vmware-to-migrate/vmware-to-migrate.qcow2 + mkdir out + virt-v2v -i disk vmware-to-migrate/vmware-to-migrate.qcow2 -block-driver virtio-scsi -o qemu -os ./out + ``` + +3. Upload this file to the Instance: [set_if.ps1](set_if.ps1). Ex: you can use scp to upload it from your computer: + ```shell + scp set_if.ps1 root@:/root/ + ``` + +4. Adapt the qcow2 image to Scaleway's environment: + Copy the static IP configuration script onto the image to complete the customization: + ```shell + cd .. + guestfish -a out/vmware-to-migrate-sda -i << EOF + mkdir /Scaleway + upload set_if.ps1 /Scaleway/set_if.ps1 + EOF + ``` + + Guestfish allows writing files inside the VM while you are outside the VM (in the Instance), and the VM is not booted. + + +5. Create this file + ```shell + vi script-init.ps1 + ``` + +6. Copy this code into it: + ```shell + Install-Module -Force powershell-yaml + Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0 + Enable-NetFirewallRule -DisplayGroup "Remote Desktop" + Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted + register-psrepository -name NugetV2 -sourcelocation https://www.nuget.org/api/v2 -PublishLocation https://www.nuget.org/api/v2 -InstallationPolicy Trusted + install-package ScalewayEcosystem + schtasks /create /SC ONSTART /RU System /RP "" /TN set_static_ip /TR "powershell c:\Scaleway\set_if.ps1" + ``` +7. Upload it to the VM: + ```shell + guestfish -a out/vmware-to-migrate-sda -i << EOF + upload script-init.sh /Scaleway/script-init.ps1 + EOF + ``` +8. Edit this file: + ```shell + vi out/vmware-to-migrate.sh + ``` + Replace `-display gtk \` by `-spice port=5900,addr=0.0.0.0,disable-ticketing=on \` + or by `-vnc :1,websocket=5700,password=off \` (noVNC is compatible with web browsers. Spice is an app running on Ubuntu, not MacOS) + Add RAM and CPU by adding + ``` + -m 16384 + -smp 8 + ``` + + noVNC or Spice are used for remote access inside the VM. + + +9. Launch the noVNC server and the VM locally in the migration Instance (like a nested VM): + ```shell + git clone https://github.com/novnc/noVNC.git && cd noVNC + pip3 install websockify --break-system-packages + utils/novnc_proxy --vnc localhost:5901 --listen 6080 & + ./out/vmware-to-migrate.sh + ``` +10. Go to `http://:6080/vnc.html` to log into the VM. + + + Sometimes, the migration script fails to install the QEMU Guest agent. Verify if the agent is correctly installed: + ![qemu_install.png](qemu_install.png) + If the QEMU guest agent does not appear in the list, install it manually. The package is present at the top of the C:\ drive + ![qemu_install_2.png](qemu_install_2.png) + Note that the VMware tools should also be removed + If you could not do it before (under VMware), you can launch PowerShell commands of the file `script-init.ps1` + + +##### Snapshot, block volume, and server creation + +1. Convert the raw file to qcow2 + ```shell + qemu-img convert -p -Oqcow2 out/vmware-to-migrate-sda out/vmware-to-migrate.qcow2 + ``` +2. Upload the QCOW2 image to Scaleway Object Storage + ``` + aws s3 cp out/vmware-to-migrate.qcow2 s3://{the bucket you created earlier}/vmware-to-migrate.qcow2 + ``` + Example: `aws s3 cp out/vmware-to-migrate.qcow2 s3://migration-tool/vmware-to-migrate.qcow2` + +3. Import the QCOW2 image from Object Storage into Scaleway as a SBS snapshot: + ``` + scw block snapshot import-from-object-storage bucket={your favorite bucket} key=vmware-to-migrate.qcow2 name=vmware-to + ``` \ No newline at end of file From c01d34adec56924ad95e698fa5fddd8c3d1838ec Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:08:47 +0200 Subject: [PATCH 02/18] docs(ins): update migration docs --- .../assets/qemu_install.webp | Bin 0 -> 6670 bytes .../assets/qemu_install_2.webp | Bin 0 -> 6374 bytes .../migrating-vms-vmware-scaleway.mdx | 477 ++++++++++++++---- 3 files changed, 382 insertions(+), 95 deletions(-) create mode 100644 pages/instances/reference-content/assets/qemu_install.webp create mode 100644 pages/instances/reference-content/assets/qemu_install_2.webp diff --git a/pages/instances/reference-content/assets/qemu_install.webp b/pages/instances/reference-content/assets/qemu_install.webp new file mode 100644 index 0000000000000000000000000000000000000000..7c8f99aa6f8ce81055e0bf5ac072ecfc16a43672 GIT binary patch literal 6670 zcmV+p8u8^)Nk&En8UO%SMM6+kP&iEb82|t;>A_b3X9YQuB*#rx_wL?8f8hjPfJtzQ z^yz${4O(;Da1-0MtL%Nxd-D^qLhBf==KYzL-SM26BiKLR6;{wQuWtekCYXi_2W?CD#BB`Y2xPWRIoW6VF zLMtxYnfM0+2x(IRP60T;Asy27SAk{#B#cr47%3FM3XlpT1jq^@WCcJ05HVVX6~M-l zLRgKeo-#nSije}HmyIQ5Wn~4hk^%s%P*Er=fK{(T#E3#g0i*z^|Nn`&xP6Z5Ja`mh z^5j~b_;|kj4L?f!_g|lnmjZvoujkj5#P9T@{P#QkD4_iLx_6OcC~aRX2%wZ@tuD+PIiV-gi0=kiKtXSPcvo?Y9H zBiptu$BYbI@d$`z2_`(XfElb<3IG33Gq&DIGxs$mTajaRHtS=dQwEFZzbroTLN#WM^G;*_9rkOA^`<$fQFjJYCnVFlW%*@Qp{gahsfi2~%N@LX; zdHl(iBl-^ul58hculHj1z6h8o&!?wtd)qeKw(VHXSw?5Od{tk=-pf(`|6eor9hBuH zaz+;@2?7_03mMUWNo*TQlBB}sZdG5-qaw2#=<-HCzq+EgcmKJn`2JT^g5C_v2;bFtCKoqpUQ zcGIzZs7;qmIK}xEo5U}0){4Y;c^)5KI-L0DmUh<2ljWSs;d_3lsvj7d6SKmNNj>Nz z4IJ1|#|=`}W2Of*WrI!PKZv1SGL@|I+@*uwss2vxOLU_}MJ&8GqWg9xqU@Mb?5Itj zw9Ph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AJoS&Ynh5}a#8LlP zjm1&_SbasSe{5Ca(>H*o3KgyXu~ikTe{7%8QK6#NKepP?PfV=QQWdrSv6Wc;W8L#+ zBPJx6=a#>`5}tIFS^PAm=xkE;kA*eMAd@ivHUV{a z1D>9pjGtyn8oJHnrzt^a6RUqL8vj+XzEuPoqdYeV7MdA9&4Ij$-#@m`CRzX3xE-nm zgBVx=%G8c&WY+$)z!sVrKTXaR^L6`a8bdw;o?!iB=~scK1h}hvF%k62L=(v8g;00R Y`e{bM!s~7S{;~g6wmr>`|K0;3069kdRR910 literal 0 HcmV?d00001 diff --git a/pages/instances/reference-content/assets/qemu_install_2.webp b/pages/instances/reference-content/assets/qemu_install_2.webp new file mode 100644 index 0000000000000000000000000000000000000000..667ef85783fdd684678ee11ebafc3f04913df7f9 GIT binary patch literal 6374 zcmVRo2r&UPJ*$ z9VH1Dw~n5vO`Fp=2HBOg9E&^?A6?1S8(>>G1NaQe!Gatg<;<{0nMad6dY8&~I~=6r z3&Q54eQ$99=1o9BmCZu?iYl@E#t53TBcBH~+|ow{SBvM~ciGGBYz% z#OHbDbp2KHw`;meZ0558GegWyne8 zwxw5_6V-d-x(Y7cjcwaXGdC(KDu)`T0VPwQC+_av)? zk3I9ITWy=;x~X`oplbmk8ejnkQ372L+r=Kt|9=0>;t*sex0y`n=qc}_krzD~Bic|d zyhaWqZ}+a7Mv^26aZ+fvynP6?8bSNJcgJ8~`v?q+A_yQMo@0$Q#@J$u`Y#KT?6_^7 zokIsztuhEQ#s*;WNyh=$Mv|mQbyR=ZyNl`}>*9LFJfY(YZSML5^^3xaq}lo$2X9S(j)e>dfd=?`i!M}b!?FRjkr z2=04auRTt$-jA=`j;>e_M3%gqb`L*@lpc7#_EqKQP8lXF??Ln1vrTj2D$Q+ys3cj- zz~oYkaD7GJ?{s=?W;ygfPm*544;NnT=sMLN$Y&|?QAL^S9@eDJHa9Uw?YJO#E zZh1;}c}jL^a&~Fa!;z%wkq~ks0JpYERSYnR?V1K!UhucZU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XzKi>W*xNz# ooy$REDnFPR#bXYm#bd9ERbWcr84Syv)Y}uum + 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. + + + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) with access to Instances, Block Storage, Object Storage, and optionally Private Networks. +- VMware environment details (e.g., ESXi or vCenter credentials, VM configurations). +- VMs configured to boot with UEFI (not Legacy BIOS). +- SSH key configured for accessing Scaleway Instances. +- Familiarity with command-line tools, including Scaleway CLI, AWS CLI (for Object Storage), and `virt-v2v`. +- Sufficient Block Storage (at least twice the size of the VM to be migrated) on the converter Instance. + +Refer to [Scaleway’s Instance documentation](https://www.scaleway.com/en/docs/instances/) for details on setting up Instances and related services. + +## Glossary + +- **OVA/OVF**: Virtual machine image formats used by VMware. +- **VMDK**: Virtual disk image format used by VMware. +- **VMX**: Configuration file specifying VM characteristics (e.g., CPU, RAM, volumes, network interfaces). +- **virt-v2v**: A tool from the Libguestfs project that converts VMs between hypervisors, transforming VMDK to QCOW2, installing VirtIO drivers, and removing VMware Tools. +- **QCOW2**: Disk image format used by Scaleway’s KVM-based hypervisor. +- **VirtIO drivers**: Enable the guest OS to access Scaleway’s block storage and network devices. +- **QEMU Guest Agent**: Facilitates communication between the guest OS and Scaleway’s hypervisor. ## Validating the inventory of machines to migrate @@ -37,115 +67,372 @@ Identify the virtual machines (VMs) to migrate on your VMware platform: Only UEFI boot is compatible with Scaleway Instances +- For Windows VMs, a Scaleway POP2-WIN Instance type is required for licensing and compatibility. - - 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. - +## Migration Process + +### Identify VMs to migrate + +1. Review the VMs in the VMware environment to determine which ones to migrate. +2. Ensure the VM boots with UEFI (not Legacy BIOS), as Scaleway Instances require UEFI. +3. Match the VM’s resource requirements (CPU, RAM, storage) to an appropriate Scaleway Instance type: + - For Windows VMs, use a POP2-WIN Instance (e.g., POP2-8C-32G-WIN). + - For RHEL VMs, use a General-Purpose Instance (e.g., POP2-8C-32G). +4. Refer to [Validating the inventory of machines to migrate](#validating-the-inventory-of-machines-to-migrate) for detailed guidance. + +### Windows VM migration (single volume) + +This section outlines the migration of a Windows 2019 or 2022 VM with a single volume to a Scaleway POP2-WIN Instance. + +#### Preparing the converter instance + +1. [Create](/instances/how-to/create-an-instance/) a Scaleway Instance: + - Image: Ubuntu 24.04 Noble Bat. + - Block Storage: At least twice the storage size of the VM to be migrated. + - SSH Key: Configure an SSH key for access. +2. Connect to the Instance via SSH. +3. Install the required migration tools: + + ```shell + apt update + apt -y install python3-pip virt-v2v libguestfs-tools unzip + # Virtio drivers : + wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso + mkdir -p /usr/share/virtio-win + mount virtio-win.iso /usr/share/virtio-win + # You will have the message : mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. + 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 + # Tool used to convert rpm paquets: + apt install -y rpm2cpio + # Tool to run applications as Windows service + wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm + rpm2cpio srvany.rpm | cpio -idmv \ + && mkdir /usr/share/virt-tools \ + && mv ./usr/i686-w64-mingw32/sys-root/mingw/bin/*exe /usr/share/virt-tools/ + # Scaleway CLI : + curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh + # AWS CLI for uploading to S3 : + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + rm -rf aws awscliv2.zip + ``` + +4. Configure credentials: + - Scaleway CLI: Run `scw init` and follow the prompts. + - AWS CLI for Object Storage: Refer to [Using Object Storage with the AWS-CLI](https://www.scaleway.com/en/docs/storage/object/api-cli/object-storage-aws-cli/). + - Adjust the `multipart_chunksize` in `~/.aws/config` for large file uploads (e.g., VM images). +5. Optional: Configure govc for VMware (if downloading images directly): + + ```shell + export GOVC_PASSWORD= + export GOVC_USERNAME=root + export GOVC_INSECURE=1 + export GOVC_URL= + ``` + + Example: + + ```shell + export GOVC_PASSWORD=Scaleway00! + export GOVC_USERNAME=root + export GOVC_INSECURE=1 + export GOVC_URL=195.154.91.156 + ``` + +6. Create an Object Storage bucket to store the converted images. + +#### Preparing the Windows VM in VMware -## Preparing a Scaleway Instance to manage the migration - -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/). -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 +1. Optional: Configure serial Console output (for viewing boot sequences in Scaleway’s console): + + In PowerShell (on the Windows VM): + + ```powershell + bcdedit /ems '{current}' on + bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 + ``` + + In the Adminstrator command prompt: + + ```cmd + bcdedit /set {bootmgr} displaybootmenu yes + bcdedit /set {bootmgr} timeout 10 + bcdedit /set {bootmgr} bootems yes + shutdown -r -t 0 + ``` + + Refer to [Microsoft’s serial console documentation](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/serial-console-windows). + +2. Apply the required modifications (if possible in VMware): + + In PowerShell (on the Windows VM): + + ```powershell + Install-Module -Force powershell-yaml + schtasks /create /SC ONSTART /RU System /RP "" /TN set_static_ip /TR "powershell c:\Scaleway\set_if.ps1" + Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0 + Enable-NetFirewallRule -DisplayGroup "Remote Desktop" + Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted + Register-PSRepository -Name NuGetv2 -SourceLocation https://www.nuget.org/api/v2 -PublishLocation https://www.nuget.org/api/v2 -InstallationPolicy Trusted + Install-Module -Force ScalewayEcosystem + ``` + + If it is not possible to modify the VM using VMware, it is possible to do this setup at a later stage of the procedure. + + + + Download and place the `set_if.ps1` script in `C:\Scaleway\` on the VM. This script configures static IP addresses to address DHCP limitations in Windows with /32 subnets. The script is available in [Scaleway’s migration repository](link to be provided) (https://github.com/orgs/scaleway/teams/sa/repositories). + +#### Converting the VM on the converter Instance + +1. Export or upload the VM image: + - Export from VMware: + + ```shell + govc export.ovf -vm . ``` - 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 + + - Or manually upload the `.ova` or `.vmdk` file to the converter Instance (e.g., using `scp`). + +2. Extract and convert the image: + - If using an `.ova` file: + + ```shell + mkdir vmware-to-migrate + cd vmware-to-migrate + tar xf .ova + mv -disk1.vmdk vmware-to-migrate-1.vmdk + cd .. ``` -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= - export GOVC_USERNAME=root - export GOVC_INSECURE=1 - export GOVC_URL= - ``` + - Convert the `.vmdk` to `.qcow2`: -## Downloading VMDK files using govmomi + ```shell + qemu-img convert -p -Oqcow2 vmware-to-migrate/vmware-to-migrate-1.vmdk vmware-to-migrate/vmware-to-migrate.qcow2 + mkdir out + virt-v2v -i disk vmware-to-migrate/vmware-to-migrate.qcow2 -block-driver virtio-scsi -o qemu -os ./out + ``` -Download the VMDK file from vCenter: +3. Upload and apply the Static IP Script: + - Upload `set_if.ps1` to the converter Instance (e.g., via `scp`). + - Copy the script to the VM image: -```bash -govc export.ovf -vm /path/to/image -``` + ```shell + guestfish -a out/vmware-to-migrate-sda -i << EOF + mkdir /Scaleway + upload set_if.ps1 /Scaleway/set_if.ps1 + EOF + ``` + +4. Apply additional configurations: + - Create a `script-init.ps1` file on the converter Instance: + + ```powershell + Install-Module -Force powershell-yaml + Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0 + Enable-NetFirewallRule -DisplayGroup "Remote Desktop" + Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted + Register-PSRepository -Name NuGetv2 -SourceLocation https://www.nuget.org/api/v2 -PublishLocation https://www.nuget.org/api/v2 -InstallationPolicy Trusted + Install-Module -Force ScalewayEcosystem + schtasks /create /SC ONSTART /RU System /RP "" /TN set_static_ip /TR "powershell c:\Scaleway\set_if.ps1" + ``` + + - Upload it to the VM image: + + ```shell + guestfish -a out/vmware-to-migrate-sda -i << EOF + upload script-init.ps1 /Scaleway/script-init.ps1 + EOF + ``` + +5. Optional: Verify the QEMU Guest Agent and remove VMware Tools: + - Launch the VM locally on the converter Instance using noVNC: + + ```shell + git clone https://github.com/novnc/noVNC.git && cd noVNC + pip3 install websockify --break-system-packages + utils/novnc_proxy --vnc localhost:5901 --listen 6080 & + ``` + + - Edit `out/vmware-to-migrate.sh`, replacing `-display gtk` with: + + ```shell + -vnc :1,websocket=5700,password=off + ``` + + - Add CPU and RAM: + + ```shell + -m 16384 -smp 8 + ``` - - Adjust this based on your `govmomi`/`govc` setup and environment. + - Start the VM: + + ```shell + ./out/vmware-to-migrate.sh + ``` + + - Access the VM at `http://:6080/vnc.html`. + - Verify the QEMU Guest Agent is installed (check `C:\` for the package). If missing, install it manually. + - Remove VMware Tools if not already done. + + + - Sometimes, the migration script fails to install the QEMU Guest agent. Verify if the agent is correctly installed : + + - If the QEMU gest agent does not appear in the list, Installed it manually. The package is present at the top of the `C:\` drive + -## Converting the VMDK file to QCOW2 +#### Creating snapshot, Block Volume, and Instance + +1. Convert and Upload the Image: + + ```shell + qemu-img convert -p -Oqcow2 out/vmware-to-migrate-sda out/vmware-to-migrate.qcow2 + aws s3 cp out/vmware-to-migrate.qcow2 s3:///vmware-to-migrate.qcow2 + ``` + +2. Import as a Snapshot: -Convert the downloaded VMDK file to QCOW2 using `qemu-img`: + ```shell + scw block snapshot import-from-object-storage bucket= key=vmware-to-migrate.qcow2 name=vmware-to-migrate + ``` -```bash -qemu-img convert -O qcow2 .vmdk .qcow2 +3. Create a POP2-WIN Instance: + + ```shell + scw instance server create name=windows-vm image=none root-volume=sbs: type=POP2-8C-32G-WIN admin-password-encryption-ssh-key-id= + ``` + +4. Generate RDP Credentials: + + ```shell + scw instance server get-rdp-password key=~/.ssh/ + ``` + +5. Troubleshooting: + - If RDP connection fails, configure a Private Network with a Public Gateway (NAT on port 3389). + - Enable DHCP in Windows for Private Network connectivity. + - Reconfigure Windows users if necessary. + +#### Optional: Private Network configuration + +To connect the Instance to a Private Network: + +```shell +scw instance private-nic create server-id= private-network-id= ipam-ip-ids.0= ``` -### (Optional): Mounting the QCOW2 file and system configuration +Refer to [Scaleway Private Networks quickstart](/vpc/quickstart/#how-to-create-a-private-network). -1. Mount the QCOW2 image on your Instance: - ```bash - modprobe nbd - qemu-nbd -c /dev/nbd0 .qcow2 - ``` - Make any changes (e.g., install `cloud-init`, `scaleway-ecosystem`, add VirtIO drivers, remove VMware tools). - - - The `cloud-init` package is required for the Instance to work correctly in the Scaleway environment. - - Installing the [scaleway-ecosystem](https://github.com/scaleway/scaleway-packages/releases) package is also highly recommended. - -2. Unmount the file: - ```bash - qemu-nbd -d /dev/nbd0 - ``` +### RHEL 9 VM Migration (Single Volume) -## Uploading the QCOW2 image to Scaleway Object Storage +This section outlines the migration of an RHEL 9 VM with a single volume to a Scaleway Instance. -Upload the converted disk: - ```bash - aws s3 cp .qcow2 s3:/// - ``` +#### Preparing the converter Instance -## Importing the QCOW2 image from Object Storage into Scaleway as a SBS snaphot +1. Create a Scaleway Instance: + - Image: CentOS 9. + - Block Storage: At least twice the storage size of the VM to be migrated. + - SSH Key: Configure an SSH key for access. +2. Connect to the Instance via SSH. +3. Install migration tools: -1. Import the image into a new snapshot: - ```bash - scw block snapshot import-from-object-storage bucket= key= name= size= - ``` -2 . Create a Scaleway image from the snapshot: - ```bash - scw instance image create snapshot-id= arch=x86_64 - ``` - - If your image consists of multiple snapshots, ensure you [specify them](/instances/how-to/create-image-from-snapshot/#creating-an-image-via-the-scaleway-cli) when creating the image: - ```bash - scw instance image create snapshot-id="$SCW_VOLUME_ID_1" additional-volumes.0.id="$SCW_VOLUME_ID_2" arch="x86_64" - ``` - Refer to the [CLI documentation](https://cli.scaleway.com/instance/#create-an-instance-image) for further information. - + ```shell + yum install unzip + curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + rm -rf aws awscliv2.zip + yum install python3-libguestfs virt-v2v + ``` -3. Create the server from the image: - ```bash - scw instance server create image= type= - ``` +4. Configure Credentials: + - Scaleway CLI: Run `scw init`. + - AWS CLI for Object Storage: Refer to [Using Object Storage with the AWS-CLI](/object-storage/api-cli/object-storage-aws-cli/). + - Adjust `multipart_chunksize` in `~/.aws/config` for large file uploads. +5. Download migration scripts: + + ```shell + git clone https://github.com/fg-scw/migration-scw-rhel + ``` + +6. Create an Object Storage Bucket. + +#### Converting the VM on the Converter Instance + +1. Upload or Export the VM image: + - Use `govc` (as shown in the Windows section) or upload the `.ova`/`.vmdk` file manually. +2. Extract the `.ova` File (if applicable): + + ```shell + tar xf .ova + ``` + +3. Run migration scripts: + + ```shell + cd migration-scw-rhel + chmod +x create_bases.sh migrate_centos.sh + ./create_bases.sh + ./migrate_centos.sh + ``` + + Example: + + ```shell + ./migrate_centos.sh ../povrhel9_scaleway-disk1.vmdk povrhel9_scaleway.qcow2 + ``` + +#### Creating snapshot, Block Volume, and Instance + +1. Upload the Image: + + ```shell + aws s3 cp povrhel9_scaleway.qcow2 s3:///povrhel9_scaleway.qcow2 + ``` + +2. Import as a Snapshot: + + ```shell + scw block snapshot import-from-object-storage bucket= key=povrhel9_scaleway.qcow2 name=rhel9-vm + ``` + +3. Create an Instance: + + ```shell + scw instance server create name=rhel9-vm image=none root-volume=sbs: type=POP2-8C-32G admin-password-encryption-ssh-key-id= + ``` + +### Handling multiple snapshots + +If the VM has multiple snapshots: + +1. Check the VMware `.vmx` file for the `scsi0:0.fileName` line to identify the root volume and boot order. +2. Create an image with multiple volumes: + + ```shell + scw instance image create snapshot-id= additional-volumes.0.id= arch=x86_64 + ``` + +3. Create the Instance: + + ```shell + scw instance server create image= type= + ``` + +Refer to [Scaleway CLI Documentation](https://cli.scaleway.com/instance/#create-an-instance-image). + +## Additional Tips + +- Uploading an OVA to ESXi: -### Adding private NICs to the Instance (otional) + ```shell + govc import.ova .ova + ``` -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= private-network-id= ipam-ip-ids.{0}= - ``` \ No newline at end of file +- ESXi Console limitations: The ESXi free version’s remote console does not support copy-paste. Use RDP or SSH for easier interaction. +- Verifying migration: After migration, verify that the QEMU Guest Agent is installed and VMware Tools are removed. Re-run migration scripts or manual steps if necessary. +- Private Network configuration: For enhanced security, configure [Private Networks](/vpc/quickstart/) and use a [Public Gateway](/public-gateways/quickstart/) for external access. From d82a8b9d9a8863000535004ec32897ba049f0458 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:29:26 +0200 Subject: [PATCH 03/18] docs(ins): reorder glossary --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index cdd8caf2cd..dd5d57ec3c 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -43,12 +43,12 @@ Refer to [Scaleway’s Instance documentation](https://www.scaleway.com/en/docs/ ## Glossary - **OVA/OVF**: Virtual machine image formats used by VMware. +- **QCOW2**: Disk image format used by Scaleway’s KVM-based hypervisor. +- **QEMU Guest Agent**: Facilitates communication between the guest OS and Scaleway’s hypervisor. - **VMDK**: Virtual disk image format used by VMware. - **VMX**: Configuration file specifying VM characteristics (e.g., CPU, RAM, volumes, network interfaces). -- **virt-v2v**: A tool from the Libguestfs project that converts VMs between hypervisors, transforming VMDK to QCOW2, installing VirtIO drivers, and removing VMware Tools. -- **QCOW2**: Disk image format used by Scaleway’s KVM-based hypervisor. - **VirtIO drivers**: Enable the guest OS to access Scaleway’s block storage and network devices. -- **QEMU Guest Agent**: Facilitates communication between the guest OS and Scaleway’s hypervisor. +- **virt-v2v**: A tool from the [Libguestfs project](https://libguestfs.org/) that converts VMs between hypervisors, transforming VMDK to QCOW2, installing VirtIO drivers, and removing VMware Tools. ## Validating the inventory of machines to migrate From 9d05fc7e182ea37e76a3df4b12de9ece16934b84 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:31:29 +0200 Subject: [PATCH 04/18] feat(ins): update docs --- .../vmware-migration-to-scaleway.mdx | 325 ------------------ 1 file changed, 325 deletions(-) delete mode 100644 pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx diff --git a/pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx b/pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx deleted file mode 100644 index edc9c19433..0000000000 --- a/pages/elastic-metal/reference-content/vmware-migration-to-scaleway.mdx +++ /dev/null @@ -1,325 +0,0 @@ ---- -meta: - title: Migration from VMware on-premise to Scaleway public cloud - description: Learn about the shared responsibility model for Scaleway Bare Metal services, outlining the roles of Scaleway and users in managing server security, backups, and compliance. -content: - h1: Migration from VMware on-premise to Scaleway public cloud - paragraph: Learn about the shared responsibility model for Scaleway Bare Metal services, outlining the roles of Scaleway and users in managing server security, backups, and compliance. -tags: bare metal shared responsibility -dates: - validation: 2025-01-20 - posted: 2024-07-18 -categories: - - bare-metal ---- - -# Migration tools -* [Migration tools](#migration-tools) - * [Migration from VMware](#migration-from-vmware) - * [Glossary & general tips](#glossary--general-tips) - * [From VMware to Proxmox](#from-vmware-to-proxmox) - * [From VMware to Instances](#from-vmware-to-Instances) - * [Identify the virtual machines (VMs) to migrate](#identify-the-virtual-machines-vms-to-migrate) - * [Windows VM migration](#windows-vm-migration) - * [Preparing a Scaleway Instance to manage the migration](#preparing-a-scaleway-Instance-to-manage-the-migration) - * [Windows VM preparation (containing only 1 volume) under VMware](#windows-vm-preparation-containing-only-1-volume-under-vmware) - * [Optional - Serial console output configuration (for Windows VM)](#optional---serial-console-output-configuration-for-windows-vm) - * [Compulsory Windows VM modifications under VMware](#compulsory-windows-vm-modifications-under-vmware) - * [Compulsory Windows VM modifications under the migration Instance (converter)](#compulsory-windows-vm-modifications-under-the-migration-Instance-converter) - * [Snapshot, block volume, and server creation](#snapshot-block-volume-and-server-creation) - * [Private network configuration (optional)](#private-network-configuration-optional) - * [Red Hat Enterprise Linux 9 VM migration (containing only 1 volume)](#red-hat-enterprise-linux-9-vm-migration-containing-only-1-volume) - * [Preparing a Scaleway Instance to manage the migration](#preparing-a-scaleway-Instance-to-manage-the-migration-1) - * [VM modifications under the migration Instance (converter)](#vm-modifications-under-the-migration-Instance-converter) - * [Snapshot, block volume, and server creation](#snapshot-block-volume-and-server-creation-1) - * [Migration of the networks](#migration-of-the-networks) - * [Various tips](#various-tips) - * [TODO](#todo) - -## Migration from VMware -### Glossary & general tips -VMware file types: -- `.ova` & `.ovf`: virtual machine image -- `.vmdk`: virtual disk image -- `.vmx`: file containing the characteristics of the VM: volumes, network interfaces, CPU, RAM... - - - The easiest way to migrate out of VMware is to migrate to Proxmox hypervisor on Elastic Metal servers (one server or a cluster of several servers). - Proxmox offers a [wizard](https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE) to connect to the VMware cluster, transfer the virtual machines, and convert them into Proxmox. - - Proxmox installation on Elastic Metal is automated by Scaleway, but the user needs to do configuration (e.g., set up a cluster of several servers), maintenance, and supervision of the hypervisor. - - -### From VMware to Instances -Instances are virtual machines managed by Scaleway. This means Scaleway manages the hypervisor, image booting, and all the underlying infrastructure. -It comes with very useful features: snapshots replicated 3 times, custom images/snapshots import/export, change the size of the VM, automatic connection to private networks... -Migration of a virtual machine to Instances is less automated than with Proxmox wizard. -Scaleway built some tooling which requires some commands to be typed. -Today, we made tools to migrate VMs running these operating systems: -- Microsoft Windows 2019 and 2022: [ADD LINK TO GITHUB]() -- Red Hat Enterprise Linux 8 and 9: [ADD LINK TO GITHUB]() -**To migrate a VMware VM to an Instance, we use an intermediate Instance as a converter.** - - -This Instance is different depending on the OS of the VM you want to migrate: -* A Ubuntu Instance is used to migrate Windows VMs -* A CentOS Instance is used to migrate RHEL VMs -This Instance converter uses `virt-v2v` as the main component: -It is a tool made by the Libguestfs team, used to convert virtual machines (VMs) from one hypervisor to another. -* It converts virtual disks from VMDK format (used by VMware) to QCOW2 format (used by KVM, which is the hypervisor used by Scaleway) -* Installation of the virtio-win drivers: a tool allowing the guest operating system (the OS of the VM) to access physical devices on the host system. It enables access to block storage volumes (storage over the network, located on another physical machine than the hypervisor of the VM) -* Installation of the qemu-guest-agent -* Removal of the VMware tools - - - For unknown reasons, during the course of our tests, those scripts may not complete or fail to run. As noted later, it is essential to verify that the QEMU guest agent has been correctly installed. If not, install them manually as outlined. - - -#### Identify the virtual machines (VMs) to migrate -##### Validating the inventory of machines to migrate - -Identify the virtual machines (VMs) to migrate on your VMware platform: -- Disk configuration (number, size, type) - - If multiple disks are present, follow the same steps to create individual snapshots and then combine them into a single Scaleway image. - For more detailed instructions on creating an image from multiple volumes, refer to documentation on [how to create an image from a snapshot](/Instances/how-to/create-image-from-snapshot/). - -- Network configuration (number of NICs, type) - - If multiple NICs are needed, several Private Networks can be added to the Instance later. - -- Boot type (BIOS or UEFI) - - Only UEFI boot is compatible with Scaleway Instances - - - 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. - - - You **must find** a matching model of Instance in the Scaleway catalog. - For Windows, you must use a POP2-WIN Instance. - Your VM must boot with UEFI, not with Legacy BIOS - - -#### Windows VM migration -##### Preparing a Scaleway Instance to manage the migration - - - It is an Instance containing the migration tools. It acts as a converter. It is not the target Instance where you want to migrate the VMware virtual machine - - -1. Create an Instance with: - * Block storage: At least twice the amount of storage of the VM you want to migrate - * Image: Scaleway's Ubuntu 24.04 Noble Bat image - * SSH key: your SSH key - -2. Connect to the Instance via SSH - -3. Install the following CLI tools, required for the migration of your virtual machine: - ```shell - apt update - apt -y install python3-pip virt-v2v libguestfs-tools unzip - # Virtio drivers: - wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso - mkdir -p /usr/share/virtio-win - mount virtio-win.iso /usr/share/virtio-win - # You will have the message: mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. - 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 - # Tool used to convert rpm packages: - apt install -y rpm2cpio - # Tool to run applications as Windows service - wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm - rpm2cpio srvany.rpm | cpio -idmv \ - && mkdir /usr/share/virt-tools \ - && mv ./usr/i686-w64-mingw32/sys-root/mingw/bin/*exe /usr/share/virt-tools/ - # Scaleway CLI: - curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh - # AWS CLI for uploading to S3: - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install - rm -rf aws awscliv2.zip - ``` - -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/) - * To send big files with the `aws s3 cp` command, like VM images of several GB to Object Storage, you must change the default value of the parameter `multipart_chunksize` in `.aws/config` - - - If you want to download images directly from VMware (ESXI or vCenter), you can install a client: `govmomi`, and set it up: - - `virt-v2v` can also download files directly from VMware. - - - ```shell - 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 - export GOVC_PASSWORD= - export GOVC_USERNAME=root - export GOVC_INSECURE=1 - export GOVC_URL= - ``` - Example: - ```shell - export GOVC_PASSWORD=Scaleway00! - export GOVC_USERNAME=root - export GOVC_INSECURE=1 - export GOVC_URL=195.154.91.156 # Ex: IP OF ESXI server - ``` - - -4. Create an Object storage bucket. We will use it to upload the converted images. - -##### Windows VM preparation (containing only 1 volume) under VMware - - - Windows virtual machines must be migrated to POP2-WIN Instances. Otherwise, their licensing, configuration, and monitoring will not work correctly. - - -###### Optional - Serial console output configuration (for Windows VM) - -If you want to see the boot sequence in the Scaleway Instance Serial console, [some configuration](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/serial-console-windows) can be done on the Windows VM: -```shell -# These commands must be typed in PowerShell -bcdedit /ems '{current}' on -bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 -# These commands must be typed in cmd (administrative command prompt), not PowerShell -bcdedit /set {bootmgr} displaybootmenu yes -bcdedit /set {bootmgr} timeout 10 -bcdedit /set {bootmgr} bootems yes -shutdown -r -t 0 # REBOOT -``` - -###### Compulsory Windows VM modifications under VMware - - - If it is not possible to modify the VM with VMware, we can do this setup at a later stage of the procedure. - - -1. Run the following commands in PowerShell: -```shell -Install-Module -Force powershell-yaml -schtasks /create /SC ONSTART /RU System /RP "" /TN set_static_ip /TR "powershell c:\Scaleway\set_if.ps1" -Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0 -Enable-NetFirewallRule -DisplayGroup "Remote Desktop" -Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted -Register-PSRepository -Name NuGetv2 -SourceLocation https://www.nuget.org/api/v2 -PublishLocation https://www.nuget.org/api/v2 -InstallationPolicy Trusted -Install-Module -Force ScalewayEcosystem -``` - -2. Run `C:\Scaleway\set_if.ps1` - The [set_if.ps1 ADD LINK](set_if.ps1) script is responsible for the static configuration of the public IP address. This is required to work around a limitation of the DHCP client on Windows that refuses to configure a network adapter if the address is in a /32 subnet. If the script fails to run, the Instance will be unreachable using RDP, hence will be useless. - -##### Compulsory Windows VM modifications under the migration Instance (converter) - -1. Export the image from VMware: - ```shell - govc export.ovf -vm . - ``` - - Alternatively, manually import the virtual machine image file (`.ova`) or the virtual disk file (.vmdk) on the Instance (for example with `scp`) - -2. Install virtio driver & remove VMware tools: - * If you obtain a `.ova` virtual machine file, extract it to obtain a `.vdmk` disk image file: - ```shell - mkdir vmware-to-migrate - cd vmware-to-migrate - tar xf POV_WS2022_SCALEWAY.ova - mv POV_WS2022_SCALEWAY-disk1.vmdk vmware-to-migrate-1.vmdk - cd .. - ``` - * Once you have a VMware `.vmdk` disk image file, convert it to a `.qcow2` file compatible with Scaleway ecosystem: - ```shell - qemu-img convert -p -Oqcow2 vmware-to-migrate/vmware-to-migrate-1.vmdk vmware-to-migrate/vmware-to-migrate.qcow2 - mkdir out - virt-v2v -i disk vmware-to-migrate/vmware-to-migrate.qcow2 -block-driver virtio-scsi -o qemu -os ./out - ``` - -3. Upload this file to the Instance: [set_if.ps1](set_if.ps1). Ex: you can use scp to upload it from your computer: - ```shell - scp set_if.ps1 root@:/root/ - ``` - -4. Adapt the qcow2 image to Scaleway's environment: - Copy the static IP configuration script onto the image to complete the customization: - ```shell - cd .. - guestfish -a out/vmware-to-migrate-sda -i << EOF - mkdir /Scaleway - upload set_if.ps1 /Scaleway/set_if.ps1 - EOF - ``` - - Guestfish allows writing files inside the VM while you are outside the VM (in the Instance), and the VM is not booted. - - -5. Create this file - ```shell - vi script-init.ps1 - ``` - -6. Copy this code into it: - ```shell - Install-Module -Force powershell-yaml - Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0 - Enable-NetFirewallRule -DisplayGroup "Remote Desktop" - Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted - register-psrepository -name NugetV2 -sourcelocation https://www.nuget.org/api/v2 -PublishLocation https://www.nuget.org/api/v2 -InstallationPolicy Trusted - install-package ScalewayEcosystem - schtasks /create /SC ONSTART /RU System /RP "" /TN set_static_ip /TR "powershell c:\Scaleway\set_if.ps1" - ``` -7. Upload it to the VM: - ```shell - guestfish -a out/vmware-to-migrate-sda -i << EOF - upload script-init.sh /Scaleway/script-init.ps1 - EOF - ``` -8. Edit this file: - ```shell - vi out/vmware-to-migrate.sh - ``` - Replace `-display gtk \` by `-spice port=5900,addr=0.0.0.0,disable-ticketing=on \` - or by `-vnc :1,websocket=5700,password=off \` (noVNC is compatible with web browsers. Spice is an app running on Ubuntu, not MacOS) - Add RAM and CPU by adding - ``` - -m 16384 - -smp 8 - ``` - - noVNC or Spice are used for remote access inside the VM. - - -9. Launch the noVNC server and the VM locally in the migration Instance (like a nested VM): - ```shell - git clone https://github.com/novnc/noVNC.git && cd noVNC - pip3 install websockify --break-system-packages - utils/novnc_proxy --vnc localhost:5901 --listen 6080 & - ./out/vmware-to-migrate.sh - ``` -10. Go to `http://:6080/vnc.html` to log into the VM. - - - Sometimes, the migration script fails to install the QEMU Guest agent. Verify if the agent is correctly installed: - ![qemu_install.png](qemu_install.png) - If the QEMU guest agent does not appear in the list, install it manually. The package is present at the top of the C:\ drive - ![qemu_install_2.png](qemu_install_2.png) - Note that the VMware tools should also be removed - If you could not do it before (under VMware), you can launch PowerShell commands of the file `script-init.ps1` - - -##### Snapshot, block volume, and server creation - -1. Convert the raw file to qcow2 - ```shell - qemu-img convert -p -Oqcow2 out/vmware-to-migrate-sda out/vmware-to-migrate.qcow2 - ``` -2. Upload the QCOW2 image to Scaleway Object Storage - ``` - aws s3 cp out/vmware-to-migrate.qcow2 s3://{the bucket you created earlier}/vmware-to-migrate.qcow2 - ``` - Example: `aws s3 cp out/vmware-to-migrate.qcow2 s3://migration-tool/vmware-to-migrate.qcow2` - -3. Import the QCOW2 image from Object Storage into Scaleway as a SBS snapshot: - ``` - scw block snapshot import-from-object-storage bucket={your favorite bucket} key=vmware-to-migrate.qcow2 name=vmware-to - ``` \ No newline at end of file From a34249ca315be911ea4a3c112f286f64ba128b9b Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:33:01 +0200 Subject: [PATCH 05/18] feat(ins): update headers --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index dd5d57ec3c..c496af8e9e 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -1,10 +1,6 @@ --- -meta: - title: Migrating (virtual) machines from VMware to Scaleway Instances - description: Find out how to migrate virtual VMware machines to Scaleway Instances. -content: - h1: Migrating (virtual) machines from VMware to Scaleway Instances - paragraph: Find out how to migrate virtual VMware machines to Scaleway Instances. +title: Migrating (virtual) machines from VMware to Scaleway Instances +description: Find out how to migrate virtual VMware machines to Scaleway Instances. dates: validation: 2025-07-21 posted: 2025-05-14 From 075150a0dbeadd376e1fd8d07c2422ce9ac92706 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:33:51 +0200 Subject: [PATCH 06/18] docs(ins): update wording --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index c496af8e9e..4dba04a5d8 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -18,7 +18,7 @@ However, with the right tools and a step-by-step approach, you can successfully This guide provides instructions for migrating virtual machines (VMs) from VMware to Scaleway Instances. It covers the migration process for Microsoft Windows (2019 and 2022) and Red Hat Enterprise Linux (RHEL) 9 VMs, each containing a single volume, to Scaleway’s managed Instances. -The migration uses an intermediate Scaleway Instance as a converter, leveraging tools such as `virt-v2v` to transform VMware disk formats (`VMDK`) to Scaleway-compatible formats (`QCOW2`). +The migration uses an intermediate Scaleway Instance as a converter, using tools such as `virt-v2v` to transform VMware disk formats (`VMDK`) to Scaleway-compatible formats (`QCOW2`). 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. From 4287eec24feb02de50daed52aa95873c9f88813e Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:34:35 +0200 Subject: [PATCH 07/18] docs(ins): update --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index 4dba04a5d8..45fc0222a0 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -20,10 +20,6 @@ This guide provides instructions for migrating virtual machines (VMs) from VMwar It covers the migration process for Microsoft Windows (2019 and 2022) and Red Hat Enterprise Linux (RHEL) 9 VMs, each containing a single volume, to Scaleway’s managed Instances. The migration uses an intermediate Scaleway Instance as a converter, using tools such as `virt-v2v` to transform VMware disk formats (`VMDK`) to Scaleway-compatible formats (`QCOW2`). - - 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. - - @@ -36,6 +32,10 @@ The migration uses an intermediate Scaleway Instance as a converter, using tools Refer to [Scaleway’s Instance documentation](https://www.scaleway.com/en/docs/instances/) for details on setting up Instances and related services. + + 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. + + ## Glossary - **OVA/OVF**: Virtual machine image formats used by VMware. From bd6dc3aa85185201410049aeff48c15f04f6b87b Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 21 Jul 2025 16:35:29 +0200 Subject: [PATCH 08/18] fix(ins): fix typo --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index 45fc0222a0..fbd218445c 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -98,7 +98,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v mount virtio-win.iso /usr/share/virtio-win # You will have the message : mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. 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 - # Tool used to convert rpm paquets: + # Tool used to convert rpm packages: apt install -y rpm2cpio # Tool to run applications as Windows service wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm From f21709a254bdffe848d1b437413025c878366ee3 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Tue, 22 Jul 2025 09:01:37 +0200 Subject: [PATCH 09/18] feat(ins): k8s --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index fbd218445c..dfb0ee36bc 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -307,8 +307,8 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v scw instance server get-rdp-password key=~/.ssh/ ``` -5. Troubleshooting: - - If RDP connection fails, configure a Private Network with a Public Gateway (NAT on port 3389). +##### Troubleshooting + - If the RDP connection fails, configure a Private Network with a Public Gateway (NAT on port 3389). - Enable DHCP in Windows for Private Network connectivity. - Reconfigure Windows users if necessary. From 9f1ce28e5fe39e6cb80fc5881526eea733529882 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 23 Jul 2025 10:02:32 +0200 Subject: [PATCH 10/18] Apply suggestions from code review Co-authored-by: Rowena Jones <36301604+RoRoJ@users.noreply.github.com> --- .../migrating-vms-vmware-scaleway.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index dfb0ee36bc..049b9eaf09 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -70,8 +70,8 @@ Identify the virtual machines (VMs) to migrate on your VMware platform: ### Identify VMs to migrate 1. Review the VMs in the VMware environment to determine which ones to migrate. -2. Ensure the VM boots with UEFI (not Legacy BIOS), as Scaleway Instances require UEFI. -3. Match the VM’s resource requirements (CPU, RAM, storage) to an appropriate Scaleway Instance type: +2. Ensure the VMs boot with UEFI (not Legacy BIOS), as Scaleway Instances require UEFI. +3. Match each VM’s resource requirements (CPU, RAM, storage) to an appropriate Scaleway Instance type: - For Windows VMs, use a POP2-WIN Instance (e.g., POP2-8C-32G-WIN). - For RHEL VMs, use a General-Purpose Instance (e.g., POP2-8C-32G). 4. Refer to [Validating the inventory of machines to migrate](#validating-the-inventory-of-machines-to-migrate) for detailed guidance. @@ -86,7 +86,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v - Image: Ubuntu 24.04 Noble Bat. - Block Storage: At least twice the storage size of the VM to be migrated. - SSH Key: Configure an SSH key for access. -2. Connect to the Instance via SSH. +2. [Connect to the Instance via SSH](/instances/how-to/connect-to-instance/). 3. Install the required migration tools: ```shell @@ -140,7 +140,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v #### Preparing the Windows VM in VMware -1. Optional: Configure serial Console output (for viewing boot sequences in Scaleway’s console): +1. Optional: Configure serial console output (for viewing boot sequences in Scaleway’s console): In PowerShell (on the Windows VM): @@ -210,7 +210,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v virt-v2v -i disk vmware-to-migrate/vmware-to-migrate.qcow2 -block-driver virtio-scsi -o qemu -os ./out ``` -3. Upload and apply the Static IP Script: +3. Upload and apply the static IP script: - Upload `set_if.ps1` to the converter Instance (e.g., via `scp`). - Copy the script to the VM image: @@ -282,14 +282,14 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v #### Creating snapshot, Block Volume, and Instance -1. Convert and Upload the Image: +1. Convert and Upload the image: ```shell qemu-img convert -p -Oqcow2 out/vmware-to-migrate-sda out/vmware-to-migrate.qcow2 aws s3 cp out/vmware-to-migrate.qcow2 s3:///vmware-to-migrate.qcow2 ``` -2. Import as a Snapshot: +2. Import as a snapshot: ```shell scw block snapshot import-from-object-storage bucket= key=vmware-to-migrate.qcow2 name=vmware-to-migrate @@ -301,7 +301,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v scw instance server create name=windows-vm image=none root-volume=sbs: type=POP2-8C-32G-WIN admin-password-encryption-ssh-key-id= ``` -4. Generate RDP Credentials: +4. Generate RDP credentials: ```shell scw instance server get-rdp-password key=~/.ssh/ @@ -345,7 +345,7 @@ This section outlines the migration of an RHEL 9 VM with a single volume to a Sc yum install python3-libguestfs virt-v2v ``` -4. Configure Credentials: +4. Configure credentials: - Scaleway CLI: Run `scw init`. - AWS CLI for Object Storage: Refer to [Using Object Storage with the AWS-CLI](/object-storage/api-cli/object-storage-aws-cli/). - Adjust `multipart_chunksize` in `~/.aws/config` for large file uploads. @@ -359,9 +359,9 @@ This section outlines the migration of an RHEL 9 VM with a single volume to a Sc #### Converting the VM on the Converter Instance -1. Upload or Export the VM image: +1. Upload or export the VM image: - Use `govc` (as shown in the Windows section) or upload the `.ova`/`.vmdk` file manually. -2. Extract the `.ova` File (if applicable): +2. Extract the `.ova` file (if applicable): ```shell tar xf .ova @@ -384,13 +384,13 @@ This section outlines the migration of an RHEL 9 VM with a single volume to a Sc #### Creating snapshot, Block Volume, and Instance -1. Upload the Image: +1. Upload the image: ```shell aws s3 cp povrhel9_scaleway.qcow2 s3:///povrhel9_scaleway.qcow2 ``` -2. Import as a Snapshot: +2. Import as a snapshot: ```shell scw block snapshot import-from-object-storage bucket= key=povrhel9_scaleway.qcow2 name=rhel9-vm From 7424af1498ba91dfcb123b809870b395f58a27ac Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 23 Jul 2025 14:32:13 +0200 Subject: [PATCH 11/18] docs(ins): update doc --- .../migrating-vms-vmware-scaleway.mdx | 123 ++++++++++-------- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index 049b9eaf09..bee68888dc 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -38,43 +38,46 @@ Refer to [Scaleway’s Instance documentation](https://www.scaleway.com/en/docs/ ## Glossary -- **OVA/OVF**: Virtual machine image formats used by VMware. -- **QCOW2**: Disk image format used by Scaleway’s KVM-based hypervisor. -- **QEMU Guest Agent**: Facilitates communication between the guest OS and Scaleway’s hypervisor. -- **VMDK**: Virtual disk image format used by VMware. -- **VMX**: Configuration file specifying VM characteristics (e.g., CPU, RAM, volumes, network interfaces). -- **VirtIO drivers**: Enable the guest OS to access Scaleway’s block storage and network devices. -- **virt-v2v**: A tool from the [Libguestfs project](https://libguestfs.org/) that converts VMs between hypervisors, transforming VMDK to QCOW2, installing VirtIO drivers, and removing VMware Tools. - -## Validating the inventory of machines to migrate - -Identify the virtual machines (VMs) to migrate on your VMware platform: - -- Disk configuration (number, size, type) - - If multiple disks are present, follow the same steps to create individual snapshots and then combine them into a single Scaleway image. - For more detailed instructions on creating an image from multiple volumes, refer to documentation on [how to create an image from a snapshot](/instances/how-to/create-image-from-snapshot/). - -- Network configuration (number of NICs, type) - - If multiple NICs are needed, several Private Networks can be added to the Instance later. - -- Boot type (BIOS or UEFI) - - Only UEFI boot is compatible with Scaleway Instances - -- For Windows VMs, a Scaleway POP2-WIN Instance type is required for licensing and compatibility. - -## Migration Process - -### Identify VMs to migrate - -1. Review the VMs in the VMware environment to determine which ones to migrate. -2. Ensure the VMs boot with UEFI (not Legacy BIOS), as Scaleway Instances require UEFI. -3. Match each VM’s resource requirements (CPU, RAM, storage) to an appropriate Scaleway Instance type: - - For Windows VMs, use a POP2-WIN Instance (e.g., POP2-8C-32G-WIN). - - For RHEL VMs, use a General-Purpose Instance (e.g., POP2-8C-32G). -4. Refer to [Validating the inventory of machines to migrate](#validating-the-inventory-of-machines-to-migrate) for detailed guidance. +| Term | Definition | +|------|------------| +| **OVA/OVF** | Virtual machine image formats used by VMware for exporting VMs. | +| **QCOW2** | Disk image format used by Scaleway’s KVM-based hypervisor, optimized for cloud environments. | +| **QEMU Guest Agent** | A service enabling communication between the guest OS and Scaleway’s hypervisor for tasks like shutdown or status reporting. | +| **VMDK** | VMware’s virtual disk image format, which must be converted to QCOW2 for Scaleway. | +| **VMX** | VMware configuration file specifying VM characteristics (e.g., CPU, RAM, disks, network interfaces). | +| **VirtIO Drivers** | Drivers allowing the guest OS to interact with Scaleway’s block storage and network devices. | +| **virt-v2v** | A tool from the [Libguestfs project](https://libguestfs.org/) for converting VMs between hypervisors, including VMDK to QCOW2 conversion. | +| **Hypervisor** | Software that manages virtual machines, such as VMware ESXi or Scaleway’s KVM-based system. | +| **Block Storage** | Scaleway’s persistent storage for Instance disks, used for snapshots and volumes. | + + +## Validating VMs to migrate + +Review your VMware VMs to ensure compatibility with Scaleway Instances. + +1. Identify VMs: + - List VMs in your VMware environment via vCenter or ESXi console. + - Note the operating system (Windows 2019/2022 or RHEL 9). +2. Check the disk configuration: + - Record the number, size, and type of disks (e.g., 1x 100 GB VMDK). + For VMs with multiple disks, create individual snapshots and combine them into a single Scaleway image. Refer to the documentation on [how to create an image from a snapshot](/instances/how-to/create-image-from-snapshot/) for furher information. +3. Verify the network configuration: + - Note the number and type of network interfaces (NICs). + + Scaleway supports multiple NICs via Private Networks, configurable post-migration. See [Private Networks Quickstart](https://www.scaleway.com/en/docs/network/vpc/quickstart/). + +4. Confirm the boot type of the VM: + - Ensure VMs use UEFI boot (check VMware settings under "Boot Options"). + + Legacy BIOS is not compatible with Scaleway Instances. Convert legacy BIOS VMs to UEFI in VMware if needed (refer to the official VMware documentation for more information). + +5. Match resources to the new Scaleway Instance: + - Map VM resources (CPU, RAM, storage) to Scaleway Instance types: + - Windows: Use POP2-WIN (e.g., POP2-8C-32G-WIN for 8 cores, 32 GB RAM). + - RHEL: Use General-Purpose (e.g., POP2-8C-32G). + - Refer to [Choosing the best Scaleway Instance type for your workload](/instances/reference-content/choosing-instance-type/) for additional information. + +## Migration process ### Windows VM migration (single volume) @@ -90,16 +93,17 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v 3. Install the required migration tools: ```shell + # Update package lists apt update apt -y install python3-pip virt-v2v libguestfs-tools unzip - # Virtio drivers : + # Download VirtIO drivers for Windows wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso mkdir -p /usr/share/virtio-win mount virtio-win.iso /usr/share/virtio-win - # You will have the message : mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. + # You will see the following message: mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. 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 # Tool used to convert rpm packages: - apt install -y rpm2cpio + apt install -y rpm2cpio # Tool to run applications as Windows service wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm rpm2cpio srvany.rpm | cpio -idmv \ @@ -118,7 +122,8 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v - Scaleway CLI: Run `scw init` and follow the prompts. - AWS CLI for Object Storage: Refer to [Using Object Storage with the AWS-CLI](https://www.scaleway.com/en/docs/storage/object/api-cli/object-storage-aws-cli/). - Adjust the `multipart_chunksize` in `~/.aws/config` for large file uploads (e.g., VM images). -5. Optional: Configure govc for VMware (if downloading images directly): + +5. Optional: Configure `govc` for VMware (if downloading images directly): ```shell export GOVC_PASSWORD= @@ -130,10 +135,10 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v Example: ```shell - export GOVC_PASSWORD=Scaleway00! + export GOVC_PASSWORD= export GOVC_USERNAME=root export GOVC_INSECURE=1 - export GOVC_URL=195.154.91.156 + export GOVC_URL=195.154.xxx.yyy #A public IP of a VMWare ESXI server ``` 6. Create an Object Storage bucket to store the converted images. @@ -178,7 +183,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v - Download and place the `set_if.ps1` script in `C:\Scaleway\` on the VM. This script configures static IP addresses to address DHCP limitations in Windows with /32 subnets. The script is available in [Scaleway’s migration repository](link to be provided) (https://github.com/orgs/scaleway/teams/sa/repositories). + Download and place the `set_if.ps1` script in `C:\Scaleway\` on the VM. This script configures static IP addresses to address DHCP limitations in Windows with /32 subnets. The script is available in [Scaleway’s migration repository](https://github.com/orgs/scaleway/teams/sa/repositories). #### Converting the VM on the converter Instance @@ -205,8 +210,11 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v - Convert the `.vmdk` to `.qcow2`: ```shell + # Convert VMDK to QCOW2 format for Scaleway compatibility qemu-img convert -p -Oqcow2 vmware-to-migrate/vmware-to-migrate-1.vmdk vmware-to-migrate/vmware-to-migrate.qcow2 + # Create output directory mkdir out + # Run virt-v2v to install VirtIO drivers and prepare the image virt-v2v -i disk vmware-to-migrate/vmware-to-migrate.qcow2 -block-driver virtio-scsi -o qemu -os ./out ``` @@ -262,6 +270,9 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v ```shell -m 16384 -smp 8 ``` + + Ensure that the RAM and CPU values you choose do not exceed the available resources of the converter instance. + - Start the VM: @@ -269,7 +280,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v ./out/vmware-to-migrate.sh ``` - - Access the VM at `http://:6080/vnc.html`. + - With the internet browser of your computer, access the VM at `http://:6080/vnc.html`. - Verify the QEMU Guest Agent is installed (check `C:\` for the package). If missing, install it manually. - Remove VMware Tools if not already done. @@ -282,10 +293,16 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v #### Creating snapshot, Block Volume, and Instance + + If you could not run the the powershell script (`script-init.ps1`) before, you must run it now. + + 1. Convert and Upload the image: - ```shell + ``` + # Convert final image to QCOW2 qemu-img convert -p -Oqcow2 out/vmware-to-migrate-sda out/vmware-to-migrate.qcow2 + # Upload to Object Storage aws s3 cp out/vmware-to-migrate.qcow2 s3:///vmware-to-migrate.qcow2 ``` @@ -336,12 +353,14 @@ This section outlines the migration of an RHEL 9 VM with a single volume to a Sc 3. Install migration tools: ```shell + # Install unzip, Scaleway CLI and AWS CLI yum install unzip curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install rm -rf aws awscliv2.zip + # Install conversion tools yum install python3-libguestfs virt-v2v ``` @@ -349,15 +368,15 @@ This section outlines the migration of an RHEL 9 VM with a single volume to a Sc - Scaleway CLI: Run `scw init`. - AWS CLI for Object Storage: Refer to [Using Object Storage with the AWS-CLI](/object-storage/api-cli/object-storage-aws-cli/). - Adjust `multipart_chunksize` in `~/.aws/config` for large file uploads. -5. Download migration scripts: +5. Download migration scripts from Scaleway's public [GitHub repository](https://github.com/orgs/scaleway/teams/sa/repositories): ```shell - git clone https://github.com/fg-scw/migration-scw-rhel + git clone https://github.com/orgs/scaleway/teams/sa/repositories ``` -6. Create an Object Storage Bucket. +6. [Create](/object-storage/how-to/create-a-bucket/) an Object Storage bucket. -#### Converting the VM on the Converter Instance +#### Converting the VM on the converter Instance 1. Upload or export the VM image: - Use `govc` (as shown in the Windows section) or upload the `.ova`/`.vmdk` file manually. @@ -421,7 +440,7 @@ If the VM has multiple snapshots: Refer to [Scaleway CLI Documentation](https://cli.scaleway.com/instance/#create-an-instance-image). -## Additional Tips +## Additional tips - Uploading an OVA to ESXi: @@ -429,6 +448,6 @@ Refer to [Scaleway CLI Documentation](https://cli.scaleway.com/instance/#create- govc import.ova .ova ``` -- ESXi Console limitations: The ESXi free version’s remote console does not support copy-paste. Use RDP or SSH for easier interaction. +- ESXi Console: If you do not succeed to enable copy-paste on the ESXI console, use RDP or SSH for easier interaction. - Verifying migration: After migration, verify that the QEMU Guest Agent is installed and VMware Tools are removed. Re-run migration scripts or manual steps if necessary. - Private Network configuration: For enhanced security, configure [Private Networks](/vpc/quickstart/) and use a [Public Gateway](/public-gateways/quickstart/) for external access. From b687f22e04ab9c8b42499b8f18766ebb636ada8f Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 23 Jul 2025 14:45:04 +0200 Subject: [PATCH 12/18] fix(ins): fix indention --- .../migrating-vms-vmware-scaleway.mdx | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index bee68888dc..f62db6897c 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -40,6 +40,8 @@ Refer to [Scaleway’s Instance documentation](https://www.scaleway.com/en/docs/ | Term | Definition | |------|------------| +| **Block Storage** | Scaleway’s persistent storage for Instance disks, used for snapshots and volumes. | +| **Hypervisor** | Software that manages virtual machines, such as VMware ESXi or Scaleway’s KVM-based system. | | **OVA/OVF** | Virtual machine image formats used by VMware for exporting VMs. | | **QCOW2** | Disk image format used by Scaleway’s KVM-based hypervisor, optimized for cloud environments. | | **QEMU Guest Agent** | A service enabling communication between the guest OS and Scaleway’s hypervisor for tasks like shutdown or status reporting. | @@ -47,9 +49,6 @@ Refer to [Scaleway’s Instance documentation](https://www.scaleway.com/en/docs/ | **VMX** | VMware configuration file specifying VM characteristics (e.g., CPU, RAM, disks, network interfaces). | | **VirtIO Drivers** | Drivers allowing the guest OS to interact with Scaleway’s block storage and network devices. | | **virt-v2v** | A tool from the [Libguestfs project](https://libguestfs.org/) for converting VMs between hypervisors, including VMDK to QCOW2 conversion. | -| **Hypervisor** | Software that manages virtual machines, such as VMware ESXi or Scaleway’s KVM-based system. | -| **Block Storage** | Scaleway’s persistent storage for Instance disks, used for snapshots and volumes. | - ## Validating VMs to migrate @@ -86,37 +85,37 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v #### Preparing the converter instance 1. [Create](/instances/how-to/create-an-instance/) a Scaleway Instance: - - Image: Ubuntu 24.04 Noble Bat. + - Image: Ubuntu 24.04 Noble Numbat. - Block Storage: At least twice the storage size of the VM to be migrated. - SSH Key: Configure an SSH key for access. 2. [Connect to the Instance via SSH](/instances/how-to/connect-to-instance/). 3. Install the required migration tools: - ```shell - # Update package lists - apt update - apt -y install python3-pip virt-v2v libguestfs-tools unzip - # Download VirtIO drivers for Windows - wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso - mkdir -p /usr/share/virtio-win - mount virtio-win.iso /usr/share/virtio-win - # You will see the following message: mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. - 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 - # Tool used to convert rpm packages: - apt install -y rpm2cpio - # Tool to run applications as Windows service - wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm - rpm2cpio srvany.rpm | cpio -idmv \ - && mkdir /usr/share/virt-tools \ - && mv ./usr/i686-w64-mingw32/sys-root/mingw/bin/*exe /usr/share/virt-tools/ - # Scaleway CLI : - curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh - # AWS CLI for uploading to S3 : - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install - rm -rf aws awscliv2.zip - ``` + ```shell + # Update package lists + apt update + apt -y install python3-pip virt-v2v libguestfs-tools unzip + # Download VirtIO drivers for Windows + wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso + mkdir -p /usr/share/virtio-win + mount virtio-win.iso /usr/share/virtio-win + # You will see the following message: mount: /usr/share/virtio-win: WARNING: source write-protected, mounted read-only. + 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 + # Tool used to convert rpm packages: + apt install -y rpm2cpio + # Tool to run applications as Windows service + wget -nd -O srvany.rpm https://kojipkgs.fedoraproject.org//packages/mingw-srvany/1.1/4.fc38/noarch/mingw32-srvany-1.1-4.fc38.noarch.rpm + rpm2cpio srvany.rpm | cpio -idmv \ + && mkdir /usr/share/virt-tools \ + && mv ./usr/i686-w64-mingw32/sys-root/mingw/bin/*exe /usr/share/virt-tools/ + # Scaleway CLI : + curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh + # AWS CLI for uploading to S3 : + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + rm -rf aws awscliv2.zip + ``` 4. Configure credentials: - Scaleway CLI: Run `scw init` and follow the prompts. From cab13b15925b5ea72af08aab706f17ac711a7a0c Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 23 Jul 2025 14:47:53 +0200 Subject: [PATCH 13/18] fix(ins): fix formatting --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index f62db6897c..cb1a806236 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -59,7 +59,9 @@ Review your VMware VMs to ensure compatibility with Scaleway Instances. - Note the operating system (Windows 2019/2022 or RHEL 9). 2. Check the disk configuration: - Record the number, size, and type of disks (e.g., 1x 100 GB VMDK). - For VMs with multiple disks, create individual snapshots and combine them into a single Scaleway image. Refer to the documentation on [how to create an image from a snapshot](/instances/how-to/create-image-from-snapshot/) for furher information. + + For VMs with multiple disks, create individual snapshots and combine them into a single Scaleway image. Refer to the documentation on [how to create an image from a snapshot](/instances/how-to/create-image-from-snapshot/) for furher information. + 3. Verify the network configuration: - Note the number and type of network interfaces (NICs). From c06e214ba6c238b210a8ad4089fb8ed76faa2c39 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 23 Jul 2025 14:49:46 +0200 Subject: [PATCH 14/18] fix(ins): fix title --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index cb1a806236..662cfea43a 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -1,5 +1,5 @@ --- -title: Migrating (virtual) machines from VMware to Scaleway Instances +title: Migrating virtual machines from VMware to Scaleway Instances description: Find out how to migrate virtual VMware machines to Scaleway Instances. dates: validation: 2025-07-21 From 38a1fe47b6a33402c6e9e57de7fa1b5f6cecd0a4 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 23 Jul 2025 14:50:26 +0200 Subject: [PATCH 15/18] ins(fix): typo --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index 662cfea43a..fadadeb65d 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -340,7 +340,7 @@ scw instance private-nic create server-id= private-network-id= Date: Wed, 23 Jul 2025 14:53:00 +0200 Subject: [PATCH 16/18] feat(ins): fix typo --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index fadadeb65d..bd43ad818a 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -288,7 +288,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v - Sometimes, the migration script fails to install the QEMU Guest agent. Verify if the agent is correctly installed : - - If the QEMU gest agent does not appear in the list, Installed it manually. The package is present at the top of the `C:\` drive + - If the QEMU guest agent does not appear in the list, install it manually. The package is present at the top of the `C:\` drive From ba59f4dda6d78e462274dfa66bb89c6d2681fbef Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 30 Jul 2025 13:42:03 +0200 Subject: [PATCH 17/18] docs(ins): update repo address --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index bd43ad818a..1b963d1fe5 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -184,7 +184,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v - Download and place the `set_if.ps1` script in `C:\Scaleway\` on the VM. This script configures static IP addresses to address DHCP limitations in Windows with /32 subnets. The script is available in [Scaleway’s migration repository](https://github.com/orgs/scaleway/teams/sa/repositories). + Download and place the `set_if.ps1` script in `C:\Scaleway\` on the VM. This script configures static IP addresses to address DHCP limitations in Windows with /32 subnets. The script is available in [Scaleway’s migration repository](https://github.com/scaleway/migration-tools). #### Converting the VM on the converter Instance @@ -369,10 +369,10 @@ This section outlines the migration of an RHEL 9 VM with a single volume to a Sc - Scaleway CLI: Run `scw init`. - AWS CLI for Object Storage: Refer to [Using Object Storage with the AWS-CLI](/object-storage/api-cli/object-storage-aws-cli/). - Adjust `multipart_chunksize` in `~/.aws/config` for large file uploads. -5. Download migration scripts from Scaleway's public [GitHub repository](https://github.com/orgs/scaleway/teams/sa/repositories): +5. Download migration scripts from Scaleway's public [GitHub repository](https://github.com/scaleway/migration-tools): ```shell - git clone https://github.com/orgs/scaleway/teams/sa/repositories + git clone https://github.com/scaleway/migration-tools ``` 6. [Create](/object-storage/how-to/create-a-bucket/) an Object Storage bucket. From 6883ffc5376c3dff3494b9c65ffe974db1b7a851 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Wed, 30 Jul 2025 14:08:54 +0200 Subject: [PATCH 18/18] Update pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx Co-authored-by: Rowena Jones <36301604+RoRoJ@users.noreply.github.com> --- .../reference-content/migrating-vms-vmware-scaleway.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx index 6e0f6faf09..2d416d0811 100644 --- a/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx +++ b/pages/instances/reference-content/migrating-vms-vmware-scaleway.mdx @@ -178,7 +178,7 @@ This section outlines the migration of a Windows 2019 or 2022 VM with a single v Install-Module -Force ScalewayEcosystem ``` - If it is not possible to modify the VM using VMware, it is possible to do this setup at a later stage of the procedure. + If it is not possible to modify the VM using VMware, you can do this setup at a later stage of the procedure.