Code Monkey home page Code Monkey logo

vm-automation's Introduction

vm-automation

Python script that can be used to test software/scripts/etc on VMs (currently only VirtualBox is supported).

Both Windows and Linux are supported as host OS.

Configuration

  • vms_list - list of VMs to use. Example: ['w10_x64', 'w10_x86', 'w81_x64', 'w81_x86', 'w7_x64', 'w7_x86']
  • snapshots_list - list of snapshots to use. Example: ['java8', 'java11', 'office2013', 'office2016', 'office2019']
  • vm_gui - start VM with GUI (vm_gui = 'gui') or without GUI (vm_gui = 'headless')
  • vboxmanage_path - path to 'vboxmanage' executable. On Windows you can leave it as-is and add VirtualBox'es folder in $PATH. Example: 'vboxmanage'
  • vm_guest_username - login for guest OS. Example: 'user'
  • vm_guest_password - password for guest OS. Example: 'P@ssw0rd'
  • remote_folder - directory, where executable is uploaded (on guest host). Example: 'C:\\Users\\user\\Desktop\\'
  • vm_network_state - option to enable (vm_network_state = 'on') or disable (vm_network_state = 'off') network on guest VM
  • vm_guest_resolution - change screen resolution on guest. Example: vm_guest_resolution = '1024 768 32'
  • preexec - application or script to run before main file. Example: preexec = 'notepad.exe'
  • postexec - application or script to run after main file. Example: postexec = 'notepad.exe'
  • timeout - global timeout for all vboxmanage commands (seconds). Example: 60
  • calculate_hash - calculate sha256 hash of file. Example: calculate_hash = 1
  • show_links - show links for VirusTotal and Google search. Example: show_links = 1

Usage

python vm-automation.py binary.exe

TODO:

  • Control how many threads run simultaneously (currently equals to number of VMs)

Changelog

Version 0.3.1-0.3.2:

  • Optionally calculate sha256 hash of file and show links to VirusTotal and Google searches
  • Fix some warnings
  • Small fixes

Version 0.3:

  • Added option to enable/disable network on guest
  • Added option to start scripts before/after running main file
  • Added option to change display resolution
  • Code refactoring

Version 0.2:

  • Added multithreading
  • Code refactoring

Version 0.1:

  • First public release

Example videos

  • Windows host (version 0.2):

vm-automation's People

Contributors

pernat1y avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.