If you are using a full disk image for your VM, instead of using a file system, you cannot simply mount it directly using
mount -o loop d0.img |
Use the following commands to see the partitions in your disk, and then mount them.
# kpartx -av d0.img |
add map loop0p1 : 0 29333504 linear /dev/loop0 2048 |
add map loop0p5 : 0 1380352 linear /dev/loop0 29337600 |
# mount /dev/mapper/loop0p1 /mnt |
# ls /mnt |
bin cdrom etc initrd.img lib media opt root selinux sys usr vmlinuz |
boot dev home initrd.img.old lost+found mnt proc sbin srv tmp var |
# unmount /mnt |
# kpartx -d d0.img |
The last two commands are to unmount and delete the partition mappings.
I referred this link: http://ppadala.net/blog/2010/09/kpartx-to-mount-vm-disk-images/
No comments:
Post a Comment