*** Note – This guide is for VMs that have a ‘KVM’ hypervisor, however the same principles apply to other hypervisors

  1. Login to the host of the VM
  2. Verify the VM you are fixing is present
    • virsh list –all
  3. Shutdown the VM
    • virsh shutdown [VM]
  4. Verify the VM is shutdown (if not, may have to use virsh destroy [VM])
    • virsh list –all
  5. Determine the volume that the VM is using
    • virsh domblklist [VM] 
    • fdisk -l
  6. Look for all volumes and partitions the VM is using
    • ls /dev/mapper
  7. Run a filesystem check on all volumes associated with the VM
    • If it’s NOT an xfs file system:
      • fsck -f -y /dev/mapper/[enter volume associated with VM]
    • If it IS an xfs file system:
      • xfs_repair -n /dev/mapper/[enter volume associated with VM]
      • xfs_repair /dev/mapper/[enter volume associated with VM]
  8. Run a second file system check on all volumes
  9. Once the check reveals that the filesystem is clean – start the VM
    • virsh start [VM]

Leave a Reply

Your email address will not be published. Required fields are marked *