VM 125 Disk on NAS Failing with I/O Errors — Migration and Backup Fail

powersupport

Well-Known Member
Jan 18, 2020
330
8
58
31
Hello,


I have a VM (ID 125) running WHM/cPanel. When creating it, I accidentally placed the disk on my NAS Backup storage instead of local storage (local_btrfs).


Symptoms / Issues:
  • The VM sometimes shuts down automatically after starting.
  • Inside the VM, dmesg shows repeated I/O errors on /dev/sda.
  • Attempts to move the disk to local storage via GUI (Disk → Move Storage) fail consistently around 21 GB:


qemu-img: error while reading at byte 21696741376: Input/output error

  • Backups via PBS also fail with Input/output error (job stops at ~20 GB).


Logs / Info:
  • Proxmox logs show VM 125 starts normally, no host-side shutdowns.
  • NAS disk path: NAS-BACKUP:125/vm-125-disk-0.qcow2
  • VM disk size: 1 TB
  • Old backups exist but are too outdated to restore. (can't use the backup)


Questions:
  1. What is the safest way to recover or move this VM disk to local storage without losing data?
  2. Are there any recommended steps to prevent VM crashes while trying recovery?

Any advice is highly appreciated.
 
Hello,

try your luck with ddrescue to copy the qcow2 file to another location. From there you can import it to a new vm and test, if it is still functional and proceed from there.
To be honest: from symptoms you described there is already some data lost. It would be safer to export all config and user data from within the vm and deploy it on a new one rather than having some dorment data damage/loss in a copied disk.

Replacing/repairing the NAS and using proper backup strategy would be a plus afterwards.
 
  • Like
Reactions: waltar