Create a new VM from KVM disk in Proxmox

Today I restored a Cloudera disk to Proxmox KVM to try out this excellent big data open source. I think the procedure is not hard, but it is quite verbose and it might take time to find out where to find each option. So I decided to note here the procedure to Create a new VM from KVM disk in Proxmox.

  1. First, you need to download your KVM image from remote source to Proxmox storage. If you need to export the image, use the “Move disk” feature in Proxmox >> VM >> Hardware and choose local as “Target Storage“.
  2. In Proxmox, go to Datacenter >> Storage, select “local” and allow it to store “Disk Image” in the Content dropdown. Click OK to save the option.
  3. Next, create a new VM with the storage is “local” instead of “local-zfs“. This is an important step that you need to be sure you are choosing “local” and not other option.¬†
  4. After creating the VM, do not start it. Copy and overwrite your remote KVM image to the folder “/var/lib/vz/images/VMID/” and name it with “vm-VMID-disk-1.qcow2“, You will need to replace VMID with your proper name.
  5. Then in Proxmox, select your VM in the left, choose Hardware¬†>> Hard Disk, then choose “Move disk“. In the Target Storage, choose “local-zfs”¬†(or local-lvm) and click on OK to start converting disk.
  6. Then, start the VM normally.
  7. Finally, you can unselect “Disk Image” from Proxmox >> Datacenter >> Storage >> local.

Leave a Reply