diff --git a/src/bin/proxmox_file_restore/qemu_helper.rs b/src/bin/proxmox_file_restore/qemu_helper.rs index e50a8bbf..9328addf 100644 --- a/src/bin/proxmox_file_restore/qemu_helper.rs +++ b/src/bin/proxmox_file_restore/qemu_helper.rs @@ -201,7 +201,8 @@ pub async fn start_vm( )); drives.push("-device".to_owned()); // drive serial is used by VM to map .fidx files to /dev paths - drives.push(format!("virtio-blk-pci,drive=drive{},serial={}", id, file)); + let serial = file.strip_suffix(".img.fidx").unwrap_or(&file); + drives.push(format!("virtio-blk-pci,drive=drive{},serial={}", id, serial)); id += 1; } diff --git a/src/bin/proxmox_restore_daemon/disk.rs b/src/bin/proxmox_restore_daemon/disk.rs index 08fe7490..0b564e42 100644 --- a/src/bin/proxmox_restore_daemon/disk.rs +++ b/src/bin/proxmox_restore_daemon/disk.rs @@ -268,7 +268,11 @@ impl DiskState { _ => bail!("no or invalid image in path"), }; - let buckets = match self.disk_map.get_mut(req_fidx.as_ref()) { + let buckets = match self.disk_map.get_mut( + req_fidx + .strip_suffix(".img.fidx") + .unwrap_or_else(|| req_fidx.as_ref()), + ) { Some(x) => x, None => bail!("given image '{}' not found", req_fidx), };