Skip to main content

Tool for command line virtual machines

Project description

mech

I made this because I don't like VirtualBox and I wanted to use vagrant with VMWare Fusion but was too cheap to buy the Vagrant plugin.

https://blog.kchung.co/mech-vagrant-with-vmware-integration-for-free/

Usage is pretty straightforward:

Usage: mech [options] <command> [<args>...]

Options:
    -v, --version                    Print the version and exit.
    -h, --help                       Print this help.
    --debug                          Show debug messages.

Common commands:
    (list|ls)         lists all available boxes
    init              initializes a new Mech environment by creating a Mechfile
    destroy           stops and deletes all traces of the Mech machine
    (up|start)        starts and provisions the Mech environment
    (down|stop|halt)  stops the Mech machine
    suspend           suspends the machine
    pause             pauses the Mech machine
    ssh               connects to machine via SSH
    ssh-config        outputs OpenSSH valid configuration to connect to the machine
    scp               copies files to and from the machine via SCP
    ip                outputs ip of the Mech machine
    box               manages boxes: installation, removal, etc.
    global-status     outputs status Mech environments for this user
    status            outputs status of the Mech machine
    ps                list running processes in Guest OS
    provision         provisions the Mech machine
    reload            restarts Mech machine, loads new Mechfile configuration
    resume            resume a paused/suspended Mech machine
    snapshot          manages snapshots: saving, restoring, etc.
    port              displays information about guest port mappings
    push              deploys code in this environment to a configured destination

For help on any individual command run `mech <command> -h`

Example:

Initializing and using a machine from HashiCorp's Vagrant Cloud:

    mech init bento/ubuntu-14.04
    mech up
    mech ssh

mech init can be used to pull a box file which will be installed and generate a Mechfile in the current directory. You can also pull boxes from Vagrant Cloud with mech init freebsd/FreeBSD-11.1-RELEASE. Barring that, mech up <name> can also be used to specify a vmx file to start.

Install

pip install -U mech

or for the latest:

pip install -U git+https://github.com/mechboxes/mech.git

Shared Folders

If the box you init was created properly, you will be able to access the host's current working directory in /mnt/hgfs/mech. If you are having trouble try running:

sudo apt-get update
sudo apt-get install linux-headers-$(uname -r) open-vm-tools

followed by

sudo vmware-config-tools.pl

or

vmhgfs-fuse .host:/mech /mnt/hgfs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mech-0.7.5.tar.gz (23.2 kB view details)

Uploaded Source

File details

Details for the file mech-0.7.5.tar.gz.

File metadata

  • Download URL: mech-0.7.5.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mech-0.7.5.tar.gz
Algorithm Hash digest
SHA256 4ccd464de13f10db3931202430ae37d42b9c39fb387d265a7109e7dd785fe2fe
MD5 474c1d26d0b83c39c872a551b532d665
BLAKE2b-256 cbc4e90f9c62e0e3f3f17e7385a9d6fd910b929faa43fa5d27655b55e696da82

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page