# Vagrant Mac 版：创建可复现虚拟机的命令行工具

_As of 2026-11-27_

- **Version:** 2.4.9
- **Developer:** HashiCorp
- **License:** Free

Vagrant 是 HashiCorp 推出的命令行工具，它根据一个名为 Vagrantfile 的文本文件创建并配置虚拟机。它驱动 VirtualBox 等提供程序（provider），让整个团队拿到一模一样的开发环境。

A development machine set up by hand never comes out the same twice. Vagrant describes it in a text file, the Vagrantfile, and builds it with one command.
What it does well

One file, one command. The Vagrantfile names a base image, called a box, and the machine's settings; vagrant up builds it and vagrant destroy removes it.
Providers. VirtualBox and Docker work out of the box; VMware and others are added as plugins.
Provisioning. Shell scripts or tools such as Ansible install and configure software when the machine is first created.
Synced folders and networking. Your project folder is shared with the machine, and forwarded ports let a browser on the Mac reach services inside it.

Who it is for
Developers and operations engineers who need virtual machines they can rebuild from scratch, for example to test deployment scripts.
Good to know
Vagrant has no window and no virtualization of its own: you work in Terminal and install a provider separately. HashiCorp ends Vagrant's life at the end of 2026, with no updates afterwards, so think twice before starting a new project on it. For Linux services, Docker Desktop is the usual choice; for quick Ubuntu machines, look at Multipass.
How to install

On the download page, choose the build for your chip: ARM64 for Apple Silicon, AMD64 for Intel.
Open the disk image and double-click vagrant.pkg, then follow the installer's steps.
Install a provider such as VirtualBox, then run vagrant up in Terminal, in a folder that contains a Vagrantfile.

> Source: https://macsoftpark.net/zh/vagrant/
