Proxmox – Uploading disk image

kvm-virtualizationmigrationproxmoxvirtualization

I've got a KVM Virtual Machine in my local PC, and I'd like to copy it to a Proxmox server. According to the docs, I just have to create a new VM on Proxmox and add the existing disk image to it, but how do I upload the image to the server? In the admin panel, if I click in MyStorage -> Content -> Upload, it just give me options to upload ISOs, VZDump backup files or OpenVZ templates. Would it be enough with a copy using scp? In that case, in which folder?

Best Answer

Is your storage not set to allow image files? Go to Datacenter -> Storage tab, select your storage and edit. Under "Content", make sure that "Images" is selected.

I just checked mine and am seeing the same thing as the OP. I would scp the file up and then manually edit the VM's .conf file.

Local storage on proxmox is in /var/lib/vz. There should be an "images" subdirectory with a directory there for each VM (named by the VM number). You can scp the files directly there.

For adding the existing file to the VM, I've had good luck editing the VM's .conf file directly. Look in /etc/pve/qemu-server/ for a file with the VM number followed by .conf.

It's a good idea to create a second test VM so you can refer to it's .conf file to make sure you get the syntax right.

-- adding text from a comment below

I think you can scp the file up. You probably want to look at /var/lib/vz/images/{VMID}/ for the destination. Then maybe look at /etc/pve/qemu-server/{VMID}.conf and add a line for the storage.