跳转到主要内容

命令行虚拟机工具

项目描述

mech

我制作了这个项目,因为我不喜欢VirtualBox,我想使用vagrant与VMWare Fusion一起使用,但又太便宜买不起Vagrant插件。

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

使用非常简单

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 可以用来拉取一个box文件,该文件将被安装并在当前目录中生成一个Mechfile。您也可以使用 mech init freebsd/FreeBSD-11.1-RELEASE 从Vagrant Cloud拉取boxes。除此之外,您还可以使用 mech up <name> 来指定一个vmx文件以启动。

安装

pip install -U mech

或最新版本

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

共享文件夹

如果初始化的盒子创建正确,您将能够访问主机的当前工作目录,在 /mnt/hgfs/mech。如果您遇到问题,请尝试运行

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

随后

sudo vmware-config-tools.pl

或者

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

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

mech-0.7.6.tar.gz (23.5 kB 查看哈希值)

上传时间

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面