Where is kvm-nbd or qemu-nbd ?

I’m trying to mount a qemu img as nbd device (according to a recipe given recently in the latest German Linux-Mag: “modprobe nbd …, kvm-nbd --connect …”), qemu, kvm, kvm-kmp-default are installed. Whereas this works as described on Ubuntu nicely, both 11.0 and 11.1 complain ‘command kvm-nbd not found’, same for qemu-nbd. Any idea where else they may be ‘hidden’ or what equivalent command sequence one should issue?

Regards nb

Have you checked to see if these are installed - Yast - Software Management
search: nbd,

Yes, nbd is installed, here is the output from sudo zypper se nbd*
S | Name | Zusammenfassung | Typ
i | nbd | Network Block Device Server and Client Utilities | Paket
| nbd | Network Block Device Server and Client Utilities | Quellpaket
i | nbd-doc | Network Block Device Server and Client Utilities | Paket
(sorry for German, it’s a German system).
Also modprobe nbd max_part=8 works ok an lsmod exhibits nbd. Also ‘find / -name “kvm-nbd”’ has no nit nor …“qemu-find”
Hmmm, strange , isn’t it ?

I’m not familiar what you are doing, but does this help
Qemu with kqemu kernel module support - openSUSE

Thanks for the link, but that doesn’t really help. I’m successfully running qemu with appropriate images w/o problems, but what I’m after here is just mount a (qcow2) qemu img directly = w/o running the emulation. The way to achieve that (at least on Ubuntu) is described here (unfortunately in German only):

Linux-Tools beschleunigen das Handling von Festplattenabbildern « 08 « 2009 « Ausgaben « Heft & Abo « Linux-Magazin Online

the core of the procedure being (original German text in dble-quotes + my quick&dirty xlation)

START QUOTE from Linux-Magazin
“Mit Kvm-nbd aus dem KVM-Paket ist es möglich, über das NBD-Protokoll direkt auf den Inhalt von Qemu-Images jeder Couleur zuzugreifen. Damit das Linux-System aber dieses Protokoll nutzen kann, ist zuerst das entsprechende Kernelmodul zu laden. Der Parameter »max_part« ist hier
notwendig, um auch Partitionen innerhalb der Devices oder Images zu unterstützen:”
With kvm-nbd from the kvm package it is possible to access qemu-images directly through the nbd-protocol. First, to enable this protocol in your Linux system, you have to load the corresponding kernel-module, the parameter »max_part« being required to support partitions within the device or image.

modprobe nbd max_part=8

“Die Verbindung zu dem Image stellt jetzt das folgende Kommando her:”
The following command establishes the connection to the image:

kvm-nbd --connect=/dev/nbd0 Festplatte.img

“Das Image ist nun unter »/dev/nbd0« wie eine Festplatte ansprechbar. So zeigt beispielsweise fdisk die Partitionsstruktur an und mit mount bindet der Admin diese einfach in das System ein:”

Now the image can be accessed under »/dev/nbd0« like a disk, e.g., ‘fdisk’ will exhibit partition structure and thru ‘mount’ the admin may make the partition easily available for the system.

mount /dev/nbd0p1 /media/suspect/ -o ro
END QUOTE from Linux-Magazin

IMHO this is in fact a nice procedure to access a qcow2 image not just for actual qemu usage but also as a very elegant and less diskspace consuming method to work with disk images instead of raw dd-images (that’s btw what the quoted article is mainly about). So after it works nicely on an Ubuntu system I’m also interested in getting it to work on openSUSE 11.0/1, I can’t imagine it should be that much of a miracle once kvm-nbd or qemu-nbd can be detected, except kvm on openSUSE has basically different content than Ubuntu’s package ???
Can anybody else detect a working kvm-nbd or qemu-nbd somewhere on his/her openSUSE 11.0/1 system after installing kvm, qemu and nbd ???
Kind regards NB

Funny enough: the official qemu changelog on QEMU says:

version 0.10.0:

  • qemu-nbd utility to mount supported block formats

and the 0.10.1 version supplied with 11.1 explicitly explains in its qemu-doc.html how to invoke qemu-nbd. So, since there is also a qemu-nbd.c in the sources but no binary in the SUSE supplied rpm the obvious question is: bug/overlooked or intentionally left out? If the latter should apply it would clearly be of interest to understand why. Could you or anyone else point me to the people who packaged qemu 0.10.1 for openSUSE?

Kind regards NB

The qemu version we shipped openSUSE 11.1 with does not have qemu-nbd and during the last package update, qemu-nbd was not added by accident.

This has been fixed now for openSUSE 11.2.

I suggest next time to directly report a bug using our bugzilla, please see Submitting Bug Reports - openSUSE for details.