我使用Ubuntu进行开发和部署,并且需要创建一个隔离的环境.
我正在考虑为此目的使用Vagrant或Docker.有哪些优点和缺点,或者这些解决方案如何比较?
昨晚我的流浪汉工作得非常好.我刚打开电脑,点击vagrant up,这就是我得到的:
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: …Run Code Online (Sandbox Code Playgroud) 我有一些Vagrant共享文件夹的问题,我的基本系统是Ubuntu 13.10桌面.
我不明白为什么我有这个错误是没有正确配置的东西?是NFS问题还是Virtualbox Guest Additions?我尝试过不同的盒子,但同样的问题.
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrant
Run Code Online (Sandbox Code Playgroud)
以下是完整的流程vagrant up:
$ vagrant up
Bringing machine 'default' up …Run Code Online (Sandbox Code Playgroud) 执行以下命令后,.box文件会发生什么?
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
Run Code Online (Sandbox Code Playgroud)
lucid32.box下载完成后,我无法在文件系统上找到该文件.
我有一个用例,我偶尔会想要将一个文件从我的主机复制到Vagrant客户端.
我不希望通过传统的配置程序(Puppet/Chef)这样做,因为这通常是一次性的 - 我只想快速添加到我的Vagrantfile中.
我不想共享整个目录,可能是因为我想覆盖现有文件而不需要访问guest虚拟机上的整个目录.
编写shell配置脚本并处理潜在的转义似乎有点过分,当我想要做的就是复制文件.
那么,将单个文件从主机复制到guest虚拟机的最简单方法是什么?
启动流浪盒时,"默认"这个名称来自哪里?
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Run Code Online (Sandbox Code Playgroud)
有没有办法设置这个?
我正在为我的环境使用Vagrant,我有一个小问题:
$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/.../base
Run Code Online (Sandbox Code Playgroud)
我初始化了我的项目vagrant init但由于某种原因vagrant up拒绝工作.
我正在使用Vagrant在Windows中启动VirtualBox VM.在其他平台上,我可以
$ vagrant ssh
Run Code Online (Sandbox Code Playgroud)
连接到VM.
如何在Windows中连接到此Vagrant框?
在Vagrant文档中建议使用PuTTy的方式也不起作用:
http://docs-v1.vagrantup.com/v1/docs/getting-started/ssh.html
我将Windows 10升级到昨天的最后一次更新,现在,当我启动 vagrant up命令时出现此错误:
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since …Run Code Online (Sandbox Code Playgroud) 我公司的开发环境基于VirtualBox上运行的虚拟机.我们希望更进一步,并使用Vagrant的功能在文本文件中获得机器的描述,然后能够基于该文本文件"提升"该机器.结合木偶,这将解决每个人在VM中安装不同软件版本的问题.
然而,Vagrant似乎非常专注于在主机上开发,让机器在后台运行.我们需要在机器中拥有我们的开发环境,因此我们需要一个完整的GUI,因此当输入"vagrant up"时,应该出现具有完整桌面环境(XFCE,KDE ...)的机器.
到目前为止,我已经设法从Xubuntu发行版中创建了一个"基础"框.但是当我键入"vagrant up"时,虽然桌面出现了,并且我能够正确登录,但Vagrant会在"等待机器启动时消息"中冻结.这可能需要几分钟......".过了一会儿,Vagrant因超时而崩溃.因此,不会创建共享文件夹,也不会执行包配置程序-puppet-.
如何使用vagrant创建具有完整GUI的虚拟机?
vagrant ×10
virtualbox ×7
ssh ×2
desktop ×1
docker ×1
nfs ×1
ubuntu ×1
vagrantfile ×1
windows ×1
windows-10 ×1