Failed to init LibVMI library

785 views
Skip to first unread message

Ady Wahyudi Paundu

unread,
May 5, 2014, 8:58:43 AM5/5/14
to vmit...@googlegroups.com
Hiy'all.

I am new in this VMI thing.
I have successfully install libvmi (def. success: without error).
Now i want to try examples/process-list, however it give an error message:

adywp@proctor:~/master/tmp/libvmi/examples$ ./process-list ubuntu14_01
error: failed to get domain 'ubuntu14_01'
error: Domain not found: no domain with matching name 'ubuntu14_01'
Failed to init LibVMI library.

i try:
 virsh -c qemu:///system list
 Id    Name                           State
----------------------------------------------------
 4     ubuntu14_01                    running

however, if i try
 virsh list
 Id    Name                           State
----------------------------------------------------

nothing come up, so what should i do?

~Ady

Bryan D. Payne

unread,
May 5, 2014, 1:09:08 PM5/5/14
to vmit...@googlegroups.com
Could you provide some additional information?

0) Information on your host OS system.  Distro and version?  Version of QEMU?  Version of kernel?  Did you patch QEMU?
1) The output from running configure.
2) The full debug output from process list.  To get this, uncomment https://github.com/bdpayne/libvmi/blob/master/libvmi/debug.h#L56 and then recompile.

-bryan




--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+u...@googlegroups.com.
To post to this group, send email to vmit...@googlegroups.com.
Visit this group at http://groups.google.com/group/vmitools.
For more options, visit https://groups.google.com/d/optout.

Ady Wahyudi Paundu

unread,
May 6, 2014, 4:58:05 AM5/6/14
to vmit...@googlegroups.com

Hi all,


I have solved this:

error: failed to get domain 'ubuntu14_01'

error: Domain not found: no domain with matching name 'ubuntu14_01'

solution:

setting environment variable LIBVIRT_DEFAULT_URI=qemu:///system


About this error 'Failed to init LibVMI library.', i still cannot figured it out.

my biggest suspicion is i haven't create this '/etc/libvmi.conf'.  However, i don't know how to find all the value required (except ostype of course)

could anybody help me with this?


Thank you,


~Ady

Ady Wahyudi Paundu

unread,
May 6, 2014, 4:59:42 AM5/6/14
to vmit...@googlegroups.com, br...@thepaynes.cc

Hi Bryan, answering your question:


0.) 

#uname -a

Linux proctor 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


#qemu --version

QEMU emulator version 2.0.50, Copyright (c) 2003-2008 Fabrice Bellard


kernel? do you mean KVM?

#kvm --version

QEMU emulator version 2.0.50, Copyright (c) 2003-2008 Fabrice Bellard


QEMU patched using tools/qemu-kvm-patch/kvm-physmem-access-physmem-snapshot_1.6.0.patch


one more thing, i'm using https://github.com/mzguanglin/libvmi.git, its forked from your main libvmi.  I use this, because compiling main libvmi (from git) after patching gave error.


1) running configure:

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether make supports nested variables... yes

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables... 

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking whether gcc understands -c and -o together... yes

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking how to print strings... printf

checking for a sed that does not truncate output... /bin/sed

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for fgrep... /bin/grep -F

checking for ld used by gcc... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop

checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for dlltool... no

checking how to associate runtime and link libraries... printf %s\n

checking for ar... ar

checking for archiver @FILE support... @

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc object... ok

checking for sysroot... no

checking for mt... mt

checking if mt is a manifest tool... no

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for dlfcn.h... yes

checking for objdir... .libs

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC -DPIC

checking if gcc PIC flag -fPIC -DPIC works... yes

checking if gcc static flag -static works... yes

checking if gcc supports -c -o file.o... yes

checking if gcc supports -c -o file.o... (cached) yes

checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking whether build environment is sane... yes

checking for xs_read in -lxenstore... no

checking xenstore.h usability... no

checking xenstore.h presence... no

checking for xenstore.h... no

checking xs.h usability... no

checking xs.h presence... no

checking for xs.h... no

checking for vcpu_guest_context_any_t... no

checking for grep... (cached) /bin/grep

checking for lsmod... /sbin/lsmod

checking for virConnectOpen in -lvirt... yes

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for FUSE... yes

checking for bison... bison

Found yacc as bison.

checking for bison... (cached) bison

checking for lex... lex

Found lex as lex.

checking for flex... (cached) lex

checking lex output file root... lex.yy

checking lex library... -lfl

checking whether yytext is a pointer... yes

checking for GLIB... yes

checking for CHECK... yes

checking that generated files are newer than configure... done

checking that generated files are newer than configure... done

configure: creating ./config.status

config.status: creating tools/vmifs/Makefile

config.status: creating Makefile

config.status: creating libvmi.pc

config.status: creating libvmi/Makefile

config.status: creating libvmi/config/Makefile

config.status: creating examples/Makefile

config.status: creating tests/Makefile

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

-------------------------------------------------------------------------------

LibVMI is configured as follows. Please verify that this configuration

matches your expectations.


Host system type: x86_64-unknown-linux-gnu

Build system type: x86_64-unknown-linux-gnu

Installation prefix: /usr/local


Feature      | Option                    | Reason

-------------|---------------------------|----------------------------

Xen Support  | --enable-xen=no           | missing xenstore

Xen Events   | --enable-xen-events=no    | no

KVM Support  | --enable-kvm=yes          | yes

File Support | --enable-file=yes         | yes

Shm-snapshot | --enable-shm-snapshot=yes | yes

-------------|---------------------------|----------------------------


Tools        | Option                    | Reason

-------------|---------------------------|----------------------------

VMIFS        | --enable-vmifs=yes              | yes


If everything is correct, you can now run 'make' and (optionally)

'make install'.  Otherwise, you can run './configure' again.



2) #process-list ubuntu14_01

LibVMI Version 0.11.0

--found KVM

LibVMI Mode 4

--got id from name (ubuntu14_01 --> 3)

**set image_type = ubuntu14_01

--libvirt version 1002004

**set size = 2147483648 [0x80000000]

--qmp: virsh qemu-monitor-command ubuntu14_01 '{"execute": "pmemaccess", "arguments": {"path": "/tmp/vmitgUOrg"}}'

--kvm: using custom patch for fast memory access

--connect() failed to /tmp/vmitgUOrg

Failed to init LibVMI library.


For your kind attention i thank you


~Ady

Ady Wahyudi Paundu

unread,
May 6, 2014, 11:46:01 PM5/6/14
to vmit...@googlegroups.com

Hi, problems solved (thx to Nimish),
It turns out that the problem was indeed from /etc/libvmi.conf
I have solved it using offset finder in the tools directory.

~Ady
Reply all
Reply to author
Forward
0 new messages