[SOLVED] Adding raw image to LVM storage

gdi2k

Renowned Member
Aug 13, 2016
83
1
73
I'm trying to migrate images from a KVM server to Proxmox.

I've seen all the recommendations that I enable image storage on local (not local-lvm), then copy the image there, then attach it to my VM.

The problem is my local storage is too small to accommodate the images I need to import. I made my local storage very small during installation on the recommendations of the forums and now I'm stuck. I have plenty of space on local-lvm and other lvm-storage, but not on local.

I cannot see lvm storage mounts. How can I copy my images straight to LVM storage?
 
I solved my own issue. For anyone in a similar situation: It is possible to dd an existing image straight to the LVM device under /dev/[name_of_volume_group]/vm-xxx-disk-x

In my case, I copied my image from my old server to a USB stick mounted to /mnt on proxmox, then did:

dd if=/mnt/myvirtualmachine.img of=/dev/SSD-1TB/vm-107-disk-1

You have to first create a disk attached to the VM of course, and it does not appear in /dev unless the VM is actually running. So I created a disk attached to the VM, set "Freeze CPU on startup" option, started the VM, ran the above dd command, shutdown the VM, disabled the "Freeze CPU" option, rebooted and... success.
 

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!