VMware .vmdk to Proxmox VE 8 VMs

gonzalo.garcia.ncp

New Member
Sep 5, 2023
21
1
3
Hello!

I'm trying to import a virtual machine that comes from VMware (.vmdk) to my Proxmox VE 8 with a zpool.

I've tried with qm importdisk but it is not working.

Also, I have also tried converting .vmdk to .qcow2 using the command qemu-img convert -f vmdk vm-101-disk-0.vmdk -O qcow2 vm-101-disk-0.qcow2, which is how it previously worked for me. However, when doing it on a new Proxmox with the storage in ZFS pool, VM disks are not stored in a filesystem dataset.

Would you be so kind as to help me?

Thank you!
Regards.
 
I've tried with qm importdisk but it is not working.u a

Also, I have also tried converting .vmdk to .qcow2 using the command qemu-img convert -f vmdk vm-101-disk-0.vmdk -O qcow2 vm-101-disk-0.qcow2, which is how it previously worked for me. However, when doing it on a new Proxmox with the storage in ZFS pool, VM disks are not stored in a filesystem dataset.
If you can add more details, such as exact commands with their outputs, log messages, console messages, etc - it may be easier to help

The second command that you are running explicitly states (man qemu-img) that the output (-O OUTPUT_FMT) is qcow2 and that the location of the file is in the current working directory.

If you want to place it elsewhere, you need to specify full path. If you want to write it as raw blocks to a ZFS based volume, then you need change format to raw and point it at an appropriate device.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Of course,

What I'm trying to do is migrate a VM that I have on VMware to Proxmox, and what I have is in .vmdk format. I am unsure what the best way is to migrate.

I have converted the .vmdk to .qcow2, and then I have tried to import the disk:
1709828166409.png

And then I have tried to import it into a previously created VM with no disks. With the same characteristics as the VM in VMware.
1709827953937.png

It imports correctly into the Proxmox VM, but it doesn't boot. It says there's no bootable device.
 

Attachments

  • 1709827878574.png
    1709827878574.png
    45.6 KB · Views: 26
First, did you read carefully https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE ?

Second, importing disk is not enough. Open Proxmox GUI and look at your VM configuration after the import.
You will likely see "unusedX" disk. You need to assign it to a controller, probably scsi and then set appropriate boot order.

There could be many other details, such as BIOS configuration, drivers, additional disks, etc.

good luck with your migration


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Actual command is "qm importdisk <id> .vmdk zfs -format raw". It won't work by using the -flat.vmdk file.
Correct, you need to know the geometry of the disk to be able to properly read/import it. And vmware happens to store that information in a separate file:
Code:
VMDK files. All virtual disks are made up of two files: a large data file equal to the size of the virtual disk and a small text 
disk descriptor file, which describes the size and geometry of the virtual disk. The descriptor file also contains a pointer to the 
large data file, as well as information on the virtual disk's drive sectors, heads, cylinders and disk adapter type. In most cases, 
these files have the same name as the data file associated with it -- i.e., myvm_1.vmdk and myvm_1-flat.vmdk. You can match 
the descriptor file to the data file by checking the Extent Description field in this file to see which flat, RDM (raw device mapping)
 or delta file is linked to it.

https://www.techtarget.com/searchvm...e-files-that-make-up-a-VMware-virtual-machine



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Hi everybody!

I'm on version 8.2.4 of Proxmox and I had success with two ways:

1. Convert to QEMU format:

Code:
qemu-img convert -f vmdk mymachine.vmdk -O qcow2 IMAGES/mymachine-disk-1.qcow2

You have to use that command on the smaller .vmdk descriptor file NOT the large *-flat.vmdk file, but both files have to be present in the same folder.

The resulting qcow2 image has to be put into
Code:
/mnt/pve/<YOUR-STORAGE-NAME>/images/<YOUR-NEW-VM-ID>

Then run:
Code:
qm rescan

Then create your vm, ATTENTION for me it was only working when using the "VMware PVSCSI" as SCSI Controller!

The new image should appear on the "Hardware" tab as "unused" disk. You just have to double click the disk and click "Add".

Start machine

2. Reuse the vmdk files directly:

The same process worked for me even when copying the original vmdk files to the images folder and runnning
Code:
qm rescan
But again, you have to "Add" the unused disk from the descriptor file and the other file has to be in the same directory.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!