[Libguestfs] python 3 bindings on libguestfs

abinaya.manikandan at wipro.com abinaya.manikandan at wipro.com
Thu Feb 1 05:00:17 UTC 2018


Hi,

Have tried python2 bindings on libguestfs-1.32.10 (fresh installation).
It seems like still the log is like below:

checking for python... python
checking Python version... 2.7
checking for PYTHON... yes
checking Python prefix... /opt/python/x86_64/2.7.11-1
checking for Python site-packages path... /opt/python/x86_64/2.7.11-1/lib/python2.7/site-packages
checking for Python extension suffix (PEP-3149)... .so
checking for PyCapsule_New in -lc... no
checking for PyString_AsString in -lc... no

But python-guestfs is working fine without any issue on python 2.7.11.

[root at euca-10-254-20-192 libguestfs-1.32.10]$ ./run python
>>> import guestfs
>>> g = guestfs.GuestFS(python_return_dict=True)
>>> help(guestfs)
Help on module guestfs:

NAME
    guestfs - Python bindings for libguestfs

FILE
    /var/fpwork/libguestfs/SOURCES/libguestfs-1.32.10/python/guestfs.py

DESCRIPTION
    import guestfs
    g = guestfs.GuestFS (python_return_dict=True)
    g.add_drive_opts ("guest.img", format="raw")
    g.launch ()
    parts = g.list_partitions ()

    The guestfs module provides a Python binding to the libguestfs API
    for examining and modifying virtual machine disk images.

    Amongst the things this is good for: making batch configuration
    changes to guests, getting disk used/free statistics (see also:
    virt-df), migrating between virtualization systems (see also:
    virt-p2v), performing partial backups, performing partial guest
    clones, cloning guests and changing registry/UUID/hostname info, and
    much else besides.

    Libguestfs uses Linux kernel and qemu code, and can access any type of
    guest filesystem that Linux and qemu can, including but not limited
    to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
    schemes, qcow, qcow2, vmdk.

    Libguestfs provides ways to enumerate guest storage (eg. partitions,
    LVs, what filesystem is in each LV, etc.).  It can also run commands
    in the context of the guest.  Also you can access filesystems over
    FUSE.

I have followed same steps which I tried with python 3 but here its working as expected.

Can you suggest us for further.

Regards,
Abinaya


-----Original Message-----
From: Richard W.M. Jones [mailto:rjones at redhat.com]
Sent: Wednesday, January 31, 2018 7:33 PM
To: Abinaya Sandhiya Manikandan (GIS) <abinaya.manikandan at wipro.com>
Cc: libguestfs at redhat.com
Subject: Re: [Libguestfs] python 3 bindings on libguestfs

** This mail has been sent from an external source **

On Wed, Jan 31, 2018 at 09:09:11AM +0000, abinaya.manikandan at wipro.com wrote:
> Hi,
>
> We have done on fresh instance.
>
> We have manually installed libguestfs-1.32.10.
> I could see below log while running ./configure:
>
> checking Python version... 3.6
> checking for PYTHON... yes
> checking Python prefix... /opt/python/x86_64/3.6.3-1 checking for
> Python site-packages path...
> /opt/python/x86_64/3.6.3-1/lib/python3.6/site-packages
> checking for Python extension suffix (PEP-3149)...
> .cpython-36m-x86_64-linux-gnu.so checking for PyCapsule_New in -lc...
> no

This is supposed to be ‘yes’ which is why it's failing.  You'll have to debug m4/guestfs_python.m4 and config.log to find out why that is but something is obviously broken about your Python installation.

Rich.

--
Richard Jones, Virtualization Group, Red Hat https://clicktime.symantec.com/a/1/QpBj2RntFu4dSMppES6KSQp9ZVvhAKatttH78pTl_WA=?d=12kiPxvxSYRcl6NZxESsHA3TxXXFpt_WZErs3plCmXBhxRSv0U15rzGdpGGpCeSwMY1wO5swkB_Vvzycbtiwa5aBdD-1FdUoaQIPif7noFSFoMgC2e1ufzZQiRTRXgGxT2XD7_8NINSLiJbOjm7gQtRmhLkIXbJdGr3Tn29IqozqySPO--AFa-S-lGmPePW0cRAJ0pcbGtIOsqb1nPOZJMiyRutNANOowl1CnoSSK7yUCoiiInPE6T4wtTosy3tHobiAm6lWo8MXnEX9GOf_7qldHl588OUe2CDuMty5buneMn6iNY0o1iUkgxkXRt5X7UMqQF8L9DkS_4L62HUasjmcjAxkaqXtSO2zyHgXUPkCvB6W3CkVkZbI&u=http%3A%2F%2Fpeople.redhat.com%2F~rjones
Read my programming and virtualization blog: https://clicktime.symantec.com/a/1/4gU8zlWIt6mQGAQlV_FSPN1TQ0sIrcu0zXiC9vG7k7M=?d=12kiPxvxSYRcl6NZxESsHA3TxXXFpt_WZErs3plCmXBhxRSv0U15rzGdpGGpCeSwMY1wO5swkB_Vvzycbtiwa5aBdD-1FdUoaQIPif7noFSFoMgC2e1ufzZQiRTRXgGxT2XD7_8NINSLiJbOjm7gQtRmhLkIXbJdGr3Tn29IqozqySPO--AFa-S-lGmPePW0cRAJ0pcbGtIOsqb1nPOZJMiyRutNANOowl1CnoSSK7yUCoiiInPE6T4wtTosy3tHobiAm6lWo8MXnEX9GOf_7qldHl588OUe2CDuMty5buneMn6iNY0o1iUkgxkXRt5X7UMqQF8L9DkS_4L62HUasjmcjAxkaqXtSO2zyHgXUPkCvB6W3CkVkZbI&u=http%3A%2F%2Frwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc.
https://clicktime.symantec.com/a/1/BBhVfDpXAuYqbEpOddbsSY8ANiAcrMMqmNhfrHpDeNM=?d=12kiPxvxSYRcl6NZxESsHA3TxXXFpt_WZErs3plCmXBhxRSv0U15rzGdpGGpCeSwMY1wO5swkB_Vvzycbtiwa5aBdD-1FdUoaQIPif7noFSFoMgC2e1ufzZQiRTRXgGxT2XD7_8NINSLiJbOjm7gQtRmhLkIXbJdGr3Tn29IqozqySPO--AFa-S-lGmPePW0cRAJ0pcbGtIOsqb1nPOZJMiyRutNANOowl1CnoSSK7yUCoiiInPE6T4wtTosy3tHobiAm6lWo8MXnEX9GOf_7qldHl588OUe2CDuMty5buneMn6iNY0o1iUkgxkXRt5X7UMqQF8L9DkS_4L62HUasjmcjAxkaqXtSO2zyHgXUPkCvB6W3CkVkZbI&u=http%3A%2F%2Fpeople.redhat.com%2F~rjones%2Fvirt-top

______________________________________________________________________
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
______________________________________________________________________




More information about the Libguestfs mailing list