命令行虚拟机工具

mech的Python项目详细描述


机械

我做这个是因为我不喜欢虚拟盒子,我想用流浪者 使用vmware fusion,但是太便宜了,买不到这个流浪的插件。

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可用于提取将要安装和 在当前目录中生成一个mechfile。你也可以拉箱子 用mech init freebsd/FreeBSD-11.1-RELEASE从流云中。 除此之外,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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
用Java学习Eclipse可视化编辑器Swing   eclipse如何找到运行Java程序所需的时间?   JAVA用于在Tomcat 8上运行Jena API的lang.UnsupportedClassVersionError   java在Main中调用字符串方法   javascript“子进程”。exec无法运行Java函数   java如何使用Gmail API获取电子邮件正文内容   java为什么客户端看不到服务器发送的第一条消息?   java无法在安卓 WebView中滚动到顶部   从服务器运行web服务时,java代码中的日期为空   从子任务返回后执行后台任务时发生java错误   java无法一致地处理弹出窗口   java(Android)通过蓝牙向µ控制器发送字节   java无法在emulator中启动AVD?安卓工作室   Android Java应用程序正在冻结,没有返回错误消息   java如何使用TestNg记录测试历史?