Mount KVM Disk Without Proxmox

Reading time ~1 minute

Sometimes you need to access guest disk without booting it.

From time to time i just need to access few files from VM backups, so I restore VM to other ID on host and mount disk to prevent network IP conflicts etc.


It can’t be easier


losetup /dev/loop0 /var/lib/vz/images/100/vm-100-disk-1.raw
mount /dev/loop0p1 /mnt/tmpdiskrescue


umount /mnt/tmpdiskrescue


Little more tricky

Kernel module

First, you will need kernel module loaded

modprobe nbd max_part=63


qemu-nbd -c /dev/nbd0 /var/lib/vz/images/100/vm-100-disk-1.qcow2
mount /dev/nbd0p1 /mnt/tmpdiskrescue


umount /mnt/tmpdiskrescue
qemu-nbd -d /dev/nbd0


Generating Docs

Creating pretty and functional API documentation isn't easy.Thanks to open source community and power of search engine I have found few t...… Continue reading

Easy split .sql dump file

Published on June 01, 2016

MySQL Tuning

Published on June 01, 2016