Recover VM into a new Proxmox installation

netvolt

New Member
Jun 30, 2022
5
1
3
Hello community,

We have a server setup with 2 disks. The first disk (SSD) is the proxmox installation, the second is the VMs data (with 2 VMs in it).
For unknown reason the SSD disk got several bad blocks and dont start all proxmox services and system anymore. Due that we got by lucky make a backup of /var/lib/pve-cluster folder with database of it. We replaced the damaged disk with a new one, installed proxmox 6.4 (the original was 6.2), then we put the database into the new proxmox installation. By doing this, we got one of the VMs (112) working right away, but the second one (VM 104 - Centos 8 - the most important one) dont start. We get error below if we try to start it up:

11.jpg

- Below are the configuration of VM 104 and disks setup information. Does anyone have some light on what can be done in order to start the VM 104 properly? Any file we need to try to recover from old SSD? Many thanks in advance for any response!

hardware.jpg
options.jpg
vmdisks.jpg
base.jpg
 

aaron

Proxmox Staff Member
Staff member
Jun 3, 2019
2,924
461
88
Can you post the output of lvs inside [code][/code] tags?

In the lsblk output, we can see that vm-104-disk-0 has the RO (read only) flag enabled. The question is why.
 
  • Like
Reactions: netvolt

netvolt

New Member
Jun 30, 2022
5
1
3
Can you post the output of lvs inside [code][/code] tags?

In the lsblk output, we can see that vm-104-disk-0 has the RO (read only) flag enabled. The question is why.
Hi Aaron, follow the lvs below. Thanks in advance

Code:
root@hyper:~# lvs
  LV                        VG   Attr       LSize    Pool   Origin        Data%  Meta%  Move Log Cpy%Sync Convert
  data                      pve  twi-a-tz--  798.71g                      0.00   0.24
  root                      pve  -wi-ao----   96.00g
  swap                      pve  -wi-ao----    4.00g
  dados8                    pve8 twi-aotz--   <1.66t                      76.47  99.14
  snap_vm-104-disk-0_SADC01 pve8 Vri---tz-k 1000.00g dados8 vm-104-disk-0
  snap_vm-104-disk-1_SADC01 pve8 Vri---tz-k  300.00g dados8 vm-104-disk-1
  vm-104-disk-0             pve8 Vri-a-tz-- 1000.00g dados8               85.11
  vm-104-disk-1             pve8 Vwi-a-tz--  300.00g dados8               6.24
  vm-104-state-SADC01       pve8 Vwi-a-tz--   <8.49g dados8               43.75
  vm-112-disk-0             pve8 Vwi-a-tz--  120.00g dados8               97.50
root@hyper:~#
 

aaron

Proxmox Staff Member
Staff member
Jun 3, 2019
2,924
461
88
Interestingly enough, the disk is marked as read only. Which is fine for the snap_vm-104... volumes, but not the the vm-104-disk-0 itself.
Try to change it back to rw with
Code:
lvchange -p rw /dev/pve8/vm-104-disk-0
You might have to adapt the path.
After that, run lvs again. The output for vm-104-disk-0 should be showing it as writable.
Code:
vm-104-disk-0             pve8 Vwi-a-tz-- 1000.00g dados8               85.11
                                ^
 

netvolt

New Member
Jun 30, 2022
5
1
3
Interestingly enough, the disk is marked as read only. Which is fine for the snap_vm-104... volumes, but not the the vm-104-disk-0 itself.
Try to change it back to rw with
Code:
lvchange -p rw /dev/pve8/vm-104-disk-0
You might have to adapt the path.
After that, run lvs again. The output for vm-104-disk-0 should be showing it as writable.
Code:
vm-104-disk-0             pve8 Vwi-a-tz-- 1000.00g dados8               85.11
                                ^
THANK YOU Aaron, the code above worked perfectly. VM is up and running now!
Thank you for your time, your knowledge and your help. These helps make this community stronger and increase the usage of Proxmox by new people like us. The most "free" users you got, more paid users will become active in a near future! Cheers!
 
  • Like
Reactions: aaron

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 your own in 60 seconds.

Buy now!