vagrant相关

作者 Lei da 日期 2019-07-09
vagrant相关
  • 无法挂载共享目录,报错如下
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 vagrant_app /vagrant/app

The error output from the command was:

mount: unknown filesystem type 'vboxsf'

解决办法点击此处

  • vgrant常用命令
$ vagrant init      # 初始化

$ vagrant up # 启动虚拟机
$ vagrant halt # 关闭虚拟机
$ vagrant reload # 重启虚拟机
$ vagrant ssh # SSH 至虚拟机
$ vagrant suspend # 挂起虚拟机
$ vagrant resume # 唤醒虚拟机
$ vagrant status # 查看虚拟机运行状态
$ vagrant destroy # 销毁当前虚拟机

$ vagrant box list # 查看本地box列表
$ vagrant box add # 添加box到列表

$ vagrant box remove # 从box列表移除