search for: libguestfsmod

Displaying 20 results from an estimated 106 matches for "libguestfsmod".

2011 Jun 16
0
libguestfsmod.so.0.0.0
On Thu, Jun 16, 2011 at 01:02:21PM +0300, C?neyt Sina Koca wrote: > Since the code im trying to gave this error : > > ImportError: /usr/lib/pymodules/python2.6/libguestfsmod.so: undefined > symbol: PyCapsule_New > > I copied this libguestfsmod.so.0.0.0 > from python-libguestfs-1.9.10-1.1.x86_64.rpm package and the code works fine > now. > > When I compared the sizes of these files, libguestfsmod.so.0.0.0 file > in python-libguestfs-1.9.10-1.1....
2016 May 05
1
[PATCH] python: use constants instead of raw values
Extend the internal libguestfsmod module with the CREATE values, so there is no need to hardcode values in GuestFS.__init__. --- generator/python.ml | 7 +++++-- python/guestfs-py-byhand.c | 7 +++++++ python/guestfs-py.h | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/generator/python.ml b/ge...
2015 Sep 16
0
[PATCH] python: Set program name to the true name instead of 'python'.
...generator/python.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/generator/python.ml b/generator/python.ml index c1128f8..1e043fc 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -671,6 +671,8 @@ logvols = g.lvs () \"\"\" +import os +import sys import libguestfsmod "; @@ -714,6 +716,10 @@ class GuestFS(object): self._o = libguestfsmod.create (flags) self._python_return_dict = python_return_dict + # If we don't do this, the program name is always set to 'python'. + program = os.path.basename (sys.argv[0]) +...
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2018 Jan 25
0
Re: python 3 bindings on libguestfs
...3.6/site-packages'] > >>> import guestfs > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/guestfs.py", line 73, in <module> > import libguestfsmod > ModuleNotFoundError: No module named 'libguestfsmod' I guess you need to find where libguestfsmod* was installed and add that to the PYTHONPATH as well. In my python3 install both libraries are in the same directory, I don't know why it's different for you. Rich. -- Richar...
2015 May 28
0
Re: Concurrent scanning of same disk
On Thu, May 28, 2015 at 09:48:41AM +0300, NoxDaFox wrote: > 2015-05-27 15:21 GMT+03:00 Richard W.M. Jones <rjones@redhat.com>: > > > On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > > > * RuntimeError: file receive cancelled by daemon - On r = > > > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > > > * RuntimeError: hivex_close: do_hivex_close: you must call 'hivex-open' > > > first to initialize the hivex handle - On r = libguestfsmod.inspect_os > > > (self._o) > > > > This error is lik...
2015 May 28
2
Re: Concurrent scanning of same disk
...09:48:41AM +0300, NoxDaFox wrote: > > 2015-05-27 15:21 GMT+03:00 Richard W.M. Jones <rjones@redhat.com>: > > > > > On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > > > > * RuntimeError: file receive cancelled by daemon - On r = > > > > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > > > > * RuntimeError: hivex_close: do_hivex_close: you must call > 'hivex-open' > > > > first to initialize the hivex handle - On r = > libguestfsmod.inspect_os > > > > (self._o) > > &g...
2015 May 27
0
Re: Concurrent scanning of same disk
On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > * RuntimeError: file receive cancelled by daemon - On r = > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > * RuntimeError: hivex_close: do_hivex_close: you must call 'hivex-open' > first to initialize the hivex handle - On r = libguestfsmod.inspect_os > (self._o) This error is likely to be -EIO (it's actually a bug in libgue...
2018 Jan 30
0
Re: python 3 bindings on libguestfs
...; for more information. > >>> import guestfs > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/guestfs.py", line 73, in <module> > import libguestfsmod > ImportError: /opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/libguestfsmod.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyString_FromStringAndSize Somehow during ./configure it thought PyString_FromStringAndSize is defined, but when running it's not. I believe that symbo...
2013 Jun 03
1
Problem inspecting Windows images with large registry hives
...r there's a fix, or workaround: Using libguestfs and the python bindings to inspect VMs. Fairly successfully for the most part, but had one Windows image today that fails in the following manner. File "/usr/lib/python2.7/site-packages/guestfs.py", line 910, in inspect_os r = libguestfsmod.inspect_os (self._o) RuntimeError: size of /Windows/System32/config/SOFTWARE is unreasonably large (141819904 bytes) Reproduced it with guestfish: [root@cagedbird images]# guestfish --ro -i -a windows-2008-r2-base+updates-20120518.img libguestfs: error: size of /Windows/System32/config/SOFTWARE i...
2013 Jan 24
1
[PATCH] python: Inherit from 'object' base class.
...ython >= 2.2 if you want to build the python bindings (optional) - Ruby, rake if you want to build the ruby bindings (optional) diff --git a/generator/python.ml b/generator/python.ml index 8752fd3..0b0a79c 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -662,7 +662,7 @@ import libguestfsmod class ClosedHandle(ValueError): pass -class GuestFS: +class GuestFS(object): \"\"\"Instances of this class are libguestfs API handles.\"\"\" def __init__ (self, environment=True, close_on_exit=True): -- 1.8.1
2020 Jul 06
2
[PATCH] python: Add type hints
...++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index f0d6b5d96..3640ee39a 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -685,6 +685,7 @@ logvols = g.lvs() import os import sys import libguestfsmod +from typing import Union, List, Tuple, Optional "; @@ -802,14 +803,44 @@ class GuestFS(object): fun f -> let ret, args, optargs = f.style in let len_name = String.length f.name in + let ret_type_hint = + match ret with + | RErr -> "None&qu...
2015 Feb 03
1
Re: make install ignoring PREFIX for bash_completion
> > After using 'python sdist', can't you use the tarball (in python/dist) > > in order to create a venv directly? > > I think I will be able to install the python library in the venv using > the tarball. However, won't my liguestfs application require some of > the binaries installed as part of 'make install' for running? I am > trying to not
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
The Python 3 bindings currently are unable to deal with non UTF8 characters. This series continues what proposed in RHBZ#1406906. A new function 'set_decode_error_handler' allows the User to specify how to deal with decoding errors. The default behaviour will be raising a UnicodeDecodeError. If the handler is changed to 'surrogateescape', non UTF8 characters will be escaped in a
2013 May 31
2
Re: How to use libguestfs access LVM as non-root user?
On Fri, May 31, 2013 at 3:55 PM, Richard W.M. Jones <rjones@redhat.com>wrote: > On Fri, May 31, 2013 at 10:58:30AM +0800, Qiu Yu wrote: > > Unfortunately, the standard 'disk' group permission only applies to > > /dev/sdX device nodes, not to device mapper nodes created by LVM > commands. > > Actually, it depends on udev rules. On my machine device mapper
2013 May 31
3
Re: How to use libguestfs access LVM as non-root user?
...bguestfs: trace: add_drive_opts = 0 libguestfs: trace: launch libguestfs: trace: launch = -1 (error) Traceback (most recent call last): File "test.py", line 4, in <module> g.launch() File "/usr/lib/python2.6/site-packages/guestfs.py", line 244, in launch return libguestfsmod.launch (self._o) RuntimeError: guestfs_launch failed, see earlier error messages libguestfs: trace: close $ export LIBGUESTFS_DEBUG=1 $ python test.py libguestfs: new guestfs handle 0x26a8250 libguestfs: trace: add_drive_opts "/dev/xenvg/123" "format:qcow2" libguestfs: trace: a...
2018 Jan 30
0
Re: python 3 bindings on libguestfs
...PyDict_SetItemString (dict, "ftyp", PyUnicode_FromStringAndSize (&dirent->ftyp, 1)); #endif So it shouldn't be using that function (PyString_FromStringAndSize) at all. I think most likely you've either attached the wrong log, or it's loading libguestfsmod.so from another build of libguestfs (eg. one linked with Python 2) so it might be you still have the wrong PYTHONPATH. Suggest removing all other copies of libguestfs, or even restarting from a completely fresh install. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat....
2020 Jul 06
0
Re: [PATCH] python: Add type hints
...e changed, 35 insertions(+), 4 deletions(-) > > diff --git a/generator/python.ml b/generator/python.ml > index f0d6b5d96..3640ee39a 100644 > --- a/generator/python.ml > +++ b/generator/python.ml > @@ -685,6 +685,7 @@ logvols = g.lvs() > import os > import sys > import libguestfsmod > +from typing import Union, List, Tuple, Optional > > "; > > @@ -802,14 +803,44 @@ class GuestFS(object): > fun f -> > let ret, args, optargs = f.style in > let len_name = String.length f.name in > + let ret_type_hint = > +...
2011 Jul 26
0
qemu: could not load kernel '/var/tmp/.guestfs-1000/kernel.6941': Permission denied
...in <module> guest_disk = DiskOperations("PYTI.vdi") File "/usr/local/lib/python2.7/dist-packages/pyti/vmanager/diskhandler.py", line 20, in __init__ self.disk_fs.launch() File "/usr/lib/pymodules/python2.7/guestfs.py", line 188, in launch return libguestfsmod.launch (self._o) RuntimeError: unexpected end of file when reading from daemon libguestfs: trace: close The problem is almost certainly this bug in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/...
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
...ndling + of decoding errors. + The default is 'strict' meaning that decoding errors raise a + UnicodeDecodeError. + + The other possible value is 'surrogateescape', see PEP383 for reference. + + Return the previous error handler. + \"\"\" + return libguestfsmod.set_decode_error_handler(handler) + + class GuestFS(object): \"\"\"Instances of this class are libguestfs API handles.\"\"\" diff --git a/python/handle.c b/python/handle.c index 52c36f1d2..b665bb899 100644 --- a/python/handle.c +++ b/python/handle.c @@ -35,6 +35...