複数のパーティションを持つkvm qemuディスクイメージのマウント

複数のパーティションを持つkvm qemuディスクイメージのマウント

次のコマンドを使用してKVM-qemuディスクイメージをマウントしようとします sudo mount -o loop,offset=32256 centos6.img /mnt/centos6。ただし、次のエラーが表示されますyou must specify filesystem type。ディスクイメージにはより多くのパーティションがあるので、次のことを試しました。このソリューション。しかし、これも同じエラーが発生します。

出力は次のとおりですfdisk -ul centos6.img

Disk centos6.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001da69

      Device Boot      Start         End      Blocks   Id  System
centos6.img1   *        2048     1026047      512000   83  Linux
Partition 1 does not end on cylinder boundary.
centos6.img2         1026048    20971519     9972736   8e  Linux LVM
Partition 2 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(1305, 106, 17)

ベストアンサー1

これは私にとって効果的です。

kpartx -av cento.img

以下で作成したループデバイスを取り付けます/dev/mapper

sudo mount /dev/mapper/loop0p1 /mnt/destination

おすすめ記事