Stefan Fiala
2021-Mar-29 18:32 UTC
[Libguestfs] question about guestfs_add_drive_opts_blocksize
!!Thanks for the help [option 12 is the blocksize from the new version, tacked into the example code]. Still looks like its linked against the original/old libguestfs. Can I make a new libguestfs.so from the libguestfs.a and point to it locally? sfiala at tyan3:~/libguestfs/libguestfs$ rm -Rf tmp/.guestfs-1000 sfiala at tyan3:~/libguestfs/libguestfs$ ls -la tmp total 12 drwxrwxr-x 2 sfiala sfiala 4096 Mar 29 12:26 . drwxrwxr-x 43 sfiala sfiala 4096 Mar 26 13:40 .. -rw-rw-r-- 1 sfiala sfiala 80 Mar 25 17:16 .gitignore sfiala at tyan3:~/libguestfs/libguestfs$ echo $LIBGUESTFS_DEBUG 1 sfiala at tyan3:~/libguestfs/libguestfs$ echo $LIBGUESTFS_TRACE 1 sfiala at tyan3:~/libguestfs/libguestfs$ ./run /mnt/sf_red/libguest-create-disk libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_tmpdir "/home/sfiala/libguestfs/libguestfs/tmp" libguestfs: trace: set_tmpdir = 0 libguestfs: trace: set_cachedir "/home/sfiala/libguestfs/libguestfs/tmp" libguestfs: trace: set_cachedir = 0 libguestfs: trace: set_path "/home/sfiala/libguestfs/libguestfs/appliance" libguestfs: trace: set_path = 0 libguestfs: create: flags = 0, handle = 0x55cba7f8d6e0, program = libguest-create-disk libguestfs: trace: set_trace true libguestfs: trace: set_trace = 0 libguestfs: trace: disk_create "disk.img" "raw" 536870912 libguestfs: trace: disk_create = 0 libguestfs: error: add_drive: unknown option 12 (this can happen if a program is compiled against a newer version of libguestfs, then dynamically linked to an older version) libguestfs: trace: close libguestfs: closing guestfs handle 0x55cba7f8d6e0 (state 0)> On 03/29/2021 12:17 PM Richard W.M. Jones <rjones at redhat.com> wrote: > > > Also you may find it useful to delete the cached appliance between > runs. It is usually located in /path/to/libguestfs/tmp/.guestfs-* > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org
Richard W.M. Jones
2021-Mar-30 16:37 UTC
[Libguestfs] question about guestfs_add_drive_opts_blocksize
On Mon, Mar 29, 2021 at 12:32:52PM -0600, Stefan Fiala wrote:> !!Thanks for the help > > [option 12 is the blocksize from the new version, tacked into the example code]. > Still looks like its linked against the original/old libguestfs. > Can I make a new libguestfs.so from the libguestfs.a and point to it locally?I'm not really sure I understand the question. libguestfs when building from source defaults to building a shared library, and the ./run script sets up LD_LIBRARY_PATH (and other environment variables) to use it. I suggest taking a look at the ./run script itself since it's very simple. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org