[stordis-toc]
Introduction
A VMDK file is a virtual disk from VMware (ESXi, Workstation). Proxmox VE can import this disk into a new virtual machine. Use this procedure to move a VM from VMware to Proxmox, or to start a VM from a VMDK backup.
Prerequisites
- A Proxmox VE host and access to its web interface.
- SSH access to the Proxmox host as root, to copy the file.
- The VMDK disk of the VM. To export it from VMware ESXi, refer to How to export VMDK image from VMware ESXi?
What you need
- The VMDK file. A disk from ESXi has two files:
name.vmdk(description) andname-flat.vmdk(data). You need both. - A free VM ID in Proxmox. In this guide:
102. - The name of the Proxmox storage for the disk. In this guide:
local-lvm. - Free space on the storage: at least the size of the disk.
Pro Tip
Proxmox VE 8.2 and later has an import wizard for VMs on an ESXi host (Datacenter > Storage > Add > ESXi). If Proxmox can connect to the ESXi host, the wizard can import the full VM. Use the procedure below if you have only the VMDK file.
Step 1: Create the virtual machine
-
In the Proxmox web interface, click Create VM.
-
General: type a name for the VM. Write down the VM ID.
-
OS: select Do not use any media.
-
System: keep the default settings. If the VM on VMware used UEFI, set BIOS to OVMF (UEFI).
-
Disks: delete the default disk. You import the disk in Step 3.
-
CPU: set the sockets and cores. Use the host type if the VM needs all CPU functions of the host, for example for nested virtualization.
-
Memory: set the memory.
-
Network: keep the default settings.
-
Confirm: make sure that Start after created is cleared. Click Finish.
Step 2: Copy the VMDK file to the Proxmox host
On your computer, copy the two disk files to the Proxmox host. Replace the file names and the IP address:
scp name.vmdk name-flat.vmdk root@<proxmox-ip>:/root/
On Windows, you can use WinSCP. Put the two files in the same directory.
Step 3: Import the disk
-
Select the Proxmox node and open the Shell tab.
-
Import the disk. Use the description file (
name.vmdk), not the-flatfile:qm importdisk <vm-id> /root/name.vmdk <storage>
| Parameter | Description | Example |
|---|---|---|
<vm-id> |
The ID of the VM from Step 1 | 102 |
name.vmdk |
The VMDK description file | stordis-backup.vmdk |
<storage> |
The Proxmox storage for the new disk | local-lvm |
Example:
qm importdisk 102 /root/stordis-backup.vmdk local-lvm
LVM storage (local-lvm) always uses the raw format. For a directory storage (for example local), you can add --format qcow2.
NOTE
The progress can stay at 100% for some time. This is normal. Do not stop the command. Wait until it shows that the disk is imported as unused0.
Step 4: Attach the disk and set the boot order
- Select the VM and open the Hardware tab.
- Double-click Unused Disk 0. Select the Bus/Device and click Add.
- Linux VM: SCSI (VirtIO SCSI) is the fastest.
- Windows VM without VirtIO drivers: SATA. Windows does not start from a VirtIO disk without the driver.
- Open Options > Boot Order. Enable the new disk and move it to the top.
Step 5: Start the VM
- Click Start and open the Console tab.
- Make sure that the operating system starts.
- When the VM operates correctly, delete the copied files from the host to free the space:
rm /root/name.vmdk /root/name-flat.vmdk
Troubleshooting
The -flat.vmdk file is missing or is in a different directory. Put both files in the same directory and import the description file again.
Scan the storage again for disks of the VM:
qm rescan --vmid 102
- Make sure that the disk is first in Boot Order (Step 4).
- Make sure that the BIOS setting (SeaBIOS or OVMF UEFI) is the same as on VMware (Step 1).
- For Windows, detach the disk and attach it again as SATA.
Procedure completion
Congratulations!
You have successfully imported a VMDK disk into Proxmox VE. Your VM now operates on the Proxmox server.
Happy networking!
Useful links:
How to export VMDK image from VMware ESXi?
How to set up GNS3 server on Proxmox?
How to install and use qemu-img on Windows and Linux?
For more free resources, visit: https://stordis.com/free-resources/
Comments 0
Comments
Please sign in to leave a comment.