[SOLVED] Can not import virtual disk

pavel.bischoffi

New Member
Apr 9, 2023
4
0
1
Hello, I have a problem with importing and converting a .vhdx virtual disk to proxmox object storage.

Informations about VM and disk:

Old virtualization platform: MS HyperV
VM OS: Windows server 2012 R2
vhdx size 204 GB, size of virtual disk connected to windows (via disk manager) 1,8T.

I did following steps:

1. Stopped the VM in old HyperV.
2. Created migration cifs folder on another VM, that runs at proxmox where I triing to migrate the affected VM.
3. I copied vhdx file onto folder I created in step 2
4. I connected the folder to proxmox as /mnt/cifs-share
5. I created new VM on proxmox (the VM ID is 106)
6. I ran this command: qm importdisk 106 /mnt/cifs-share/diskfile_072020.vhdx DATA_HDD
7. Afterwards the import has started, after 100% of progress, the error message was shown:

Logical volume DATA_HDD/vm-106-disk-0 in use.
Logical volume "vm-106-disk-0" successfully removed.
volume deactivation failed: DATA_HDD:vm-106-disk-0 at /usr/share/perl5/PVE/Storage.pm line 1280.

For other migrated servers, procedure I described worked.

Any Idea where is the problem?
 
The problem is solved.

I used the SolarWind V2V converter for vhdx to raw convertion.


After I used

lvcreate -L 2038G -n vm-106-disk-0 DATA_HDD
For creating virtual disk in LVM storage
dd if=/mnt/cifs-share/diskfilename.raw of=/dev/DATA_HDD/vm-106-disk-0 bs=64K conv=fsync status=progress
For copying the data into.

Ater I edited the .conf file of VM by
nano /etc/pve/qemu-server/106.conf

In file I added:

ide1: DATA_HDD:vm-106-disk-0

And It worked. :cool: