Mount vm root disk to a different vm

Epicblood

New Member
Oct 30, 2021
2
0
1
30
Hey,
I broke one of my VMs and it no longer boots. I know why it is broken, but as it won't boot I can't fix it.
How can I mount this vm's disk to another VM?

I tried just adding the lvm disk to an existing (ubuntu) vm in the conf file, but when I try to mount it inside the VM, it gave me an error about being an LVM disk
Code:
mount: /mnt: unknown filesystem type 'LVM2_member'.

When I run lvmdiskscan it correctly finds that disk as an LVM physical volume, but I can't seem to mount it, and it doesn't show up with lvscan.
 
Last edited:
check the general lvm docs: 'man lvm'
but the tl;dr is: you first need to do a 'pvscan' and/or 'vgscan' before you do an 'lvscan'
you can only mount an lv when it is activated (you can do that with 'lvchange')
 
  • Like
Reactions: Epicblood