| 13 | |
| 14 | = mount filesystem inside disk image = |
| 15 | * [http://yudoufu.github.io/blog/2012/04/28/vm-mount-memo/ VM disk image の mount 方法いくつかメモ - (」・ω・)」うー!(/・ω・)/にゃー!] |
| 16 | * [http://www.andremiller.net/content/mounting-hard-disk-image-including-partitions-using-linux Mounting a hard disk image including partitions using Linux | andremiller.net] |
| 17 | |
| 18 | 1. $ sudo fdisk -lu /path/to/libvirt/win-7.img |
| 19 | {{{ |
| 20 | Disk /path/to/libvirt/win-7.img: 34.4 GB, 34359738368 bytes |
| 21 | 255 heads, 63 sectors/track, 4177 cylinders, total 67108864 sectors |
| 22 | Units = sectors of 1 * 512 = 512 bytes |
| 23 | Sector size (logical/physical): 512 bytes / 512 bytes |
| 24 | I/O size (minimum/optimal): 512 bytes / 512 bytes |
| 25 | Disk identifier: 0x2452e44f |
| 26 | |
| 27 | Device Boot Start End Blocks Id System |
| 28 | /path/to/libvirt/win-7.img1 * 2048 206847 102400 7 HPFS/NTFS/exFAT |
| 29 | /path/to/libvirt/win-7.img2 206848 67106815 33449984 7 HPFS/NTFS/exFAT |
| 30 | }}} |
| 31 | 1. $ sudo mount -r -t ntfs {{{-o loop,offset=$((206848*512))}}} /path/to/libvirt/win-7.img /mnt |