Mounting a VMware disk image ============================ Inspect the disk image: # fdisk -l /path/to/image.vmdk Device Boot Start End Sectors Size Id Type blahblah.vmdk1 * 2048 1026047 1024000 500M 83 Linux blahblah.vmdk2 1026048 33554431 32528384 15.5G 8e Linux LVM Looks good. The first partition must be a boot partition, but we're trying to extract the other stuff, which is inside the LVM. Update the device mapper: # kpartx -av /path/to/image.vmdk This will invoke a loopback mount and result in devices: # ls /dev/mapper/loop* /dev/mapper/loop0p1 /dev/mapper/loop0p2 For RHEL9 and up, the device must be made available to LVM explicitly: # lvmdevices --adddev /dev/mapper/loop0p2 Do a vgscan(8) to ensure that the VG shows up. If it doesn't, try restarting the metadata cache daemon: # service lvm2-lvmetad restart # vgscan Found volume group "fabulousvg" using metadata type lvm2 Excellent. Let's activate: # vgchange -ay fabulousvg # ls /dev/mapper/fabulousvg* /dev/mapper/fabulousvg-root /dev/mapper/fabulousvg-swap Proceed to do the extraction. Dismounting the disk image ========================== After umount(8)'ing, deactivate the VG: # vgchange -an fabulousvg ..and remove the mapped device: # kpartx -dv /path/to/image.vmdk