星期三, 1月 09, 2008

mount a virtual disk

Case1. image file
  1. on guest run -> fdisk -luC /dev/hda
  2. on host run -> mount -o loop,offset 9999999 image_file /mnt/image 9999999=partion start point=start*unit
Case2. physical partition as virtual disk
  1. on host run -> kpartx -av /dev/partion #This tool create device maps from partition tables under /dev/mapper
  2. on host run -> mount /dev/mapper/partion /mnt/virtual_partion

沒有留言: