[SOLVED] Converting VHDX to raw?

killmasta93

Renowned Member
Aug 13, 2017
958
56
68
30
Hi,
I was wondering if someone else has accomplish transferring physical hardware windows server 2012r2 to Proxmox Raw.
I used the software disk2vhd which i made a vhdx then copy it to a usb and installed ntfs-3g, I mounted the USB drive and i ran this command to convert it to RAW

qemu-img convert -f vhdx -O raw windowserver.vhdx windowsever.raw

my question is i look for the .raw disk though winscp which on the webgui shows local-lvm:vm-101-disk-1 but its a symbolic link and when i try to open it it shows me an error saying "
No such file or directory.
Error code: 2
Error message from server: No such file
/dev/dm6

Any ideas?

Thank you
 
you can use
Code:
qm importdisk <vmid> <path-to-file> <target-storage>

see
Code:
man qm
 
Thanks for the reply, but im somewhat lost, would i be importing from vhdx to raw?

So in this case when i convert to raw within the USB
Code:
qemu-img convert -f vhdx -O raw windowserver.vhdx windowsever.raw

Then i would transfer the raw file from the USB which is mounted on /media/external to local-LVM something like this? as the vm is id is 101 and would i leave the <>? or remove it
Code:
qm importdisk <102> </media/external/vhdx/windowserver.raw> </dev/pve>

Thank you
 
you can directly import the vhdx files, no need to first convert to raw

and the <target-storage> is the storage id defined in proxmox (e.g. local or local-lvm)
an example call:

Code:
qm importdisk 999 /tmp/my-image.vhdx local-lvm
 
  • Like
Reactions: killmasta93
you can directly import the vhdx files, no need to first convert to raw

and the <target-storage> is the storage id defined in proxmox (e.g. local or local-lvm)
an example call:

Code:
qm importdisk 999 /tmp/my-image.vhdx local-lvm
Thanks for the reply, that did the trick, Im guessing i would need to install some drivers before putting into proxmox? as the server keeps getting BSOD, I was reading needed to install the reg file of the merg before converting it to VHDX

Thank you

Solved the installing merg reg did the trick then install the Virtio drivers so far so good
 
Last edited:
you can directly import the vhdx files, no need to first convert to raw

and the <target-storage> is the storage id defined in proxmox (e.g. local or local-lvm)
an example call:

Code:
qm importdisk 999 /tmp/my-image.vhdx local-lvm

This worked a treat bringing virtualbox .vhd into Proxmox, thanks
 

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!