Archive for the ‘kvm’ Category

    losetup /dev/loop0 image_file.img
    kpartx -av /dev/loop0
    mount /dev/mapper/loop0p1 /mnt
    # now go to /mnt and make the change you want and unmount as below
    umount /mnt
    kpartx -dv /dev/loop0
    losetup -d /dev/loop0

References :

http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/how-to-mount-a-kvm-image-file-787557/

http://blog.dustinkirkland.com/2008/10/mounting-kvm-disk-image.html

http://blog.dustinkirkland.com/2008/10/mounting-kvm-disk-image.html

Advertisements