是否可以在 USB 上运行 Vagrant box? [英] Is it possible to have Vagrant box running on USB?

查看:50
本文介绍了是否可以在 USB 上运行 Vagrant box?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Vagrant 盒子中创建便携式开发环境.但是遇到了 ssh 密钥访问权限的问题.在某些目标机器上,我没有足够的权限来更改它们.是否可以将 Vagrant 配置为仅使用密码才能访问,以使 box 完全独立于权限?

I want to creatre portable dev environment inside a Vagrant box. But faced a problem with ssh key access rights. On some target machines I haven't got enough rights to change them. Is it possible to configure Vagrant to have access maybe only with password to make box fully rights-independent?

推荐答案

你可以让 vagrant box 从 USB 运行(我经常这样做,而且很高兴随身携带硬盘并在另一台计算机上运行,​​一切都在运行一样)

You can have vagrant box running from USB (I do that a lot and its nice to take hard drive with you and go on another computer and everything is running the same)

如果您运行 VMWare 提供程序,则所有这些都设置为所有 vagrant 文件,并且 VM 文件位于项目的 .vagrant 目录中,因此只需运行 Vagrant initvagrant up 在你的 USB 中,所有文件都在那里,你可以随身携带 USB 驱动器并连接到另一台运行 vagrant/VMWare 的计算机,你很好

If you run VMWare provider, this is all set as all the vagrant file and the VM files are within the .vagrant directory from your project so just run Vagrant init and vagrant up within your USB and all the files are there, you can take the USB drive with you and connect to another computer running vagrant/VMWare and you're good

当您运行 VirtualBox 提供程序时,它有点不同,因为 vagrant 文件将存储在您的 vagrant 目录中,但您的 VM 文件可能会与您的 My Documents 一起存储文件夹.您可以通过强制 VirtualBox 将文件存储在 USB 上来克服这个问题 - 请参阅此答案 https://stackoverflow.com/a/36343325/4296747 有多种选择,如何做到这一点

When you run VirtualBox provider, its a bit different as the vagrant files will be stored within your vagrant directory but your VM files will likely be stored with your My Documents folder. You can overcome that by forcing VirtualBox to store the files on the USB as well - see this answer https://stackoverflow.com/a/36343325/4296747 to have multiple options how you can do that

这篇关于是否可以在 USB 上运行 Vagrant box?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆