Vagrant Puppet Apt module: dependency cycle

Using puppetlabs/apt in a puppet provisioner for vagrant. the module is installed in puppet/modules and I'm getting a strange Dependency cycle error. the code in the manifest file: # Run apt-get update when anything beneath /etc/apt/ changes #taken from exec { "apt-get update": command => "/usr/bin/apt-get update", onlyif => "/bin/sh -c '[ ! -f /var/cache/apt/pkgcache.bin ] || /usr/bin/find /etc/ap

Vagrant How can I install PHP APC via Pecl with Puppet

I am attempting to install PHP APC on Puppet but I do not know how to go about this? Pear is already installed and when I try and execute the command to install PHP APC I presented with an error message. pecl.pp: class php::pecl { include php exec { "pecl install php-apc": require => Package["php-pear"] } } pear.pp: class php::pear { include php # upgrade PEAR exec { "pear upgrade": require => Package["php-pear"] } # install PHPUnit exec { "pear conf

interrupted download from vagrantcloud

I'm using Ruby 2.1.1 and Vagrant 1.6.1 on Ubuntu 12.04. Running: vagrant box add chef/centos-6.5 I keep getting: ==> box: Box download was interrupted. Exiting. The box failed to unpackage properly. Please verify that the box file you're trying to add is not corrupted and try again. The output from attempting to unpackage (if any): x Vagrantfile x box.ovf x metadata.json x packer-centos-6.5-x86_64-disk1.vmdk: truncated gzip input bsdtar: Error exit delayed from previous errors. I did a

Is it possible to use more than one in a Vagrantfile?

I created a VM with some server settings and customizations and used vagrant to create a box. I imported the box into vagrant so I can spin up more than one server with the same configuration. Also created a VM with client settings and boxed it with vagrant so I could create multiple clients. I want to know whether it is possible to have in the same Vagrantfile a block of code for the server using the server_box and a block of code for the client using the client_box. I though I could use a co

Pycharm no longer connects to vagrant machine after upgrading Vagrant and VirtualBox

After upgrading Windows 10, I noticed that I couldn't set my vagrant machine up because VirtualBox 4.3 didn't start. So I upgraded it to 5.0 and consequently upgraded Vagrant to 1.8 from 1.7. Then in Pycharm (both v4 and v5), the connection to my vagrant linux machine didn't work. I've been working with it for months. I tried to edit it and set it again but I receive a "C:\devops\vagrant-trusty\.vagrant\machines\default\virtualbox\private_key" (The filename, direc

Existing GIT repo with vagrant file

I just started using Vagrant. Now, One of my clients shared a GIT repo with the following files & directories : Vagrantfile (file) Vagrant (directory) Now, I don't understand what will be my next step ? Every resource in the internet assumes that I am creating a new box from scratch (vagrant init hashicorp/precise64). But, here I need to match the box environment that is shared with me. Thanks.

How to run ansible plays for some tasks on host when playbook is run via Vagrant provisioner?

I am using a Ubuntu 16.04 host with Vagrant installed on it. I would like to log the start time and end time of a set of tasks. These tasks are defined as roles. I created a role host_test role to ensure that I am able to touch a file on my host using local_action. But I believe as this playbook is being provisioned via Vagrant, by the time host_test role is played by ansible, Its control is inside the vagrant box rather than outside of it (my intention is to log in the host). So the file is not

Vagrant not respecting VAGRANT_HOME setting on Windows 8.1

I'm currently using PuPHPet to deploy a Vagrant box locally on Windows 8.1 64-bit, and I'm using the latest versions of Virtualbox and Vagrant both. I set the env variable VAGRANT_HOME in: Window's environment variables for both current user and system wide. setx VAGRANT_HOME "new dir" (In an admin cmd prompt, double checking with regedit) In the command prompt before calling vagrant up And none of them are honored. I've tried defining it as O:.vagrant.d and O:\.vagrant.d both and it still u

Vagrant CentOS guest in Debian guest on Windows 7 host: "VT-x is not available (VERR_VMX_NO_VMX)"

I have VirtualBox 5.1 installed on Windows 7. There I have a guest OS Debian (64-bit) set up. For this guest system I have both "Enable VT-x/AMD-V" and "Enable Nested Paging" boxes checked in the "System - Accelaration" menu and the "Paravirtualization Interface" is set to "KVM". Now I am trying to deploy a CentOS (guest) system (following these instructions to install an Apache Metron dev environment) inside the Debian guest OS, using VirtualBox 5.0 as a provider to Vagrant. I run: vagrant

PhpStorm using Command Line Console Tool from inside Vagrant with Command Line Tools Support Aliases

I like Command Line Console Tool in PhpStorm more than Terminal. It's much easier to use, and there is Command Line Tool Support extension, that could bring aliases for Symfony or Composer. However, this could be possible just for local directories, but I want to log into my Vagrant Homestead machine and use this from inside. Is there any way to achieve this? Thank you!

How do you set the VM name via Vagrant?

I've set up 4 VMs in Vagrant and now trying to set the name of a VM in Vagrant as I don't just want to ssh into the default VM. I can't find any docs on the vagrant website but found this: How to change Vagrant 'default' machine name? However, when I try: config.vm.define "foohost" and do a vagrant up I get: There are errors in the configuration of this machine. Please fix the following errors and try again: vm: * The following settings shouldn't exist: define

Vagrant Laravel Homestead: VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Every time I try to vagrant up I get this error: ==> homestead: Booting VM... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "a31f6545-5221-4217-a7fd-0e1127f27705", "--type", "headless"] Stderr: VBoxManage: error: The virtual machine 'homestead' has terminated unexpectedly during startup with exit code 1 (0x1) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), compon

How can I share a Windows 7 folder to lucid32 running in vagrant

I am using vagrant to run a lucid32 install. I have installed LAMP and got that working. What do I need to do in order to mount a windows share on the host machine inside the lucid32 install? I tried adding A windows path to the vagrant file but get: C:/Users/myuser/Sites/Vagrantfile:37: invalid Unicode escape config.vm.share_folder "vagwin","/windows", "c:\users\lukem\Sites"

Vagrant not running on

The first time I started up vagrant, the VM was running on After a "vagrant destroy", every time I start up vagrant it runs on even though my Vagrantfile has the following configuration: :hostonly, "" How do I get vagrant to run on again?

where are the vagrant api docs?

Ruby has a comprehensive set of API docs, for example here. Where are the API documents for Vagrant? The only thing I can find is the code, but that isn't a substitute for API documents.

Connecting Vagrant to Consul server in OpenStack

How can I connect a Vagrant machine to a Consul server running in an OpenStack cluster? I have 2 instances in an OpenStack cluster. One is running as a Consul server (agent-one) and the other just as a client (agent-two). They are joined and reporting passing health checks. On my local machine I spun up a Vagrant (vagrant-one) on my local machine and wanted to join the Consul party in OpenStack. At this point the consul log on vagrant-one reads: 2014/09/26 18:02:42 [INFO] serf: EventMemberJo

managing existing hosts with vagrant bypassing the provider

I'm managing a few web services residing on different fixed hosts with ssh. I wanted to use vagrant so that I can edit local files and have them synced automagically. however I'm having problems as I'm not using no provider or box, it's a fixed host and it feels like I'm going against vagramt's aim. here's my Vagrantfile: # -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(

Vagrant What is the proper syntax to pass installargs to a chocolatey package through Chef's chocolatey recipe?

I'm trying to install a chocolatey package through a chef script. I need to pass it specific arguments to install the way I want, and I'm getting lost in the multiple levels of escaping going on between ruby, powershell, and whatever else may be in the mix. Can someone tell me what exactly I need to put in my recipe to perform the equivalent of this? cinst VisualStudio2013Professional -InstallArguments "/Features:'WebTools Win8SDK' /ProductKey:AB1CD-EF2GH-IJ3KL-MN4OP-QR5ST"

Vagrant ansible : playbook still fails even if ignore_errors is set to "yes"

I got the following task in an ansible playbook... - name: Check if default ssh user exist shell: whoami remote_user: "{{}}" ignore_errors: yes register: results The objective is to check if the user {{}} is configured on the remote machine, in case it is not, I would connect as a root user and create it with the following tasks. However, it looks that ignore_errors does not catch the error... and this my ansible playbook

Vagrant What does it mean to provision a virtual machine?

I see the word "provisioning" used everywhere with virtualization but I can't seem to find a clear definition of it on google. Does it involve just setting up the guest operating system and allotting resources to it, or does it include downloading software and updates as well? Or does it include even more than that, like setting up shared folders and configurations?

Why does Vagrant truncate hostname

I'm setting the hostname in my VagrantFile like so: config.vm.hostname = "demo.puppet" However this ends up with a host name of just demo: vagrant@demo:~$ hostname demo It seems that Vagrant will truncate at the first ., is this expected behaviour as plenty of examples on the web seem to have hostnames with . in them.

Why is Vagrant port forwarding not working

I have a Vagrant box with JBoss. I'm trying to forward two ports. My Vagrantfile has the following for that "forwarded_port", guest: 8080, host: 8080 # jboss "forwarded_port", guest: 9990, host: 9990 # jboss management console On vagrant up web I can see in console ==> web: Forwarding ports... web: 8080 => 8080 (adapter 1) web: 9990 => 9990 (adapter 1) When I do netstat ports seem to be ok $ sudo netstat -tulpn | grep VirtualBox [sudo] passwo

How to detect which OS type the current guest is in the Vagrantfile

I'd like to have one Vagrantfile for multiple different OS types (e.g. windows and linux). I'm currently attempting to do something like this: ... if config.vm.guest.to_s == "windows" # ... do something windows specific else # ... do something linux specific end However, config.vm.guest returns an Object instance, not a string or a symbol, even though it was set in the base box Vagrant file (i.e. config.vm.guest = :windows). How can I do this?

NFS Vagrant on Fedora 22

I'm trying to run Vagrant using libvirt as my provider. Using rsync is unbearable since I'm working with a huge shared directory, but vagrant does succeed when the nfs setting is commented out and the standard rsync config is set. config.vm.synced_folder ".", "/vagrant", mount_options: ['dmode=777','fmode=777'] Vagrant hangs forever on this step here after running vagrant up ==> default: Mounting NFS shared folders... In my Vagrantfile I have this uncommented and the rsync config commen

Vagrant Not Starting Up. User that created VM doesn't match current user

I was trying to start up my vagrant machine, so I navigated to the folder where my vagrantfile is, and used: vagrant up && vagrant ssh but I got the following error message: The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. VirtualBox requires that the same user be used to manage the VM that was created. Please re-run Vagrant with that user. This is not a Vagrant issue. The UID used to create the VM was: 0 Your UID is: 501

Vagrant network configuration with Slackware box

I tried to configure a private network with Slackware boxes but I did get into trouble. I get the same error with a box (ricardson/slackware64-14.1-minimal) from the Atlas catalog and with a box I created from scratch. I am using Vagrant 1.7.4 and VirtualBox 4.2.24. The error message is the following: Configuring and enabling network interfaces... Vagrant attempted to execute the capability 'configure_networks' on the detect guest OS 'linux', but the guest doesn't support that capabilit

Vagrant unable to provision from a machine despite copy/pasting the path

I'm having trouble starting Vagrant with Virtual box. The code I enter into a blank project folder on the command line is: vagrant init tsawler/wafs; vagrant up --provider virtualbox In response I get the following message: C:\Users\Owner\PhpstormProjects\modernphptut>vagrant init tsawler/wafs; vagrant up --provider virtualbox An invalid option was specified. The help for this command is available below. Usage: vagrant init [options] [name [url]] Options: --box-version VERSION

Vagrant was unable to mount VirtualBox shared folders

Current setup: Virtualbox 5.1.20 with Vagrant 1.9.3 Previous working setup: Virtualbox 5.1.18 with Vagrant 1.9.3 I installed the latest version of Virtualbox and tried to start my VM. The folder mounting has stopped working. The same folder mounting works fine in Virtualbox 5.1.18. I get the following error message: 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 Gu

Error vagrant up after set GetHostTimeDisabled = 1

I wanted to stop time syncrhonisation on a Vagrant/virtual box VM. I ran this command: C:\Users\User>”c:\Program Files\Oracle\VirtualBox\VBoxManage.exe” setextradata ENTER_MACHINE_NAME_HERE “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″ As decribed here: But after that Vagrant up gives this error: ==> default: Booting VM... There was an error while executing VBoxManage, a CLI used by Vagran

Show synced folder type with vagrant

Is there a way to show the type of config.vm.synced_folder ( using a vagrant command? I have access to the host system and the Vagrant VM and wasn't able to find where the setting is displayed. VirtualBox does not seem to show the setting either. My use case is, that I want to see if a setting change has been applied (Switching from NFS to default).

vagrant: Post task to remove vagrant user

I am provisioning a vagrant machine using ansible; The question is whether it is possible to run some kind of post-processing (either in ansible or in any other form of vagrant provisioning) so as to remove the vagrant user at the end of the day (or at least disable it)? Will this break the vagrant process/provisioning itself?

`Vagrant up ` issue

I am using Vagrant Up command to run but I always get this error There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "0cda9586-5016-446e-880e-fae72f66dae4", "--type", "headless"] Stderr: VBoxManage: error: The virtual machine 'website_default_1539955305061_15994' has terminated unexpectedly during startup with exit code 1 (0x1) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x800

How to run a script from the host inside a vagrant guest in a single step?

Currently it takes 3 steps to run the script I want in the guest: vagrant ssh cd /vagrant composer test Is there a way of running composer test from the host machine inside the guest in a single step? I could add the 3 steps to a vagrant provisioning script so they get run automatically on vagrant up. But, I want to be able to run composer test multiple times from the host during a single vagrant session and ideally without having to ssh into it first.

Vagrant There was an error while executing `VBoxManage` ( VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component )

Getting below error while running vagrant up There was an error while executing "VBoxManage", a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["hostonlyif", "create"] Stderr: 0%... Progress state: NS_ERROR_FAILURE VBoxManage: error: Failed to create the host-only adapter VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory VBoxManage: error: Details: code NS_ERROR_FAILURE

Vagrant up and its non-deterministic issues

Ok, I've started to use vagrant because a client uses it. Getting all the pieces together and make them work was truly painful... and now I'm facing a different kind of issue. Once I run vagrant up there could be different results: VM doesn't boot properly Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to s

vagrant & virtualbox: Two host only network interfaces are not allowed to overlap

I need to set up a vm using vagrant I'd like it's attached to this existing Host-Only network adapter. I've tried: "private_network", type: "dhcp", name: "VirtualBox Host-Only Ethernet Adapter" But it's telling me that another machine can't be attached to it. Currently I'm getting: A host only network interface you're attempting to configure via DHCP already has a conflicting host only adapter with DHCP enabled. The DHCP on this adapter is incomp

Avoid reprovisioning a Vagrant VM if it is already provisioned

I am trying to get a shell provisioner to avoid reprovisioning a VM instance if it has already done so previously. Consider the following Vagrantfile: do |config| config.vm.define :minimal do |config| # Base image = "lucid32" config.vm.box_url = "" config.vm.provision :shell, :inline => "mkdir /tmp/foobar" end end If you run vagrant up minimal, it will create the box and provision it initially. If

Shall I version the .vagrant folder

We have a vagrant project where we manage our production machines, what will be the best way for us to share the their status? For now I've shared the .vagrant folder via the git repo? Is this the best way to do it?

How do I SSH into the boot2docker host vm that the Vagrant 1.6 Docker Provider sets up?

I'm on OSX and I'd like to be able to SSH into the host vm in order to: Get access to a native docker environment. This facilitates understanding and debugging port forwarding issues. Vagrant rsync seems to leave a lot of unused synced directories that's eating up disk space that I'd like to recover. To be clear, this question is NOT about ssh:ing into the docker containers that the Vagrant provider creates, but into the intermediate boot2docker host vm that Vagrant creates. I know that

Could not get metalink in vagrant puppet

I have the following puppet content for my vagrant file. yumrepo { "epel": enabled => '1' } $req_packages = [ "java-1.7.0-openjdk", "htop", "mysql-server", "php-devel", "mongo"] package { $req_packages : ensure => "installed", require => Yumrepo[ "epel" ], } All yum related operations will have the similar error message. ==> default: Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install mongo' returned 1: Error: Nothing to do ==> default: Could not get metalink https://m

Vagrant How to stop foreman logging to stdout?

I'm using foreman in a Vagrant VM to run gunicorn. I have foreman start up as the last item when I provision the VM, but that leaves it logging to stdout. I'd prefer it to log to a log file and release the terminal to me. Then, should I want to see the foreman logs, I can tail the file. I feel I must have missed something, as this doesn't sound like a difficult thing, but I'm stumped. I currently have to cancel, twice, to get out of the foreman logging, which is a messy end to the provisioning!

vagrant no space left on device

Today I started getting errors on simple operations, like creating small files in vim, the bash completion started to complain as well. Here is the result of df -h : vagrant@machine:/vagrant$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 40G 38G 249M 100% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 2.0G 12K 2.0G 1% /dev tmpfs

Vagrant fails to communicate with VirtualBox: Inappropriate ioctl for devic

I have a Vagrant VM setup to run with VirtualBox. Currently after trying to start it by using the command vagrant up, I get the following error in my console: Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set network interfaces... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["hostonlyif", "create"] Stderr: 0%... Progress state: NS_ERROR_F

vagrant up won't start Virtual Machine

I am working on a Laravel project and was trying to referencing another project on GitHub. In the process of trying to open that project, my computer stalled and I restarted. Now this pops up every time I use vagrant up. C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 22 column 11 (Psych::SyntaxError) from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in

No config.yaml file when installing Vagrant box

So I downloaded this box: I then go to my project folder and I execute the following commands: vagrant init ncaro/php7-debian8-apache-nginx-mysql; vagrant up --provider virtualbox But I dont see config.yaml in my directory. Why is that? Best Regards

How to enforce running a playbook on a Vagrant machine?

I wrote a playbook which installs Docker. --- - name: Install dependencies apt: name={{ item }} state=present update_cache=yes with_items: - linux-image-generic-lts-{{ ansible_distribution_release }} - linux-headers-generic-lts-{{ ansible_distribution_release }} become: true - name: Add Docker repository key apt_key: id: 58118E89F3A912897C070ADBF76221572C52609D keyserver: hkp:// state: present register: add_repository_key become: t

'Vagrant ssh' uses old deleted box

I have one box now, having deleted a previous box. However when I do 'vagrant ssh' it seems to go that old box. How do use the new one. current box ==> default: Checking for updates to 'fsilva/ubuntu_php5.3' default: Latest installed version: 1.1 default: Version constraints: default: Provider: virtualbox ==> default: Box 'fsilva/ubuntu_php5.3' (v1.1) is running the latest version. When I run 'vagrant ssh' shows old version 'lucid64' Linux lucid64 2.6.32-38-server #83-Ubunt

How to exclude (ignore) certain folders in vagrant rsync?

I wish to run npm install in my vagrant virtual box. But whenever I ran the npm install command, my rsync will execute. Since my host computer does not have node_modules installed, it simply remove the folder completely for me. What do I need to do so that my vagrant rsync will ignore the node_modules folder? I cannot have node_modules being rsynced into the guest machine because my host and guest are two different systems. So far my vagrantfile looks like this. Vagrant.configure("2") do |co

Vagrant default attributes override for nexus_api in chef cookbook fail to update values

I'm writing a wrapper cookbook for nexus3 wherein I override the default attributes like so in the attributes/default.rb file of my cookbook # Nexus Options node.default['nexus3']['properties_variables'] = { port: '8383', host: '', args: '${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml', context_path: '/nexus/' } node.default['nexus3']['api']['host'] = 'http://localhost:8383' node.default['nexus3']['api']['username'] = 'admin' node.default['nexus3']['

  1    2   3   4   5   6  ... 下一页 最后一页 共 9 页