Skip to content

vCenterScripter is a Python library designed to simplify and enhance the usage of the PyVMOMI library.

Notifications You must be signed in to change notification settings

P923/vCenterScripter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation



vCenterScripter

Python vCenter Helper

@Python

Introduction

vCenterScripter is a Python library designed to simplify and enhance the usage of the PyVMOMI library. vCenterScripter provides developers with an intuitive and streamlined interface, enabling them to automate and interact with VMware vSphere infrastructure effortlessly.

Prerequisites

pyvmomi, PrettyTable

Installing

pip install -e git+https://github.com/P923/vCenterScripter.git#egg=vcenterscripter

Usage

An example of usage.

from vCenterScripter import vm

if __name__ == '__main__':
    si = connect.SmartConnect(host=args.host, user=args.user, pwd=args.pwd,
                              disableSslCertValidation=True)

    # Get names of VMs
    name_vms = list_vm_names(si)

    # Get a VM from vCenter
    vm = get_vm(si, "vm_name")

    # Run a program on VM using vmWare tools
    cred = vim.vm.guest.NamePasswordAuthentication(username=entry.username, password=entry.password)
    run_program(si, vm, cred, "net.exe", program_arguments="user")

    # Generate a snapshot
    generate_snapshot(si, vm, "Snapshot1", "A generated snapshot.")
    
    # And more...

For more documentation see the docstrings.

License

This project is licensed under the MIT License.

Author

Matteo P923 | 2023

About

vCenterScripter is a Python library designed to simplify and enhance the usage of the PyVMOMI library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages