ESXi

 View Only

VM Operations using UserSession

  • 1.  VM Operations using UserSession

    Posted Dec 10, 2012 06:04 AM

    Hi,

    We are connecting to vcenter as root user and doing client.ImpersonateUser as one of the vcenter user with different ACL. How do we run VM Operations such as PowerOn_Task, MigrateVM_Task, etc-- using usersession returned by ImpersonateUser.

    import psphere
    from psphere.client import Client
    client = Client("192.168.0.109", "root", "password") ##vCenter
    print "\nSucessfully connected to vCenter.\n"

    sm = client.sc.sessionManager
    user_session = sm.ImpersonateUser(userName="new_user")

    How to run VM Operations using aobe user_session ??.