How to add an existing virtual disk to Proxmox

It’s trivial to create virtual disks in Proxmox, but what if you want to add an existing disk to a new virtual machine?

The first step is to place the disk image into the directory belonging to the virtual machine, on my system that would be /var/lib/vz/images/<id>/

Obviously the disk image should be in one of the formats supported by Proxmox, such as qcow2 or raw. Use qemu-img convert to convert between formats.

Next, go to Proxmox and check if the disk shows up under “Hardware” as an unused disk:
In my experience, Proxmox doesn’t always detect the new disks automatically.

If that’s the case, you have to update your virtual machine configuration file manually. On my system it would be located at /etc/pve/qemu-server/<id>.conf

At the end of the file, add a new line in the following format:
unused0: local:<id>/<filename>

If the ID of your virtual machine was 102 and the filename of the new disk image was “virtual-machine.raw”, it would look like so:
unused0: local:102/virtual-machine.raw

Save the file and simply reopen the Hardware tab in Proxmox.

Once the new disk image shows up as an unused disk, you can double click on it and configure it for use with the virtual machine.

This entry was posted in How to’s and tagged , . Bookmark the permalink.

7 Responses to How to add an existing virtual disk to Proxmox

  1. Miguel Enriquez says:

    hi friend.

    how to do:
    1) cant put my images on: /var/lib/vz/images because the disk is full but i have much space on /backups/images how to Proxmox recognize it?

    and 2) i go to /etc/pve and i have empty folder…. exist but empty.

    thanks

  2. Sergio says:

    qm rescan adds unused disk if proxmox doesn’t add automatically

  3. nobody knew says:

    Thank you! Great tips!

  4. Matthew Robertson says:

    After struggling to get this to work, I used this instead and worked right away.

    https://www.itsfullofstars.de/2019/07/import-ova-as-proxmox-vm/

  5. David says:

    Wanted to do the same. The detached disk file is on the local-lvm storage and I haven’t yet figured out how to access it. qm rescan does nothing. Running PVE 8.0.3.

    Any ideas here?

Leave a Reply to Matthew Robertson Cancel reply

Your email address will not be published. Required fields are marked *