R
R
Rad1us2018-10-10 07:20:54
linux
Rad1us, 2018-10-10 07:20:54

How to access img image in KVM?

The redhat website has detailed instructions on how to mount an img image of a kvm virtual machine and access it, the kpartx tool is suggested.
But when I enter the command:
kpartx -a /path/to/guest.img
Absolutely nothing happens - the output of the command is empty, no device /dev/mapper/loop is added. How to win?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rad1us, 2018-10-11
@rad1us

Solved the problem like this:

qemu-nbd -c /dev/nbd0 /path/to/guest.img
mount /dev/nbd0p1 /mnt

J
jcmvbkbc, 2018-10-10
@jcmvbkbc

But when I enter the command:
Absolutely nothing happens - the output of the command is empty,

Add -v to the kpartx command line to make it non-empty -- and show the output.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question