Inspect Guest Disk Contents
This procedure only works for unencrypted disks, or disks where the encryption key is known!
List VMs
qm list
List VMs on PVE node
Get VM disk storage path
On a default installation, you'd swap Guest_Disks with local-lvm -- e.g. local-lvm:vm-9990-disk-0
pvesm path Guest_Disks:vm-9990-disk-0
/dev/zvol/rackdrives/vm-9990-disk-0
Example using VM with ID 9990 and disk stored on ZFS volume, "Guest_Disks"
Get VM disk format
pvesm list Guest_Disks --vmid 9990
Guest_Disks:vm-9990-disk-0 raw images 8589934592 9990
Get the format of the guest disk, disk format is "raw"
Convert raw disk to qcow2
This command runs without producing output, so be patient, especially if converting a larger disk.
qemu-img convert -f raw -O qcow2 /dev/zvol/rackdrives/vm-9990-disk-0 /tmp/9990.qcow2
Store converted disk at /tmp/9990.qcow2
Install Tooling on PVE node
apt install -y libguestfs-tools
Inspect disk files
guestfish --ro -a /tmp/9990.qcow2 -i
Press the "TAB" key twice to see a list of available commands
><fs> cat /etc/hosts
Inspect /etc/hosts on VM disk