[英]Running vagrant on two macs
I have Vagrant installed on my iMac but I would also like to install and run it on my MacBook.我在 iMac 上安装了 Vagrant,但我也想在我的 MacBook 上安装和运行它。 Is it possible to run the same Vagrant box across two Macs?是否可以在两台 Mac 上运行同一个 Vagrant 机器?
I have done a Vagrant up
command within a shared Dropbox folder - so i'm guessing that all I need to do is install vagrant on the second mac and then navigate to the Dropbox shared folder and do vagrant up
.我在共享的 Dropbox 文件夹中执行了Vagrant up
命令 - 所以我猜我需要做的就是在第二台 Mac 上安装 vagrant,然后导航到 Dropbox 共享文件夹并执行vagrant up
。
Would this work?这行得通吗?
This would be the most straight forward way I can think of.这将是我能想到的最直接的方式。
Vagrant stores the state of the machine and machine id inside the .vagrant folder. Vagrant 将机器的状态和机器 ID 存储在 .vagrant 文件夹中。 The running machine (vm) itself is handled by virtualbox/vmware or any provider your using.正在运行的机器 (vm) 本身由 virtualbox/vmware 或您使用的任何提供程序处理。 Lets say the virtualbox box is stored somewhere else on your system and referenced by Vagrant.假设 virtualbox 存储在您系统上的其他位置并由 Vagrant 引用。
If you access the folder from two systems your basically remote controlling two different machine on two different systems.如果您从两个系统访问该文件夹,则您基本上可以远程控制两个不同系统上的两台不同机器。 Not a good solution.不是一个好的解决方案。 Furthermore, you will run into problems if the states are different, eg its "up" on system one but "destroyed" on system two.此外,如果状态不同,您将遇到问题,例如它在系统一上“启动”而在系统二上“销毁”。
Additionally to the above solutions I propose the following:除了上述解决方案,我还提出以下建议:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.