Skip to content

Instantly share code, notes, and snippets.

@pad92
Created July 25, 2012 10:08
Show Gist options
  • Save pad92/3175423 to your computer and use it in GitHub Desktop.
Save pad92/3175423 to your computer and use it in GitHub Desktop.
Mount .qcow2 img file
#!/usr/bin/env sh
#charger le module
modprobe nbd max_part=63
# connecter le systeme a l'image (nbd0 a nbd15 dispo )
qemu-nbd -c /dev/nbd0 image.qcow2
# monter la partition
mount /dev/nbd0p1 /mnt/image
#si lvm, pour voir les lv :
pvscan
vgscan
lvscan
lvs
#une fois fini
#umount ...
#qemu-nbd -d /dev/nbd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment