[SOLVED] Import .raw disk to VM without using host storage as an intermediate

parazitenew

New Member
Dec 27, 2023
16
2
3
Hi,

I used dd to export an image disk of my VPS directly to a VM in proxmox using ssh. The .raw file is 200GB. Actually the raw file is inside the VM, I'm planning to transfer the disk image to my laptop using FTP and then reimport it to VM as the boot disk.

I found here a trick that says to allow "local storage" to store disk images, then create a new VM and select "Local storage" as the target when we create its disk instead of "lvm-thin", then, replace this disk by the .raw file in /var/lib/vz/images/VM_ID/, then qm rescan then attach the disk. After that, we move this disk from local to lvm-thin using GUI.

This trick worked when I tried with a small size disk, my problem is that my raw file is 200GB and "Local" is only 100GB (by default when I installed proxmox) and the entire host disk is 512 GB.

For this reason I can not transfer the .raw file from my laptop to the host storage. Not enough space.

Is there any other trick I can do ? The .raw file is still in the VM I used to clone the disk from the VPS.

Thanks.
 
Last edited:
For this reason I can not transfer the .raw file from my laptop to the host storage. Not enough space.

Is there any other trick I can do ? The .raw file is still in the VM I used to clone the disk from the VPS.
The easiest trick is to get a USB stick/drive and use it for temporary storage where you can import from.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: parazitenew
The easiest trick is to get a USB stick/drive and use it for temporary storage where you can import from.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
That's an idea, but I don't have a 200GB+ USB drive or stick. But I could mount the folder where the .raw file is in my laptop. I thought to share the folder in my network and mount it in the host. Since I tried to import the disk from my laptop using ssh but the "qm importdisk" command says too many arguments.
 
I installed sshfs on Proxmox and mounted the laptop folder where the .raw is.

sshfs -o allow_other my_microsoft_account@192.168.1.135:F: /mnt/myfolder/

that worked, then I used:

qm disk import 104 /mnt/myfolder/mydisk.raw local-lvm

Actually it is transfering :)