"File restore" in PVE GUI can not access content of VM disks with 4k sector

Jan 27, 2023
3
1
1
Québec City, Canada
I have a standalone PVE host with local storage, plus a PBS server. The host has 3 types of storage devices: NVMe and SATA HDD with 4k sector size and SATA SSDs with 512 bytes sector size.

After creating a VM with a virtual disk carved out from NVMe storage and before the first boot to install the guest OS, I edit the config file of the VM with following option:

Code:
args: -set device.scsi0.logical_block_size=4096 -set device.scsi0.physical_block_size=4096

The VM installation completes without any problem and it works fine. I can confirm it sees the virtual disk presented by the host as a 4k drive.
Local backups and full restores from the host work great.
Also backups and full restores through the PBS server work as expected.

However if I select "File Restore" in the PVE GUI from a PBS backup, I can not expand nor see the content of the VM disk. I assume the minimal Linux VM image started behind the scene is using the default sector size of 512 bytes.

I can provide exhaustive and detailed info about my configuration + qemu logs from /var/log/proxmox-backup/file-restore/ but I'm pretty sure the issue is caused by the 4k setting. To confirm I created a VM with one virtual disk from NVMe storage (with 4k setting), plus a second virtual disk from the SATA SSD (without the 4k setting, thus defaulting to 512 bytes sector). I then backed-up the VM to the PBS server and attempted single file restores. As expected I can drill down the virtual disk with 512 bytes sector and restore individual files, but it does not work for the 4k virtual disk.

To me this issue doesn't even qualify as a bug, it's more like an enhancement request. And I'm a bit sheepish about asking for a new feature on my very first post...

Is there any way to access (and modify) the configuration of the minimal Linux VM used by proxmox-file-restore, in order to make it work with 4k virtual disks ?
 
Last edited:
Is there any way to access (and modify) the configuration of the minimal Linux VM used by proxmox-file-restore, in order to make it work with 4k virtual disks ?
there isn't at the moment, no.

https://bugzilla.proxmox.com/show_bug.cgi?id=5187 might also help, if it gets implemented. until then, you can do the manual equivalent I outlined there as a workaround?
 
there isn't at the moment, no.

https://bugzilla.proxmox.com/show_bug.cgi?id=5187 might also help, if it gets implemented. until then, you can do the manual equivalent I outlined there as a workaround?
Thanks Fabian,

The VMs in my environment are small and the PVE/PBS tandem is very fast, so I never thought I'd be using the live restore feature.

And I will if the enhancement described in bug 5187 is implemented.

For the time being, it's simpler for me to restore the VM on the test/lab PVE host (in fact I have 2 standalone hosts in my setup, the first is turned on 24/7 and running production loads, and the second is for testing purpose), change it's configuration to isolate it from the production network, boot and get the file I need.

However let's say I'm interested in a file that is constantly updated by the OS or the software stack of the guest, Only the single file restore feature can provide a view of the file when the backup was performed.

So I'd prefer the single file restore to be enhanced. It's so convenient. It's an amazing feature. I'm no developer. I think it would be relatively easy to implement but from a "policy" point of view... it might cause a lot more damage than benefits.

For example the 4k setting is very low level. Utilities to set it on physical drives ask you to acknowledge all data will be destroyed before they'll run. I forgot about this when troubleshooting the issue. At one point I wanted to see how the (debian) guest behaved when booting without the 4k setting so I remove it from the config. It didn't even get to the grub screen:

boot-vm-avec-secteur-512o.jpg

But the thing is this test run permanently damaged the VM, it would not boot anymore even after putting back the 4k setting. I performed a full restore (12 seconds and the pbs server isn't even connected to the 10Gbps switch yet) and told myself "good thing the single file restore's mini VM is mounting the guest disks in read-only mode"... but wait a minute, I'm just assuming that ... What if by clicking on the backed-up disks in the PVE GUI I'm silently corrupting them ? So I did a few more tests and confirmed they're intact.

Conclusion: I will not ask for that enhancement. If you're reading this thread and think otherwise, please come forward.

François
 
yeah, integrating it into file-restore would only make sense if we also integrate it into PVE itself ;)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!