How to import VMDK image to Proxmox ?

STORDIS-vmdk-proxmox-banner-3200x1200.png

[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

  1. A Proxmox VE host and access to its web interface.
  2. SSH access to the Proxmox host as root, to copy the file.
  3. 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) and name-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

  1. In the Proxmox web interface, click Create VM.

    Create VM button in Proxmox

  2. General: type a name for the VM. Write down the VM ID.

    General tab with the VM name and VM ID

  3. OS: select Do not use any media.

    OS tab with the Do not use any media option

  4. System: keep the default settings. If the VM on VMware used UEFI, set BIOS to OVMF (UEFI).

    System tab with the default settings

  5. Disks: delete the default disk. You import the disk in Step 3.

    Disks tab with the default disk deleted

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

    CPU tab with sockets, cores and CPU type

  7. Memory: set the memory.

    Memory tab

  8. Network: keep the default settings.

    Network tab with the default settings

  9. Confirm: make sure that Start after created is cleared. Click Finish.

    Confirm tab with Start after created cleared


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

  1. Select the Proxmox node and open the Shell tab.

    Shell tab of the Proxmox node

  2. Import the disk. Use the description file (name.vmdk), not the -flat file:

    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

  1. Select the VM and open the Hardware tab.
  2. 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.
  3. Open Options > Boot Order. Enable the new disk and move it to the top.

Step 5: Start the VM

  1. Click Start and open the Console tab.
  2. Make sure that the operating system starts.
  3. 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 import stops with an error about the file

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.

The Hardware tab does not show the imported disk

Scan the storage again for disks of the VM:

qm rescan --vmid 102
The VM does not start from the disk
  • 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

Articles in this section