0

so i have a kvm image that i'm trying to mount:

[0c79dafb-abb7-4714-9a0a-4e16f0b305e7]# tree
.
├── console.log
├── disk
├── disk.info
└── libvirt.xml

[0c79dafb-abb7-4714-9a0a-4e16f0b305e7]# qemu-img  info disk
image: disk
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 4.8G
cluster_size: 65536
backing file: /var/lib/nova/instances/_base/fdb833a78da2cbc435b43cad1bbc64b5d13ec740
Format specific information:
    compat: 1.1
    lazy refcounts: false

when i try kpartx it appears to do nothing:

[0c79dafb-abb7-4714-9a0a-4e16f0b305e7]# kpartx -lv disk
loop deleted : /dev/loop0

any ideas? thanks!

yee379
  • 191
  • 1
  • 5

1 Answers1

0

kpartx works only with raw (uncompressed) images. To mount any image supported by libvirt use guestmount(1):

guestmount -a IMAGE MOUNTPOINT
Martian
  • 1,100
  • 8
  • 8