Hi,
Can you please let me know which all are the python versions (2.7/3.5/3.6) can enable in
libguestfs_v13210.
Regards,
Abinaya
-----Original Message-----
From: Richard W.M. Jones [mailto:rjones@redhat.com]
Sent: Wednesday, January 24, 2018 8:01 PM
To: Abinaya Sandhiya Manikandan (GIS) <abinaya.manikandan(a)wipro.com>
Cc: libguestfs(a)redhat.com
Subject: Re: [Libguestfs] python 3 bindings on libguestfs
** This mail has been sent from an external source **
On Wed, Jan 24, 2018 at 09:13:22AM +0000, abinaya.manikandan(a)wipro.com wrote:
Hello,
Please fine below details:
[root@server190 ~]$ cat /etc/redhat-release Red Hat Enterprise Linux
Server release 6.5 (Santiago)
We are trying to import guestfs in python according to manual page:
https://clicktime.symantec.com/a/1/LiRocXZSu8hPwuIgFLMXmvG-CIbXEtJuwKy
oXqR3Szo=?d=Gk343ZAdJ7GH-kcmImlIz1H8hBZFU4o5sb46Q-Bo_SJfp6aA-oaCc3g-cD
bThgfTkPoDnxJOlt_ZAjVEWYvijzqPaMQZ5D-vWQV9fi339EZa2W4Cg-wY-9Rq2hWQjI-z
w_3hV9iLIorlXpBQ-c9vJ6GGzlSn5RrVtiZlQm19uq-hi3GyoYHIn7YJGNQL-r8eLUgxFx
0FwoiV3xsrJehd1RkHVDlpoJcJf5spBgsmoZ-Qve_o1DJiSN1KWNrDuGYw5NmAgDXSg92-
XFw3_6ghcnpI-mJ_MckRbuiyrPXS2Sx3g71POvZVRyf1UfO1lKWII_9xqWpPrTxmQkmVxN
2nMpQLz2ky5SnN239kTxTpNvuT-q_x9Nd3efY%3D&u=http%3A%2F%2Flibguestfs.org
%2Fguestfs-py
I should be able to initialize guestfs with following command:
import guestfs
g = guestfs.GuestFS(python_return_dict=True)
g.add_drive_opts("disk.img", format="raw", readonly=1)
g.launch()
But I could see below issue:
[root@server190~]$ python
Python 3.5.1 (default, Feb 18 2016, 07:20:42) [GCC 4.4.7 20120313 (Red
Hat 4.4.7-16)] on linux Type "help", "copyright", "credits"
or
"license" for more information.
>>> import guestfs
>>> g = guestfs.GuestFS(python_return_dict=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'guestfs' has no attribute 'GuestFS'
Can you please suggest us how to fix this issue.
...
[root@server190 ~]$ guestfish --version guestfish 1.32.10
We have enable python3 bindings on libguestfs according to below guide:
https://clicktime.symantec.com/a/1/YnKgD8WL3PMdWueqq6kVp_XiPr6bSdVOB1G
6c2e_9X4=?d=Gk343ZAdJ7GH-kcmImlIz1H8hBZFU4o5sb46Q-Bo_SJfp6aA-oaCc3g-cD
bThgfTkPoDnxJOlt_ZAjVEWYvijzqPaMQZ5D-vWQV9fi339EZa2W4Cg-wY-9Rq2hWQjI-z
w_3hV9iLIorlXpBQ-c9vJ6GGzlSn5RrVtiZlQm19uq-hi3GyoYHIn7YJGNQL-r8eLUgxFx
0FwoiV3xsrJehd1RkHVDlpoJcJf5spBgsmoZ-Qve_o1DJiSN1KWNrDuGYw5NmAgDXSg92-
XFw3_6ghcnpI-mJ_MckRbuiyrPXS2Sx3g71POvZVRyf1UfO1lKWII_9xqWpPrTxmQkmVxN
2nMpQLz2ky5SnN239kTxTpNvuT-q_x9Nd3efY%3D&u=http%3A%2F%2Flibguestfs.org
%2Fguestfs-building.1.html%23building-python-2-and-python-3-bindings
It looks like you've compiled your own version of libguestfs from source.
Did you run ‘make install’? It's best NOT to do that.
You can access the python bindings from the compiled source directory
using:
./run python
as described here:
https://clicktime.symantec.com/a/1/zCn8seXwE6cb0FzSpu_6iwS-mXcPhqGea-OgmR...
If that doesn't work then you need to send the full output from ‘./configure
&& make’ when you build libguestfs.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
https://clicktime.symantec.com/a/1/jBEt9y40NmeT1C9081epuqKWEQRsPWp7j7N3sB...
Read my programming and virtualization blog:
https://clicktime.symantec.com/a/1/-jspsjGofneuLp0a6Zqb0VMdbGeXQngumdK_pD...
virt-df lists disk usage of guests without needing to install any software inside the
virtual machine. Supports Linux and Windows.
https://clicktime.symantec.com/a/1/7B62pyi2iOOWhSjID_PiHWxA6wsIxoCG_-ebv9...
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit
http://www.symanteccloud.com
______________________________________________________________________
The information contained in this electronic message and any attachments to this message
are intended for the exclusive use of the addressee(s) and may contain proprietary,
confidential or privileged information. If you are not the intended recipient, you should
not disseminate, distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. WARNING: Computer viruses can be
transmitted via email. The recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email.
www.wipro.com
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit
http://www.symanteccloud.com
______________________________________________________________________