如果虚拟机内部做了LVM,则直接挂载LVM分区有点麻烦
详细命令如下
[root@centos images]# fdisk -lu lvm-ubuntu.img
You must set cylinders.
You can do this from the extra functions menu.
Disk lvm-ubuntu.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: 0x000c848f
Device Boot Start End Blocks Id System
lvm-ubuntu.img1 * 2048 499711 248832 83 Linux
Partition 1 does not end on cylinder boundary.
lvm-ubuntu.img2 501758 20969471 10233857 5 Extended
Partition 2 has different physical/logical endings:
phys=(1023, 254, 63) logical=(1305, 73, 48)
lvm-ubuntu.img5 501760 20969471 10233856 8e Linux LVM
通过上面的命令可以看到这个虚拟机镜像内做了LV