Skip to content

Instantly share code, notes, and snippets.

@ekiara
Last active June 30, 2021 16:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekiara/e8e20aa089f38d878a9041c477450989 to your computer and use it in GitHub Desktop.
Save ekiara/e8e20aa089f38d878a9041c477450989 to your computer and use it in GitHub Desktop.
Mounting a qcow2 "partition" in Fedora
# http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html
# Create Image
```
$ qemu-img create -f qcow2 ./image.qcow2 64G
```
```
$ sudo dnf update && dnf install libguestfs.x86_64
$ sudo dnf install libguestfs-tools
$ # To MOUNT
$ sudo guestmount -a ./image.qcow2 -m /dev/sda1 /tmp/mounted/
$ # TO UNMOUNT
$ sudo guestunmount /tmp/mounted/
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment