跳至主要内容

尝试自动化VM的创建和管理 —— Vagrant

根据 Vagrant [Getting Started Guide](https://docs.vagrantup.com/v2/getting-started/index.html) 先从官方repository拉下来一个Ubuntu的标准版box: C:\Users\jedi>vagrant box add hashicorp/precise32 ==> box: Loading metadata for box 'hashicorp/precise32' box: URL: https://atlas.hashicorp.com/hashicorp/precise32 ==> box: Adding box 'hashicorp/precise32' (v1.0.0) for provider: virtualbox box: Downloading: https://atlas.hashicorp.com/hashicorp/boxes/precise32/vers ions/1.0.0/providers/virtualbox.box ==> box: Box download is resuming from prior download progress box: Progress: 100% (Rate: 54613/s, Estimated time remaining: --:--:--) ==> box: Successfully added box 'hashicorp/precise32' (v1.0.0) for 'virtualbox'! 这仅仅只是第一步,有了box之后可以执行 `vagrant init` 和 `vagrant up` 来启动虚拟机实例。 > 后记: > 我的预期是可以通过脚本来自动化VM的创建,并随着时间的更新来维护VM, > 不过貌似 Vagrant 和我目前的需求有所偏差。所以暂时不会做太多的探索。

评论