VM Restore
23.03.2021 01:54
Restoring VM’s after a host SSD gets cooked.
When I went to power my homelab server back on, after sitting idle for 8 months while we moved house, it displayed some concerning ata device warnings on boot. After a reboot it failed an automatic run of fsck -a
and recommended performing a manual run. The root device /dev/mapper/pve-root
was corrupted and after performing several manual filesystem checks the system could no longer boot. The 64G SanDisk SSD(SDSSDP-064G) I was using as the OS disk had shit the bed.
These are some notes from the process of reinstalling the host OS (Proxmox VE) and restoring the VM’s from backup.
- Remove the dead drive and reinstall Proxmox to a backup 128G SSD. (I’ve got a brand new NVME drive on the way to replace this one)
- Mount the 2 WD Black 1TB drives I use as directory/VM disk storage to the host.
- Recreate the config files for the VM’s…
root@pve:/etc/pve/qemu-server# ls
100.conf 101.conf 102.conf 104.conf
root@pve:/etc/pve/qemu-server# cat 100.conf
boot: order=scsi0;ide2;net0
cores: 2
ide2: none,media=cdrom
memory: 2048
name: freenas
net0: virtio=3E:94:1D:50:03:30,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: black1:100/vm-100-disk-1.raw,size=32G
scsi1: /dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WMC4M1155464,size=2000G
scsi2: /dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M2XPP587,size=2000G
scsi3: /dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M0173865,size=2000G
scsi4: /dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M7KDVTJ7,size=2000G
scsi5: /dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M6NXP2AJ,size=2000G
scsihw: virtio-scsi-pci
smbios1: uuid=0469a370-945e-4225-a53e-9f2cc8b7b1ff
sockets: 1
vmgenid: b74c87a6-b8f7-42ae-a47c-14c426cfb856
root@pve:/etc/pve/qemu-server# cat 101.conf
bootdisk: scsi0
cores: 4
memory: 6144
name: docker-01
net0: virtio=92:D5:CF:4C:76:8E,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: black1:101/vm-101-disk-1.raw,size=66G
scsi1: black1:101/vm-101-disk-2.raw,size=200G
scsihw: virtio-scsi-pci
smbios1: uuid=fc830c01-699d-4e7e-8255-2b6e8b451013
sockets: 1
usb0: host=046d:0994
root@pve:/etc/pve/qemu-server# cat 102.conf
bootdisk: scsi0
cores: 4
lock: backup
memory: 4096
name: minecraft
net0: virtio=12:1A:83:CD:0E:D2,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: black2:102/vm-102-disk-1.qcow2,size=200G
scsihw: virtio-scsi-pci
smbios1: uuid=e1feb44f-bfc2-4a75-b175-3c6df2e55b13
sockets: 1
root@pve:/etc/pve/qemu-server# cat 104.conf
bootdisk: scsi0
cores: 1
memory: 512
name: mysql-01
net0: virtio=0A:08:2B:8E:1B:3E,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
protection: 1
scsi0: black2:104/vm-104-disk-1.raw,size=16G
scsihw: virtio-scsi-pci
smbios1: uuid=46dd2aeb-e04a-4c4c-9b71-71844efb79f7
sockets: 1
startup: order=2
Tags:
archive