R&D/클라우드

qemu image 마운트

sunshout 2014. 2. 19. 08:46
호스트 머신에서 qemu image를 마운트하여 볼 때
modprobe nbd max_part=63
qemu-nbd -c /dev/nbd0 image.img
mount /dev/nbd0p1 /mnt/image



If LVM is present on image it could be initialized with:

vgscan
vgchange -ay
mount /dev/VolGroupName/LogVolName /mnt/image

Finishing is done with (depending on how it was initalized):

umount /mnt/image
nbd-client -d /dev/nbd0

아래는 아닌듯
vgchange -an VolGroupName
killall qemu-nbd
kpartx -d /dev/loop0
losetup -d /dev/loop0