命令行虚拟机工具
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