Hi. I'm trying to mount a qcow2 image to extract a file, but get this message. # qemu-nbd --connect=/dev/nbd0 /share/linux/cauldron-sda.img /home/iurt/rpmbuild/BUILD/qemu-2.8.0/nbd/client.c:nbd_init():L645: Failed to set NBD socket /home/iurt/rpmbuild/BUILD/qemu-2.8.0/nbd/server.c:nbd_receive_request():L710: read failed # lsmod | grep nbd nbd 32768 4 # ll /dev/nbd* brw-rw---- 1 root disk 43, 0 Jun 3 09:59 /dev/nbd0 brw-rw---- 1 root disk 43, 1 Jun 3 10:01 /dev/nbd1 brw-rw---- 1 root disk 43, 10 Jun 3 09:39 /dev/nbd10 brw-rw---- 1 root disk 43, 11 Jun 3 09:39 /dev/nbd11 brw-rw---- 1 root disk 43, 12 Jun 3 09:39 /dev/nbd12 brw-rw---- 1 root disk 43, 13 Jun 3 09:39 /dev/nbd13 brw-rw---- 1 root disk 43, 14 Jun 3 09:39 /dev/nbd14 brw-rw---- 1 root disk 43, 15 Jun 3 09:39 /dev/nbd15 brw-rw---- 1 root disk 43, 2 Jun 3 09:39 /dev/nbd2 brw-rw---- 1 root disk 43, 3 Jun 3 09:39 /dev/nbd3 brw-rw---- 1 root disk 43, 4 Jun 3 09:39 /dev/nbd4 brw-rw---- 1 root disk 43, 5 Jun 3 09:39 /dev/nbd5 brw-rw---- 1 root disk 43, 6 Jun 3 09:39 /dev/nbd6 brw-rw---- 1 root disk 43, 7 Jun 3 09:39 /dev/nbd7 brw-rw---- 1 root disk 43, 8 Jun 3 09:39 /dev/nbd8 brw-rw---- 1 root disk 43, 9 Jun 3 09:39 /dev/nbd9
Assignee: bugsquad => thierry.vignaudCC: (none) => marja11
Created attachment 9389 [details] CLI output of qemu-nbd Here the command qemu-ndb --connect works, though I cannot mount the partitions. Error message is # mount /dev/nbd0p1 /mnt/ mount: special device /dev/nbd0p1 does not exist Host is Mageia 6 Cauldron, Client Image is a working instance of Mageia 6 Cauldron, too.
CC: (none) => bequimao.de
Works for me as in other distros. eg: modprobe nbd max_part=63 cd /var/lib/libvirt/images/ qemu-nbd -c /dev/nbd0 mageia-DVD.qcow2 mkdir /mnt/image mount /dev/nbd0 /mnt/image ls /mnt/image qemu-nbd -c /dev/nbd1 mageia-GL.qcow2 mount /dev/nbd1p1 /mnt/image ls /mnt/image/
(In reply to Thierry Vignaud from comment #2) > Works for me as in other distros. > eg: > > modprobe nbd max_part=63 > cd /var/lib/libvirt/images/ > qemu-nbd -c /dev/nbd0 mageia-DVD.qcow2 > mkdir /mnt/image > mount /dev/nbd0 /mnt/image > ls /mnt/image > > qemu-nbd -c /dev/nbd1 mageia-GL.qcow2 > mount /dev/nbd1p1 /mnt/image > ls /mnt/image/ Thanks Thierry. I don't know what I did wrong, but removing nbd and adding it with your suggestion made it work as expected. Had to disconnect before rmmod. # qemu-nbd --disconnect /dev/nbd0 /dev/nbd0 disconnected Cheers, Stig
Created attachment 9392 [details] CLI output of qemu-nbd (more detailed) I still can't mount the partition here. I wonder why the partitions are not included under /dev/nbd*, though everything else seems ok. It works on the same multiboot system (UEFI, GPT) with openSUSE Leap 42.2.
Attachment 9389 is obsolete: 0 => 1
Source RPM: qemu-img-2.8.0-5.mga6 => qemu-img-2.8.1.1-3.mga6.x86_64
Version qemu-img-2.8.1.1-4.mga6.x86_64 now tested with sucess. Setting status to resolved, fixed. Thanks, Ulrich
Resolution: (none) => FIXEDStatus: NEW => RESOLVED