> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/productos/migrations/how-to/como-migrar-servidores-windows-on-premise-a-plenit.md).

# How to Migrate On-premise Windows Servers to Plenit

To migrate a Windows physical machine to Plenit, you can generate a VHD of its disk with **Disk2vhd**, the SysInternals utility (Mark Russinovich, 2009) that creates a virtual hard disk from a running physical machine.

The flow has three steps: you prepare the import in the platform, map the migration SFTP as a drive, and generate the VHD with Disk2vhd directly to that drive, so it is uploaded to Plenit without intermediate steps.

<br>

> 👍 What you get
>
> The import prepared in Plenit and the VHD from your Windows physical server generated with Disk2vhd and uploaded to the SFTP, ready to deploy the destination server.

<br>

### Before you start

* Log in to the Plenit platform.
* Have access to the section **Migrations** within **Cloud Services**.
* Have a physical machine with **Windows** from which to migrate.

<br>

> 📘 Windows Server 2012: defragment first
>
> Unlike 2016 onward, Windows Server 2012 does not defragment itself. Do it before migrating so the image does not end up larger than necessary and the transfer does not take longer.

<br>

### Step 1. Prepare the migration in Plenit

In **Cloud Services → Migrations**, click **New migration** to open the wizard. If you have already migrated before, this screen also shows the history.

#### 1.1 Service and source type

Select **Servers** as the service to migrate and, as the server type, **Physical**.

{/\* 📸 CAPTURE 1 · wizard · Servers service and Physical type \*/}

![Selection of Servers and Physical type in the wizard](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-01.png)

<br>

#### 1.2 Disk format and delivery method

Select **VHD – Disk Conversion** as the format and **copy via FTP** as the delivery method. Indicate the **name of the disk to import** (the one the system will expect when the data is uploaded) and the **Display name** (the name it will be identified by in the console). Click **Next**.

{/\* 📸 CAPTURE 2 · wizard · VHD-Disk Conversion format, copy via FTP and disk names \*/}

![Disk format and delivery method via FTP](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-02.png)

<br>

#### 1.3 Organization, subscription and deployment

Indicate the **organization**, the **subscription** and the **availability zone** where to deploy. If you do not have a subscription, you can create it here. To the question **Do you want to deploy a new server with the imported disks?**, the usual thing is **Yes**.

{/\* 📸 CAPTURE 3 · wizard · organization, subscription, zone and deploy option \*/}

![Selection of organization, subscription and deployment](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-03.png)

<br>

#### 1.4 Destination server

If you chose to deploy, indicate the **server name** (spaces are allowed), the **operating system**, the **sizing** (CPU and RAM) and the **network type** (standard or VPC; the most common is standard). Click **Finish**.

{/\* 📸 CAPTURE 4 · wizard · destination server configuration \*/}

![Destination server configuration](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-04.png)

<br>

#### 1.5 SFTP connection data

When finished, Plenit shows the status (**preparing transfer** and then, **waiting for transfer**) and the **FTP connection data**: server, user and password. Save them: you will need them in Step 2.

{/\* 📸 CAPTURE 5 · migration summary with FTP connection data \*/}

![FTP connection data in the migration summary](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-05.png)

<br>

### Step 2. Map Plenit SFTP as a drive

For a large image, it is advisable to generate the VHD directly onto the Plenit SFTP instead of saving it locally first. In this guide, **SFTP Drive** from NSoftware is used, but any similar tool will do.

<br>

#### 2.1 Install SFTP Drive

Download it from NSoftware (the download requires registering an email address) and install it with administrator privileges. During installation, use the same email and a name for the registration. It is advisable to restart when finished, although it may work without doing so.

{/\* 📸 CAPTURE 6 · SFTP Drive installation/registration \*/}

![SFTP Drive registration during installation](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-06.png)

<br>

#### 2.2 Create the mapped drive

Open SFTP Drive and click **New** to create the drive with the SFTP data from Step 1:

* **Drive Name**: connection name (this is how it appears in Windows Explorer).
* **Drive Letter**: the drive letter (if you do not specify one, it is assigned automatically).
* **Remote Host**: the SFTP server address.
* **Remote Port**: `22`.
* **Username / Password**: the credentials provided by Plenit.
* **Remote Folder**: leave **User's home folder** (default path, the folder `uploads`).

Click **Test SSH Connection** and, if everything goes well, **OK**. Check in Windows Explorer that the drive appears mapped.

<br>

> 📘 Accept the SSH keys if prompted
>
> When connecting, prompts may appear asking you to accept the SSH keys. Accept them: they are part of the key exchange that establishes the secure connection.

<br>

{/\* 📸 CAPTURE 7 · SFTP Drive · connection data and Test SSH Connection \*/}

![Mapping the SFTP as a drive with SFTP Drive](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-07.png)

<br>

### Step 3. Generate the copy with Disk2vhd

<br>

#### 3.1 Download and run Disk2vhd

Download Disk2vhd from the project's official page on Microsoft (the full SysInternals suite or just Disk2vhd). Unzip it and run it as administrator. There are two versions depending on the architecture: `disk2vhd` for x86 and `disk2vhd64` for x64.

{/\* 📸 CAPTURE 8 · Disk2vhd · download from the Microsoft / SysInternals website \*/}

![Download of Disk2vhd from the Microsoft website](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-08.png)

<br>

#### 3.2 Select the volumes and the output

In the Disk2vhd interface:

* **VHD File name**: specify the path and the name of the file to generate. It must be on an external or additional disk (never one of the ones you are going to copy) and with enough space for the VHD. Here you can point directly to the **mapped drive with SFTP Drive** from Step 2, so the disk is written to Plenit as it is being generated.
* **Volumes to include**: mark only the partitions you are going to migrate, keeping an eye on the size. Do not mark the server's additional disks: those are migrated by repeating the process for each one.
* In the side options, check **Use Volume Shadow Copy** and leave the other two unchecked.

Click **Create**.

<br>

> 📘 Why Volume Shadow Copy
>
> With Volume Shadow Copy, Disk2vhd creates a consistent image of the machine even while it is running. That is what allows you to migrate without stopping the source server.

<br>

{/\* 📸 CAPTURE 9 · Disk2vhd · selected volumes, Use Volume Shadow Copy and output path on the mapped drive \*/}

![Selection of volumes and options in Disk2vhd](https://REEMPLAZA-URL/servidores-migracion-windows-disk2vhd-09.png)

The process time depends on the size of the source disk, the power of the machine and, if you write to the mapped drive, the network speed.

When finished, you will have the VHD. Then return to the **Migrations** menu and follow the guided process that the tool asks you to complete the import.

### Conclusion

The advantage of Disk2vhd over cloning a disk cold is that it uses Volume Shadow Copy: it generates a consistent image of the physical server without stopping it. And if you point the output directly to the mapped SFTP drive, the VHD is written to Plenit as it is created, without the detour of saving it locally and uploading it again.

Just keep two things in mind: that the file name matches the disk to import that you declared in the wizard, and, on Windows Server 2012, defragment first so you do not end up with a heavier image than necessary.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.plenit.com/docs-en/productos/migrations/how-to/como-migrar-servidores-windows-on-premise-a-plenit.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
