命令行虚拟机工具

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如何在导入到Google工作表时使用ApachePOI显示系列标签   java在Swing表上修改数据生成SQL   java TCP数据包在网络级别合并   java自动连线bean在线程位置为空   javasocket。禁用无线连接时getOutputStream()阻塞   JSON上的javascript字符串数组。stringify输出unicode字符   java在Oracle数据库中存储不同类型数据的最佳体验   Spring MVC中模板引擎后的java进程输出   不知从哪里来的java空字符串。   如何加载java。使用Adobe Flex的客户端的属性文件?   java如何替换多层括号之间的所有内容?   {JSONObject必须以java'开头   java使用commandButton或commandLink返回并管理HTML控件值   java Android大文本视图动态   java JMock需要自定义类   java Android应用程序在emulator中工作,但在设备中失败   java连接到derby数据库时使用什么文件路径格式?   java在一个函数调用中返回两个结果?