How to download a disc VM from backup (proxmox VE)

alex.d

New Member
Aug 30, 2022
19
1
3
1. List of backup (Proxvom VE)
pvesm list 192.168.1.15 | grep 915
2. Restore VM from backup to new VM without LVM store.
qmrestore 192.168.1.15:backup/vm/915/2023-02-01T14:11:10Z 916 --storage PVE-raw
3. Move disk another store
mv /mnt/pve/PVE-raw/images/916/vm-916-disk-0.raw /mnt/pve/PVE-raw/images/template-916.raw
4. Destroy VM
qm destroy 916
5. Convert VM .
qemu-img convert -f raw -O qcow2 /mnt/pve/PVE-raw/images/template-916.raw /mnt/pve/PVE-raw/images/template-916.qcow2

This path is not comfortable and long.
Maybe there is an opportunity to somehow download the VM disk directly from the node via the CLI
 
Last edited:
you could use map + qemu-img convert

Code:
$ proxmox-backup-client map ...
Image ... mapped on /dev/loopX
$ qemu-img convert ... -O qcow2 /dev/loopX OUTPUT_FILE.qcow2

to directly read from PBS into a qcow2 file, for example:

Code:
$ proxmox-backup-client map vm/800/2023-01-16T12:28:10Z drive-scsi0.img --repository test@pbs@localhost:tank
Password for "test@pbs": 
Image 'test@pbs@localhost:8007:tank:vm/800/2023-01-16T12:28:10Z/drive-scsi0.img' mapped on /dev/loop1
$ qemu-img convert -p -O qcow2 /dev/loop1 image.qcow2
 
  • Like
Reactions: Chris
you could use map + qemu-img convert

Code:
$ proxmox-backup-client map ...
Image ... mapped on /dev/loopX
$ qemu-img convert ... -O qcow2 /dev/loopX OUTPUT_FILE.qcow2

to directly read from PBS into a qcow2 file, for example:

Code:
$ proxmox-backup-client map vm/800/2023-01-16T12:28:10Z drive-scsi0.img --repository test@pbs@localhost:tank
Password for "test@pbs":
Image 'test@pbs@localhost:8007:tank:vm/800/2023-01-16T12:28:10Z/drive-scsi0.img' mapped on /dev/loop1
$ qemu-img convert -p -O qcow2 /dev/loop1 image.qcow2

In your version, I need to pass the password in clear text. Is it possible to do this by key or in some other way. The main task is to download the disk image!
 
that probably means that the snapshot you requested does not exist..
 
  • Like
Reactions: alex.d
Is it possible to download the img file?
Without using an intermediate mount?
No, this is because the backup files are stored as chunks on the Proxmox Backup Server for efficient deduplication, so in order to recreate the original image from the chunks, you need the proxmox-backup-client.
 
No, this is because the backup files are stored as chunks on the Proxmox Backup Server for efficient deduplication, so in order to recreate the original image from the chunks, you need the proxmox-backup-client.
Only proxmox-backup-client map and qemu-img convert?
 
you can restore into a raw image file (using proxmox-backup-client restore, but not directly into a block device or a different image file format like qcow2
 
  • Like
Reactions: alex.d