To mount a vhd file under Linux (tested with Debian buster), firstly get the following;
apt install libguestfs-tools
then do;
virt-list-partitions FILE.vhd
where FILE.vhd is the filename in the current path of the vhd file. This will show us which partitions are in the image, such as /dev/sda1
We can then do;
guestmount -a FILE.vhd -m /dev/sda1 --ro /media/vhd
where FILE.vhd is the name of the vhd file (as before), /dev/sda1 is the output from the previous command and /media/vhd is the mount point.
[source]
No comments:
Post a Comment
Note: only a member of this blog may post a comment.