Mounting qcow2, vdi, ... disk images

From Notes to self
Revision as of 09:13, 23 October 2020 by Verbovet (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Make sure that the virtual machine are not running!

  • # modprobe nbd
  • # qemu-nbd -c /dev/nbd0 path/to/image/file
  • List the partitions: # fdisk -l /dev/nbd0
  • # mount /dev/nbd0p1 /mnt
  • # umount /mnt
  • # qemu-nbd -d /dev/nbd0
  • # modprobe -r nbd