Hi, while investigating possibilities to access data inside qcow* images on OpenBSD[1], I discovered libqcow's qcowmount does not work:
Flow below: - info about qcow2 disk - qcowmount the disk - ls -l /mnt - vnconfig - chmod Thank you for clarification. [1] https://marc.info/?l=openbsd-misc&m=151872394819788&w=2 Jiri # qemu-img info test.qcow2 image: test.qcow2 file format: qcow2 virtual size: 20G (21474836480 bytes) disk size: 2.8G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: true refcount bits: 16 corrupt: false # qcowmount -X allow_root test.qcow2 /mnt qcowmount 20170222 # ps auxww | grep '[q]cowmount' root 92331 0.0 0.0 448 1308 ?? Is 10:33PM 0:00.08 qcowmount -X allow_root test.qcow2 /mnt # ls -la /mnt total 12 dr-xr-xr-x 2 root wheel 0 Feb 15 22:34 . drwxr-xr-x 14 root wheel 512 Feb 14 11:42 .. -r--r--r-- 1 root wheel 21474836480 Feb 15 22:34 qcow1 host1# file /mnt/qcow1 /mnt/qcow1: x86 boot sector; partition 1: ID=0x83, active, starthead 32, startsector 2048, 1024000 sectors; partition 2: ID=0x8e, starthead 221, startsector 1026048, 40916992 sectors # vnconfig vnd0 /mnt/qcow1 vnconfig: VNDIOCSET: Permission denied 23767 vnconfig 1518730964.047329 CALL open(0x98e61332060,0<O_RDONLY>) 23767 vnconfig 1518730964.047336 NAMI "/dev/rvnd0c" 23767 vnconfig 1518730964.047348 RET open 3 23767 vnconfig 1518730964.047351 CALL ioctl(3,VNDIOCSET,0x7f7ffffc4f78) 23767 vnconfig 1518730964.047358 NAMI "/mnt/qcow1" 23767 vnconfig 1518730964.047670 RET ioctl -1 errno 13 Permission denied # chmod 644 /mnt/qcow1 chmod: /mnt/qcow1: Function not implemented 11286 chmod 1518729842.168399 CALL fstatat(AT_FDCWD,0x15cad2c79a78,0x15cad2c79a88,0<>) 11286 chmod 1518729842.168404 NAMI "/mnt/qcow1" 11286 chmod 1518729842.168639 STRU struct stat { dev=9729, ino=2, mode=-r--r--r-- , nlink=1, uid=0<"root">, gid=0<"wheel">, rdev=0, atime=1518729782<"Feb 15 22:23:02 2018">, mtime=1518729782<"Feb 15 22:23:02 2018">, ctime=1518729782<"Feb 15 22:23:02 2018">, size=21474836480, blocks=4, blksize=512, flags=0xffffffff, gen=0xffffffff } 11286 chmod 1518729842.168644 RET fstatat 0 11286 chmod 1518729842.168650 CALL open(0x15c896b351db,0x10000<O_RDONLY|O_CLOEXEC>) 11286 chmod 1518729842.168656 NAMI "." 11286 chmod 1518729842.168661 RET open 3 11286 chmod 1518729842.168667 CALL fchdir(3) 11286 chmod 1518729842.168671 RET fchdir 0 11286 chmod 1518729842.168675 CALL fchmodat(AT_FDCWD,0x15cb00fa3000,0100644<S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH|S_IFREG>,0<>) 11286 chmod 1518729842.168680 NAMI "/mnt/qcow1" 11286 chmod 1518729842.168825 RET fchmodat -1 errno 78 Function not implemented Why it cannot get 'activated' with VNDIOCSET? Is it because our FUSE does not have 'allow_root' option? # sysctl kern.version ; pkg_info | grep libqcow kern.version=OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP libqcow-20170222p0 library and tools to access the QEMU Copy-On-Write (QCOW)