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:
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:
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.
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.
qm rescan adds unused disk if proxmox doesn’t add automatically
I didn’t know that. Thanks!
Thank you! Great tips!
After struggling to get this to work, I used this instead and worked right away.