Programming

Mount QEMU qcow image

daehee87 2015. 12. 17. 19:29

Follow these steps.

Install qemu-utils and enable ndb module

sudo apt-get install qemu-utils
sudo modprobe nbd

Connect the image to the first nbd device

sudo qemu-nbd -c /dev/nbd0 disk.img

Mount the image. 

sudo mount /dev/nbd0p1 /mnt

After you're done, unmount it.

sudo umount /mnt

And disconnect the loopback device too

sudo qemu-nbd -d /dev/nbd0