vagrant

vagrant 的同步文件配置无法生效解决办法

耗尽温柔 提交于 2020-04-10 18:15:40
配置主机与虚机同步共享的文件夹 config.vm.synced_folder "./labs", "/home/vagrant/labs" 重新载入后报错 Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was: mount -t vboxsf -o uid=1000,gid=1000 home_vagrant_labs /home/vagrant/labs The error output from the command was: mount

vagrant plugin install 超时解决方法

守給你的承諾、 提交于 2020-04-10 17:44:19
1.请尽可能用比较新的 RubyGems 版本,建议 2.6.x 以上。 2. gems.ruby-china.org 更变为 gems.ruby-china.com/ 3. --plugin-clean-source 改为 --plugin-clean-sources $ gem update --system # 这里请翻墙一下 $ gem -v 2.6.3 $ gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ $ gem sources -l https://gems.ruby-china.com # 确保只有 gems.ruby-china.com vagrant plugin install vagrant-scp --plugin-clean-sources --plugin-source https://gems.ruby-china.com/ 可以正常使用 来源: oschina 链接: https://my.oschina.net/u/575659/blog/1840663

Why is the default Vagrant shared folder empty?

强颜欢笑 提交于 2020-04-10 03:03:45
问题 The /vagrant directory is empty. It should contain the workspace where my Vagrantfile is located. I can cd /vagrant , but it's empty. Vagrantfile VAGRANTFILE_API_VERSION = '2' VAGRANT_BOX_NAME = 'nomades.local' Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = 'bento/centos-6.7' config.vm.box_check_update = false config.vm.hostname = VAGRANT_BOX_NAME config.vm.define VAGRANT_BOX_NAME do |dev| dev.vm.provider 'virtualbox' do |v| v.name = VAGRANT_BOX_NAME v.memory = 512 v

/vagrant not populated with files

不羁的心 提交于 2020-04-08 06:01:54
问题 I have Vagrant (1.7.4) configured with the default configuration from vagrant init using the latest version of VirtualBox (5.0.16 r105871) on OS X (10.11.4) and the latest ubuntu/trusty64 box version (v20160323.0.0). My VM has the matching version of guest additions, but I can't seem to get the shared /vagrant directory to work. The /vagrant/ directory exists on the VM, but if I run ls on it it's completely empty. If I touch a file it appears on the guest in /vagrant but does not sync back to

/vagrant not populated with files

你。 提交于 2020-04-08 06:00:30
问题 I have Vagrant (1.7.4) configured with the default configuration from vagrant init using the latest version of VirtualBox (5.0.16 r105871) on OS X (10.11.4) and the latest ubuntu/trusty64 box version (v20160323.0.0). My VM has the matching version of guest additions, but I can't seem to get the shared /vagrant directory to work. The /vagrant/ directory exists on the VM, but if I run ls on it it's completely empty. If I touch a file it appears on the guest in /vagrant but does not sync back to

/vagrant not populated with files

限于喜欢 提交于 2020-04-08 05:59:23
问题 I have Vagrant (1.7.4) configured with the default configuration from vagrant init using the latest version of VirtualBox (5.0.16 r105871) on OS X (10.11.4) and the latest ubuntu/trusty64 box version (v20160323.0.0). My VM has the matching version of guest additions, but I can't seem to get the shared /vagrant directory to work. The /vagrant/ directory exists on the VM, but if I run ls on it it's completely empty. If I touch a file it appears on the guest in /vagrant but does not sync back to

Vagrant 学习和使用

和自甴很熟 提交于 2020-04-02 23:42:54
学习可以参看官方文档https://www.vagrantup.com/docs/ box下载地址: http://www.vagrantbox.es/ vagrant 下载地址: https://www.vagrantup.com/downloads.html virtualbox下载地址: https://www.virtualbox.org/wiki/Downloads 参考学习网站: https://www.imooc.com/video/14210 常用命令 vagrant box list 查看目前已有的box vagrant box add 新添加一个box vagrant box remove 删除指定box vagrant init 初始化配置vagrantfile vagrant up 启动虚拟机 vagrant ssh ssh登录虚拟机 vagrant suspend 挂起虚拟机 vagrant resume 恢复被挂起的状态 vagrant reload 重启虚拟机 vagrant halt 关闭虚拟机 vagrant status 查看虚拟机状态 vagrant destroy 删除虚拟机 vagrant global-status 查看当前vagrant管理的vm信息 vagrant ssh-config 输出用于ssh连接的一些信息

Vagrant ssh with multiple arguments

北战南征 提交于 2020-03-26 21:31:05
问题 I am having problems executing multiple commands with vagrant ssh. In order to run some tests in vagrant environment I execute following commands: vagrant ssh app sudo su deploy cd /some/dir/for/test source env/bin/activate python manage.py test I managed to get to point 3 but could not execute the 4th point. My attempt is as follows: vagrant ssh app -- -t 'cd /some/dir/for/test; sudo su deploy' But after the sudo command if I write some more commands they are not executed. I will also need

Vagrant ssh with multiple arguments

徘徊边缘 提交于 2020-03-26 21:30:52
问题 I am having problems executing multiple commands with vagrant ssh. In order to run some tests in vagrant environment I execute following commands: vagrant ssh app sudo su deploy cd /some/dir/for/test source env/bin/activate python manage.py test I managed to get to point 3 but could not execute the 4th point. My attempt is as follows: vagrant ssh app -- -t 'cd /some/dir/for/test; sudo su deploy' But after the sudo command if I write some more commands they are not executed. I will also need

利用vagrant来构建virtualbox

一个人想着一个人 提交于 2020-03-25 22:48:57
3 月,跳不动了?>>> 利用vagrant来构建环境 Vagrant是近年来比较火的一款工具,通过它可以实现自动化创建运行环境,实 现 基 础 设 施 即 代 码 。 vargrant有以下好片。 方便共享环境 通过共享构建环境所需要的代码,任何人都可以重建相同的环境 创建过程透明 通过查看代码,可以很方便查看本地开发环境是如何构建、由什么构建等信息 维护方便 只要修改代码就可以实现对环境的维护。代码就是代表构建环境的具体操作步骤,所以操作步骤和环境信息之间不会产生不一致总是。 vagrant是由Hashicorp公司提供的一个虚拟机构建工具。通过它可以自动化生成你想要的虚拟机环境。 创建操作系统 对系统进行配置(主机名、网络地址) 对系统安装完成后的环境配置(构建中间件或部署应用程序) Vagrant基本用户 在安装vagrant默认支持VirtualBox、Hyper-V和Docker的支持,除了这些默认的类型外,我们还可以通过安装相应的服务来提供其他平台的支持,接下来的案例,我们采用virtualbox来进行相应的讲解。 我们可以访问 virtualbox官网 点击Downloads进入下载界面,选择相应的平台进行下载安装。 Vagrant可以通过访问 下载界面 ,来选择对应的平台进行下载就可以。 新建Vagrant 我们可以通过下面的命令来生成一个Vagrant的工程目录