Mounting qcow2, vdi, ... disk images: Difference between revisions

From Notes to self
Jump to navigation Jump to search
Created page with "'''Make sure that the virtual machine are not running!''' * <code># modprobe nbd</code> * <code># qemu-nbd -c /dev/nbd0 path/to/image/file</code> * List the partitions <code>..."
 
No edit summary
 
Line 3: Line 3:
* <code># modprobe nbd</code>
* <code># modprobe nbd</code>
* <code># qemu-nbd -c /dev/nbd0 path/to/image/file</code>
* <code># qemu-nbd -c /dev/nbd0 path/to/image/file</code>
* List the partitions <code># fdisk -l /dev/nbd0</code>
* List the partitions: <code># fdisk -l /dev/nbd0</code>
* <code># mount /dev/nbd0p1 /mnt</code>
* <code># mount /dev/nbd0p1 /mnt</code>
* <code># umount /mnt</code>
* <code># umount /mnt</code>

Latest revision as of 09:13, 23 October 2020

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