Re: [libvirt-users] How to connect to a remote VM ESXi server with Python language?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/12/26 ice <ice_feng@xxxxxxxxx>:
> Hi, Dear Mr/Mrs.
>
> I have trouble in connecting to a VM ESXi server with python.
>
> I am a developer using libvirt to control remote VM ESXi with python
> language. But I am not able to connect to a remote VM ESXi server.
>
> I make my try to solve this issue:
>
> 1: I use the function libvirt.Open() to open the remote VM ESXi Server, but
> I don’t know how to input the password. It seems that there is no parameter
> for password input.

Let's just ignore your second try with virsh. The problem with your
first try is that you need to use libvirt.openAuth() instead of
libvirt.open(). openAuth() allows to pass credentials via a callback
mechanism.

There is a Python example in the libvirt codebase that does this, see

  http://libvirt.org/git/?p=libvirt.git;a=blob;f=examples/python/esxlist.py

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]