Is it possible to have Vagrant box running on USB?

拥有回忆 提交于 2020-01-13 04:56:08

问题


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?


回答1:


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)

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

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



来源:https://stackoverflow.com/questions/36851034/is-it-possible-to-have-vagrant-box-running-on-usb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!