Mounting qcow2 drive
Posted on Sun 31 January 2021 in Software • 1 min read •
The qcow2 (or QEMU copy-on-write) is a virtual disk image format primarly used by QEMU for guest systems. In many circustances, such as reseting passwords, editting or recovering files etc., mouting a qcow2 disk images without running a guest system is required. This can be acheived by Network Block Device
module (or nbd
) on host linux system. At first, we need to define maximum number of partitions expected for the qcow2 disk and then the disk can be mouted with following commands:
1 2 3 4 |
|
The disk image can be unmounted with following commands:
1 2 3 |
|
Depending upon system configuration, you may need to run either one or all commands as root user.