命令行虚拟机工具
项目描述
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 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | eb99ffc4edae51626986c0802e13fc383b3a1046274b7d09c1fb1d0f78b1cb0b |
|
MD5 | 55a6464e3d21499e064a4bce4e69e797 |
|
BLAKE2b-256 | 615436fa87c6b16516eb9224047723c99fb34ce9276a8542a73985cb5c7131de |